1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
shylinux 2020-09-17 22:20:06 +08:00
parent d416333c3b
commit 6452d55375
3 changed files with 22 additions and 20 deletions

View File

@ -304,6 +304,10 @@ body.white fieldset.plugin {
background-color:white;
color:black;
}
body.white fieldset.editor {
background:#0b2c54ab;
color:white;
}
body.white fieldset.Header {
border:solid 2px #1f2224;
background-color:#2f3638;

View File

@ -1,10 +1,6 @@
body.white fieldset.plugin.editor {
background-color:#173d4000;
}
fieldset.editor>div.action>div.file {
border:solid 2px red; padding:2px;
float:left; margin:2px 0;
/* background-color:#211515; */
cursor:pointer;
}
fieldset.editor>div.action>div.file.over {
@ -25,8 +21,8 @@ fieldset.editor>div.output {
background-color:#173d40ab;
}
fieldset.editor>div.output div.project {
max-height:400px; overflow:auto;
max-width:180px; text-align:left;
max-width:180px; overflow:auto;
text-align:left; padding-right:20px;
font-size:14px; font-family:monospace;
color:white;
}
@ -38,8 +34,7 @@ fieldset.editor>div.output div.project div.item:hover {
}
fieldset.editor>div.output div.profile {
min-height:400px;
max-height:600px; overflow:auto;
min-height:200px; overflow:auto;
}
fieldset.editor>div.output div.preview {
font-family:monospace;
@ -62,7 +57,6 @@ fieldset.editor>div.output div.content {
font-size:16px; font-family:monospace;
border-left:solid 2px red;
min-height:20px;
/* min-width:800px; */
max-width:1000px;
overflow:auto;
float:left;
@ -75,7 +69,6 @@ fieldset.editor>div.output div.content>pre.item {
color:white;
}
fieldset.editor>div.output div.content>pre.item.select {
/* border:solid 1px red; */
border-right:0px;
}
fieldset.editor>div.output div.content>pre.item span.comment {
@ -108,13 +101,13 @@ fieldset.editor>div.output pre.display:hover {
}
fieldset.editor>div.output div.search {
/* position:relative; top:-200px; */
height:220px; overflow:auto;
background-color:#060627ab;
text-align:left;
background-color:#060627ab; color:white;
padding:6px; border:solid 1px red;
clear:both;
color:white;
}
fieldset.editor>div.output div.search div.tags {
height:220px; overflow:auto;
text-align:left;
}
fieldset.editor>div.output div.search td>div {
max-height:100px;

View File

@ -2,10 +2,12 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, list, cb,
can.Conf("content") && (msg = can.request({}), msg.result = [can.Conf("content")])
can.ui = can.page.Appends(can, target, [
{view: "project", style: {display: "none"}},
{view: "project", style: {
display: "none", "max-height": window.innerHeight-300,
}},
{view: "profile", list: [
{view: "preview"}, {view: "content"}
]},
], style: {"max-height": window.innerHeight-300}},
{view: ["display", "pre"]},
{view: "search", style: {display: "none"}, list: [{view: "action", list: [
@ -48,7 +50,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, list, cb,
can.file = file, can.parse = can.base.Ext(file||path), can.max = 0
can.onsyntax._init(can, can._msg)
// can.onaction._resize(can, can.ui.project.style.display != "none")
can.onaction._resize(can, can.ui.project.style.display != "none")
can.Status("文件名", can.file), can.Status("解析器", can.parse)
can.Status("当前行", can.onexport.position(can, 0))
can.Status("模式", "normal")
@ -187,7 +189,7 @@ Volcanos("onaction", {help: "控件交互", list: [],
},
_resize: function(can, hide) {
can.Timer(10, function() {
var width = ((parseInt(can.Conf("width"))-120)||can._target.offsetWidth) - (hide? can.ui.project.offsetWidth+10: 0)
var width = ((parseInt(can.Conf("width"))-60)||can._target.offsetWidth) - (hide? can.ui.project.offsetWidth+10: 0)
can.page.Modify(can, can.ui.profile, {style: {width: width}})
width -= can.ui.preview.offsetWidth + 20
can.page.Modify(can, can.ui.content, {style: {"max-width": width}})
@ -199,7 +201,10 @@ Volcanos("onaction", {help: "控件交互", list: [],
can.onaction.selectLine(can, index)
}, ondblclick: function(event) {
can.user.input(event, can, [{_input: "text", name: "topic", value: "@key"}, "name"], function(event, button, meta, list) {
can.run(event, ["favor", "topic", meta.topic, "type", can.parse, "name", meta.name, "text", value, "file", can.file, "line", index], function(msg) {
can.run(event, ["favor", "topic", meta.topic||"some",
"type", can.parse, "name", meta.name||"some", "text", value,
"path", can.Option("path"), "file", can.Option("file"), "line", can.Option("line"),
], function(msg) {
can.user.toast(can, "收藏成功")
}, true)
return true