1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-05-20 20:52:36 +08:00
parent 7510c10f2f
commit fa4e9d6178
8 changed files with 67 additions and 46 deletions

View File

@ -155,7 +155,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
}); return value }); return value
} catch {} }, } catch {} },
Action: function(key, value) { Action: function(key, value) {
key && value && can.misc.sessionStorage(can, [sub.ConfIndex(), ctx.ACTION, key], value) // key && value && can.misc.sessionStorage(can, [sub.ConfIndex(), ctx.ACTION, key], value)
value && (value = can.user.trans(sub, value, null, html.INPUT)) value && (value = can.user.trans(sub, value, null, html.INPUT))
return can.page.SelectArgs(can, action, key, value)[0] return can.page.SelectArgs(can, action, key, value)[0]
}, },
@ -268,9 +268,17 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
can.base.isString(item)? /* 2.按键 */ {type: html.BUTTON, name: item, value: can.user.trans(can, item, meta._trans), onclick: function(event) { can.base.isString(item)? /* 2.按键 */ {type: html.BUTTON, name: item, value: can.user.trans(can, item, meta._trans), onclick: function(event) {
run(event, item) run(event, item)
}}: item.length > 0? /* 3.列表 */ {type: html.SELECT, name: item[0], values: item.slice(1), onchange: function(event) { can.misc.Event(event, can, function(msg) { }}: item.length > 0? /* 3.列表 */ {type: html.SELECT, name: item[0], values: item.slice(1), onchange: function(event) { can.misc.Event(event, can, function(msg) {
var button = event.target.value; meta[item[0]]? can.core.CallFunc(meta[item[0]], [event, can, item[0], button]): var button = event.target.value;
can.onaction._select && can.onaction._select(event, can, item[0], button)
can.onexport.session && can.onexport.session(can, "action:"+item[0], button)
meta[item[0]]? can.core.CallFunc(meta[item[0]], [event, can, item[0], button]):
meta[button]? can.core.CallFunc(meta[button], [event, can, button]): can.Action(item[0], button) meta[button]? can.core.CallFunc(meta[button], [event, can, button]): can.Action(item[0], button)
}) }}: /* 4.其它 */(item.type == html.BUTTON && (item.value = item.value||can.user.trans(can, item.name, meta._trans), item.onclick = item.onclick||function(event) { })}, _init: function() {
if (can.onexport.session) {
var value = can.onexport.session(can, "action:"+item[0])
value && can.Action(item[0], value)
}
}}: /* 4.其它 */(item.type == html.BUTTON && (item.value = item.value||can.user.trans(can, item.name, meta._trans), item.onclick = item.onclick||function(event) {
run(event, item.name||item.value) run(event, item.name||item.value)
}, item._init = item._init||function(target) { item.action && can.onappend.figure(sub, item, target, function(_sub, value) { can.Update() }) }, item._init = item._init||function(target) { item.action && can.onappend.figure(sub, item, target, function(_sub, value) { can.Update() })
if (item.type == html.BUTTON && can.page.isIconInput(can, item.name)) { can.onappend.icons(can, target, item.name) } if (item.type == html.BUTTON && can.page.isIconInput(can, item.name)) { can.onappend.icons(can, target, item.name) }
@ -454,6 +462,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
_input.select.value = value||_item.value||_item.values[0] _input.select.value = value||_item.value||_item.values[0]
can.onappend.select(can, _input.select, _item) can.onappend.select(can, _input.select, _item)
can.onappend.style(can, html.BUTTON, target) can.onappend.style(can, html.BUTTON, target)
item._init && item._init(target)
} }
item.style && can.onappend.style(can, item.style, target) item.style && can.onappend.style(can, item.style, target)
}}])[item.name]; return _input }}])[item.name]; return _input
@ -675,37 +684,36 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
if (can.base.endWith(style, ".css")) { return can.require([style]) } if (can.base.endWith(style, ".css")) { return can.require([style]) }
can.base.isObject(style) && !can.base.isArray(style)? can.page.style(can, target, style): can.page.ClassList.add(can, target, style) can.base.isObject(style) && !can.base.isArray(style)? can.page.style(can, target, style): can.page.ClassList.add(can, target, style)
}, },
scroll: function(can, target, offset, length) { if (!can.user.isChrome) { return } scroll: function(can, target, parent) { target = target||can.ui.content||can._output, parent = target == can.ui.content? target.parentNode: target
if (offset) { var ui = can.page.Append(can, target, [{view: "scrollbar", style: {height: length*target.offsetHeight*2}}]) var vbegin, vbar = can.page.Append(can, parent, [{view: [["scrollbar", html.VERTICAL]],
target.addEventListener("scroll", function(event) { can.page.style(can, ui.scrollbar, html.TOP, target.scrollTop+offset*target.offsetHeight, html.RIGHT, -target.scrollLeft) })
return ui.scrollbar
}
var vbegin, vbar = can.page.Append(can, target, [{view: [["scrollbar", html.VERTICAL]],
onmousedown: function(event) { vbegin = {top: target.scrollTop, y: event.y}, window._mousemove = event.target }, onmousedown: function(event) { vbegin = {top: target.scrollTop, y: event.y}, window._mousemove = event.target },
onmousemove: function(event) { if (!vbegin) { return } target.scrollTop = vbegin.top+(event.y-vbegin.y)/target.offsetHeight*target.scrollHeight, can.onkeymap.prevent(event) }, onmousemove: function(event) { if (!vbegin) { return } target.scrollTop = vbegin.top+(event.y-vbegin.y)/target.offsetHeight*target.scrollHeight, can.onkeymap.prevent(event) },
onmouseup: function(event) { vbegin = null, delete(window._mousemove) }, onmouseup: function(event) { vbegin = null, delete(window._mousemove) },
}])._target }])._target
var hbegin, hbar = can.page.Append(can, target, [{view: [["scrollbar", html.HORIZON]], var hbegin, hbar = can.page.Append(can, parent, [{view: [["scrollbar", html.HORIZON]],
onmousedown: function(event) { hbegin = {left: target.scrollLeft, x: event.x}, window._mousemove = event.target }, onmousedown: function(event) { hbegin = {left: target.scrollLeft, x: event.x}, window._mousemove = event.target },
onmousemove: function(event) { if (!hbegin) { return } target.scrollLeft = hbegin.left+(event.x-hbegin.x)/target.offsetWidth*target.scrollWidth, can.onkeymap.prevent(event) }, onmousemove: function(event) { if (!hbegin) { return } target.scrollLeft = hbegin.left+(event.x-hbegin.x)/target.offsetWidth*target.scrollWidth, can.onkeymap.prevent(event) },
onmouseup: function(event) { hbegin = null, delete(window._mousemove) }, onmouseup: function(event) { hbegin = null, delete(window._mousemove) },
}])._target }])._target
target.addEventListener("scroll", function(event) { target.addEventListener("scroll", function(event) {
var height = can.base.Min(target.offsetHeight*target.offsetHeight/target.scrollHeight, target.offsetHeight/4) var height = can.base.Min(target.offsetHeight*target.offsetHeight/target.scrollHeight, target.offsetHeight/4)
target.scrollHeight > target.offsetHeight && can.page.style(can, vbar, html.HEIGHT, height, html.RIGHT, -target.scrollLeft, html.VISIBILITY, html.VISIBLE,
html.TOP, can.base.Max(target.scrollTop+target.scrollTop/(target.scrollHeight-target.offsetHeight)*(target.offsetHeight-height)-10, target.scrollHeight-height),
)
vbar.innerHTML = `${(target.scrollTop*100/(target.scrollHeight-target.offsetHeight)).toFixed(2)}%` vbar.innerHTML = `${(target.scrollTop*100/(target.scrollHeight-target.offsetHeight)).toFixed(2)}%`
var width = can.base.Min(target.offsetWidth*target.offsetWidth/target.scrollWidth, target.offsetWidth/4) target.scrollHeight > target.offsetHeight && can.page.style(can, vbar, html.VISIBILITY, html.VISIBLE,
target.scrollWidth > target.offsetWidth+10 && can.page.style(can, hbar, html.WIDTH, width, html.BOTTOM, -target.scrollTop, html.VISIBILITY, html.VISIBLE, html.HEIGHT, height, html.RIGHT, target == can.ui.content? 0: -target.scrollLeft,
html.LEFT, target.scrollLeft+target.scrollLeft/(target.scrollWidth-target.offsetWidth)*(target.offsetWidth-width), html.TOP, target == can.ui.content? target.scrollTop/(target.scrollHeight-target.offsetHeight)*(target.offsetHeight-height):
can.base.Max(target.scrollTop+target.scrollTop/(target.scrollHeight-target.offsetHeight)*(target.offsetHeight-height)-10, target.scrollHeight-height),
)
var width = can.base.Min(target.offsetWidth*target.offsetWidth/target.scrollWidth, target.offsetWidth/4)
hbar.innerHTML = `${(target.scrollLeft*100/(target.scrollWidth-target.offsetWidth)).toFixed(2)}%`
target.scrollWidth > target.offsetWidth+10 && can.page.style(can, hbar, html.VISIBILITY, html.VISIBLE,
html.WIDTH, width, html.BOTTOM, target == can.ui.content? 0: -target.scrollTop,
html.LEFT, target == can.ui.content? target.scrollLeft/(target.scrollWidth-target.offsetWidth)*(target.offsetWidth-width):
target.scrollLeft+target.scrollLeft/(target.scrollWidth-target.offsetWidth)*(target.offsetWidth-width),
) )
hbar.innerHTML = `${target.scrollLeft}+${target.offsetWidth}/${target.scrollWidth}`
can.onmotion.delayOnce(can, function() { can.onmotion.delayOnce(can, function() {
can.page.style(can, vbar, html.VISIBILITY, html.HIDDEN), can.page.style(can, hbar, html.VISIBILITY, html.HIDDEN) can.page.style(can, vbar, html.VISIBILITY, html.HIDDEN), can.page.style(can, hbar, html.VISIBILITY, html.HIDDEN)
}, 3000, target._delay_scroll = target._delay_scroll||[]) }, 30000, target._delay_scroll = target._delay_scroll||[])
}) })
return vbar
}, },
toggle: function(can, target) { target = target||(can.ui.content? can.ui.content.parentNode: can._content) toggle: function(can, target) { target = target||(can.ui.content? can.ui.content.parentNode: can._content)
var toggle = can.page.Append(can, target, [ var toggle = can.page.Append(can, target, [

View File

@ -217,7 +217,9 @@ div.project div.item { position:relative; }
div.project div.item.select { border-right:var(--box-notice3); } div.project div.item.select { border-right:var(--box-notice3); }
div.project div.item:not(.hide) { white-space:pre; line-height:24px; cursor:pointer; padding:0 var(--input-padding); display:flex; align-items:center; } div.project div.item:not(.hide) { white-space:pre; line-height:24px; cursor:pointer; padding:0 var(--input-padding); display:flex; align-items:center; }
div.project div.item:not(.hide)>i:first-child { margin-right:var(--input-margin); } div.project div.item:not(.hide)>i:first-child { margin-right:var(--input-margin); }
div.project div.item:not(:hover) input:not([type=button]) { border-left:0; border-right:0; } div.project div.item:not(:hover) input:not([type=button]) { border-right:0; }
div.project>div.item:not(:hover) input:not([type=button]) { border-left:0; }
div.project>div.zone>div.action div.item:not(:hover) input:not([type=button]) { border-left:0; }
div.project div.item.filter { background-color:var(--plugin-bg-color); padding:0; width:100%; position:sticky; top:0; z-index:1; } div.project div.item.filter { background-color:var(--plugin-bg-color); padding:0; width:100%; position:sticky; top:0; z-index:1; }
div.project div.item.filter>input { padding:0 25px; width:100% !important; } div.project div.item.filter>input { padding:0 25px; width:100% !important; }
div.project div.item.search { padding:0; width:100%; } div.project div.item.search { padding:0; width:100%; }
@ -240,6 +242,8 @@ div.project div.zone>div.item i { position:unset }
div.project div.zone:hover>div.item span.icon { display:block; height:24px; line-height:24px; } div.project div.zone:hover>div.item span.icon { display:block; height:24px; line-height:24px; }
div.project div.zone:hover>div.item span.icon.refresh { line-height:22px; } div.project div.zone:hover>div.item span.icon.refresh { line-height:22px; }
div.project div.zone:hover>div.item span.icon.menu { line-height:22px; } div.project div.zone:hover>div.item span.icon.menu { line-height:22px; }
body.windows div.project div.zone:hover>div.item span.icon.refresh { line-height:26px; }
body.windows div.project div.zone:hover>div.item span.icon.menu { line-height:26px; font-size:20px !important; }
div.project div.zone>div.item { display:flex; } div.project div.zone>div.item { display:flex; }
div.project div.zone>div.list>div.zone>div.item { text-align:left; padding-left:var(--button-padding); transition:all .5s; } div.project div.zone>div.list>div.zone>div.item { text-align:left; padding-left:var(--button-padding); transition:all .5s; }
div.project div.zone>div.list>div.zone>div.item:hover { margin-left:var(--button-margin); transition:all .3s; } div.project div.zone>div.list>div.zone>div.item:hover { margin-left:var(--button-margin); transition:all .3s; }
@ -247,16 +251,17 @@ div.item>i.bi-chevron-down { float:right; transition:all .5s; }
div.item.open>i.bi-chevron-down { rotate:-180deg; transition:all .3s; } div.item.open>i.bi-chevron-down { rotate:-180deg; transition:all .3s; }
div.item.text.trans input:not([type=button]) { transition:all 1s; } div.item.text.trans input:not([type=button]) { transition:all 1s; }
div.item.text.trans input:not([type=button]):focus { width:var(--project-width); transition:all .5s; } div.item.text.trans input:not([type=button]):focus { width:var(--project-width); transition:all .5s; }
div.toggle { background-color:var(--hover-bg-color); font-size:var(--action-height); padding-top:38px; height:120px; position:absolute; } div.toggle { background-color:var(--hover-bg-color); color:var(--disable-fg-color); font-size:var(--action-height); padding-top:38px; height:120px; position:absolute; }
body.dark div.toggle:not(:hover) { color:silver; }
div.toggle:hover { color:var(--hover-fg-color); } div.toggle:hover { color:var(--hover-fg-color); }
div.toggle.project { top:20%; left:0; border-top-right-radius:var(--plugin-radius); border-bottom-right-radius:var(--plugin-radius); } div.toggle.project { top:20%; left:0; border-top-right-radius:var(--plugin-radius); border-bottom-right-radius:var(--plugin-radius); }
div.content>div.toggle.profile { top:20%; right:0; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); } div.content>div.toggle.profile { top:20%; right:0; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); }
div.content>div.toggle.display { left:20%; bottom:-52px; rotate:90deg; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); } div.content>div.toggle.display { left:20%; bottom:-52px; rotate:90deg; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); }
div.layout>div.toggle.profile { top:20%; right:0; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); }
div.layout>div.toggle.display { left:20%; bottom:-52px; rotate:90deg; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); }
div.project:not(.toggle) { width:var(--project-width); flex:0 0 var(--project-width); } div.project:not(.toggle) { width:var(--project-width); flex:0 0 var(--project-width); }
div.layout>div.profile:not(.toggle) { width:50%; flex:0 0 50%; } div.layout>div.profile:not(.toggle) { width:50%; flex:0 0 50%; }
fieldset.story div.project:not(.toggle) { width:230px; flex:0 0 230px; } fieldset.story div.project:not(.toggle) { width:230px; flex:0 0 230px; }
div.layout>div.toggle.profile { top:20%; right:0; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); }
div.layout>div.toggle.display { left:20%; bottom:-52px; transform:rotate(90deg); border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); }
/* fieldset */ /* fieldset */
body.mobile div.item.online.state { display:none; } body.mobile div.item.online.state { display:none; }
div.item.online.state { margin-left:var(--button-margin) !important; display:block; align-items:center; } div.item.online.state { margin-left:var(--button-margin) !important; display:block; align-items:center; }
@ -552,12 +557,11 @@ fieldset.studio fieldset.story { border-radius:0; }
fieldset.studio fieldset.story>legend { border-top-left-radius:0; } fieldset.studio fieldset.story>legend { border-top-left-radius:0; }
fieldset.float { box-shadow:var(--plugin-box-shadow); border:var(--plugin-border); border-radius:var(--plugin-radius); } fieldset.float { box-shadow:var(--plugin-box-shadow); border:var(--plugin-border); border-radius:var(--plugin-radius); }
fieldset:not(.panel):hover { box-shadow:var(--notice-box-shadow); } fieldset:not(.panel):hover { box-shadow:var(--notice-box-shadow); }
body:not(.cmd) fieldset.plugin>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); } body.light fieldset.plugin>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); }
body:not(.cmd) fieldset.story>legend { box-shadow:var(--legend-box-shadow); } body.light fieldset.story>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); }
// body:not(.cmd) fieldset.story:not(.float)>legend { margin-right:var(--legend-margin); }
fieldset.story>legend { border-top-left-radius:var(--plugin-radius); } fieldset.story>legend { border-top-left-radius:var(--plugin-radius); }
fieldset.float>form.option input { border-top:0; } fieldset.float>form.option input:not(:hover) { border-top:0; }
fieldset.float>div.action input { border-top:0; } fieldset.float>div.action input:not(:hover) { border-top:0; }
fieldset>form.option div.item:not(.icon) { box-shadow:var(--input-box-shadow); } fieldset>form.option div.item:not(.icon) { box-shadow:var(--input-box-shadow); }
fieldset>form.option div.item.select { border-radius:var(--button-radius); } fieldset>form.option div.item.select { border-radius:var(--button-radius); }
fieldset>form.option div.item.button { border-radius:var(--button-radius); } fieldset>form.option div.item.button { border-radius:var(--button-radius); }
@ -577,6 +581,7 @@ fieldset>div.status>legend:hover { box-shadow:var(--legend-box-shadow); }
fieldset.Action>div.toast>div.toast:hover { box-shadow:var(--notice-box-shadow); } fieldset.Action>div.toast>div.toast:hover { box-shadow:var(--notice-box-shadow); }
table.content th { box-shadow:var(--th-box-shadow); } table.content th { box-shadow:var(--th-box-shadow); }
table.content th.select { border:var(--box-notice); } table.content th.select { border:var(--box-notice); }
table.content.checkbox td:first-child { box-shadow:var(--th-box-shadow); }
table.content.action td:last-child { box-shadow:var(--th-box-shadow); } table.content.action td:last-child { box-shadow:var(--th-box-shadow); }
table.content.detail tr.action td { box-shadow:var(--th-box-shadow); } table.content.detail tr.action td { box-shadow:var(--th-box-shadow); }
div.project:not(.toggle) { border-right:var(--box-border); overflow-x:hidden; } div.project:not(.toggle) { border-right:var(--box-border); overflow-x:hidden; }
@ -653,7 +658,7 @@ form.option>div.item.icon.goback { font-size:28px; line-height:26px; display:fle
form.option>div.icon.delete { font-size:20px; line-height:33px; display:flex; align-items:flex-start; } form.option>div.icon.delete { font-size:20px; line-height:33px; display:flex; align-items:flex-start; }
form.option>div.item.icon.play { font-size:16px; } form.option>div.item.icon.play { font-size:16px; }
body.windows form.option>div.item.icon.delete { line-height:31px; display:flex; align-items:flex-start; } body.windows form.option>div.item.icon.delete { line-height:31px; display:flex; align-items:flex-start; }
body.windows form.option>div.item.icon.menu { font-size:22px; line-height:30px; padding:0 3px; } body.windows form.option>div.item.icon.menu { font-size:18px; line-height:30px; padding:0 3px; }
body.windows form.option>div.item.icon.refresh { font-size:24px; line-height:28px; } body.windows form.option>div.item.icon.refresh { font-size:24px; line-height:28px; }
body.windows form.option>div.item.icon.goback { font-size:24px; line-height:28px; } body.windows form.option>div.item.icon.goback { font-size:24px; line-height:28px; }
div.item.text { position:relative; } div.item.text { position:relative; }
@ -694,7 +699,7 @@ body.windows div.item.button.refresh>span.icon { font-size:22px; line-height:30p
div.item.button._space.icons { flex-grow:1; min-width:var(--button-margin); } div.item.button._space.icons { flex-grow:1; min-width:var(--button-margin); }
div.item.button._space.icons:hover { background-color:unset; cursor:unset; } div.item.button._space.icons:hover { background-color:unset; cursor:unset; }
fieldset.inner fieldset.story div.item.button._space.icons { margin-left:0; flex-grow:1; } fieldset.inner fieldset.story div.item.button._space.icons { margin-left:0; flex-grow:1; }
div.tabs>span { font-style:italic; white-space:pre; } div.tabs>span { font-style:italic; white-space:pre; padding-right:var(--input-padding); }
div.tabs>i:first-child { margin-right:var(--input-margin); } div.tabs>i:first-child { margin-right:var(--input-margin); }
div.tabs>span.icon { font-size:var(--icon-font-size); font-style:normal; padding-left:var(--input-padding); visibility:hidden; } div.tabs>span.icon { font-size:var(--icon-font-size); font-style:normal; padding-left:var(--input-padding); visibility:hidden; }
div.tabs.select>span.icon { visibility:visible; } div.tabs.select>span.icon { visibility:visible; }
@ -721,6 +726,8 @@ fieldset.story>form.option>div.button.icons.back { margin-right:0; }
fieldset.story>form.option>div.button.icons>input { display:none; } fieldset.story>form.option>div.button.icons>input { display:none; }
fieldset.story>div.action>div.button.icons>input { display:none; } fieldset.story>div.action>div.button.icons>input { display:none; }
fieldset.plug>form.option>div.button.icons>input { display:none; } fieldset.plug>form.option>div.button.icons>input { display:none; }
fieldset.plug>form.option>div.button.icons.back { display:none; }
fieldset.plug>form.option>div.button.icons.list { display:none; }
fieldset.plug>div.action>div.button.icons>input { display:none; } fieldset.plug>div.action>div.button.icons>input { display:none; }
fieldset.plug>form.option>div.icon:first-child { margin-left:var(--input-margin); } fieldset.plug>form.option>div.icon:first-child { margin-left:var(--input-margin); }
body:not(.width6) fieldset.inner.float:not(.full)>form.option>div.text { display:none; } body:not(.width6) fieldset.inner.float:not(.full)>form.option>div.text { display:none; }
@ -837,9 +844,9 @@ fieldset.dream>div.output>div.item div.content>span.files { background-color:pur
fieldset.dream>div.output>div.item div.content>span.add { background-color:var(--notice-bg-color); color:var(--notice-fg-color);} fieldset.dream>div.output>div.item div.content>span.add { background-color:var(--notice-bg-color); color:var(--notice-fg-color);}
fieldset.dream>div.output>div.item div.content>span.del { background-color:var(--danger-bg-color); color:var(--danger-fg-color);} fieldset.dream>div.output>div.item div.content>span.del { background-color:var(--danger-bg-color); color:var(--danger-fg-color);}
fieldset.dream>div.output>div.item.begin>div.title { color:var(--disable-fg-color); font-style:italic; text-decoration:line-through; } fieldset.dream>div.output>div.item.begin>div.title { color:var(--disable-fg-color); font-style:italic; text-decoration:line-through; }
fieldset.dream>div.output>div.item.login { border:var(--box-danger); } fieldset.dream:not(.zone)>div.output>div.item.login { border:var(--box-danger); }
fieldset.dream>div.output>div.item.server { border:var(--box-notice); } fieldset.dream:not(.zone)>div.output>div.item.server { border:var(--box-notice); }
fieldset.dream>div.output>div.item.origin { border:var(--box-danger); } fieldset.dream:not(.zone)>div.output>div.item.origin { border:var(--box-danger); }
fieldset.plug.dream.zone>div.output>div.item { display:flex; padding:var(--input-padding); } fieldset.plug.dream.zone>div.output>div.item { display:flex; padding:var(--input-padding); }
fieldset.plug.dream.zone>div.output>div.item>img { margin-right:var(--input-margin); } fieldset.plug.dream.zone>div.output>div.item>img { margin-right:var(--input-margin); }
fieldset.plug.dream.zone>div.output>div.item>span { line-height:var(--action-height); } fieldset.plug.dream.zone>div.output>div.item>span { line-height:var(--action-height); }
@ -964,11 +971,13 @@ div.output>fieldset.iframe.story>form.option>div.item.hash input { width:var(--u
div.scrollbar { div.scrollbar {
background-color:var(--hover-bg-color); font-size:8px !important; line-height:10px; background-color:var(--hover-bg-color); font-size:8px !important; line-height:10px;
border-radius:var(--button-radius); position:absolute; visibility:hidden; border-radius:var(--button-radius); position:absolute; visibility:hidden;
display:flex; justify-content:center; align-items:center;
color:silver;
} }
div.scrollbar.vertical { writing-mode:tb; width:10px; right:0; top:0; transition:width .3s 1s; cursor:pointer; } div.scrollbar.vertical { writing-mode:tb; width:10px; right:0; top:0; transition:width 3s; cursor:pointer; }
div.scrollbar.vertical:hover { width:30px; transition:width .1s; font-size:24px !important; } div.scrollbar.vertical:hover { width:var(--code-line-height); transition:width .3s; font-size:24px !important; }
div.scrollbar.horizon:hover { height:30px; transition:height .1s; font-size:24px !important; } div.scrollbar.horizon:hover { height:var(--code-line-height); transition:height .3s; font-size:24px !important; }
div.scrollbar.horizon { height:10px; left:0; bottom:0; transition:height .3s 1s; cursor:pointer; } div.scrollbar.horizon { height:10px; left:0; bottom:0; transition:height 3s; cursor:pointer; }
form.option>div.text>span.value::-webkit-scrollbar { width:0 !important; height:0 !important; } form.option>div.text>span.value::-webkit-scrollbar { width:0 !important; height:0 !important; }
div.project::-webkit-scrollbar { width:0 !important; height:0 !important; } div.project::-webkit-scrollbar { width:0 !important; height:0 !important; }
div.project div.list::-webkit-scrollbar { width:0 !important; height:0 !important; } div.project div.list::-webkit-scrollbar { width:0 !important; height:0 !important; }

View File

@ -188,7 +188,9 @@ Volcanos(chat.ONKEYMAP, {
toggleLayout: function(can, layout) { can.onaction.layout(can, can.onexport.layout(can) == layout? ice.AUTO: layout) }, toggleLayout: function(can, layout) { can.onaction.layout(can, can.onexport.layout(can) == layout? ice.AUTO: layout) },
}) })
Volcanos(chat.ONPLUGIN, { Volcanos(chat.ONPLUGIN, {
_plugin: shy("插件", [mdb.NAME, ice.LIST, ice.BACK]), _filter: shy("表格", [ice.LIST, html.FILTER]), _filter: shy("表格", [ice.LIST, html.FILTER]),
_plugin: shy("插件", [mdb.NAME, ice.LIST, ice.BACK]),
_action: shy("操作", [ice.LIST]),
_notfound: shy("缺失", [ctx.INDEX, web.SPACE, ice.LIST], function(can, msg, arg, sub) { msg.Echo("not found "+(arg[0]||sub.ConfIndex())+" "+(arg[1]||can.ConfSpace())) }), _notfound: shy("缺失", [ctx.INDEX, web.SPACE, ice.LIST], function(can, msg, arg, sub) { msg.Echo("not found "+(arg[0]||sub.ConfIndex())+" "+(arg[1]||can.ConfSpace())) }),
layout: shy("界面布局", {_init: function(can) { can.Option(chat.LAYOUT, can.getAction(chat.LAYOUT)) }}, ["layout:select=auto,tabs,tabview,horizon,vertical,grid,free,flow,page", ctx.RUN], function(can, msg, arg) { can.onaction.layout(can, arg[0]) }), layout: shy("界面布局", {_init: function(can) { can.Option(chat.LAYOUT, can.getAction(chat.LAYOUT)) }}, ["layout:select=auto,tabs,tabview,horizon,vertical,grid,free,flow,page", ctx.RUN], function(can, msg, arg) { can.onaction.layout(can, arg[0]) }),
}) })

View File

@ -5,7 +5,7 @@ fieldset.Footer>div.output div.title:first-child { margin-left:var(--header-heig
fieldset.Footer:not(.tabview)>div.output div.title:first-child { font-weight:bold; text-align:center; width:var(--river-width); } fieldset.Footer:not(.tabview)>div.output div.title:first-child { font-weight:bold; text-align:center; width:var(--river-width); }
fieldset.Footer>div.output input[type=button] { background-color:transparent; color:var(--panel-fg-color); border:0; } fieldset.Footer>div.output input[type=button] { background-color:transparent; color:var(--panel-fg-color); border:0; }
fieldset.Footer>div.output div.toast { font-family:var(--status-font-family); line-height:18px; text-align:right; overflow:auto; flex-grow:1; } fieldset.Footer>div.output div.toast { font-family:var(--status-font-family); line-height:18px; text-align:right; overflow:auto; flex-grow:1; }
fieldset.Footer>div.output div.state { font-family:var(--status-font-family); line-height:18px; } fieldset.Footer>div.output div.state { font-family:var(--status-font-family); line-height:18px; white-space:pre; }
fieldset.Footer>div.output div.state label { font-size:var(--status-font-size); } fieldset.Footer>div.output div.state label { font-size:var(--status-font-size); }
fieldset.Footer>div.output div.cmd { padding:0; margin-left:20px; } fieldset.Footer>div.output div.cmd { padding:0; margin-left:20px; }
fieldset.Footer>div.output div.cmd>input[name=cmd] { padding-left:30px; } fieldset.Footer>div.output div.cmd>input[name=cmd] { padding-left:30px; }

View File

@ -21,6 +21,7 @@ fieldset.inner>div.output>div.layout>div.path>span { padding:var(--input-padding
fieldset.inner>div.output>div.layout>div.path>span:hover { background-color:var(--hover-bg-color); } fieldset.inner>div.output>div.layout>div.path>span:hover { background-color:var(--hover-bg-color); }
fieldset.inner>div.output>div.layout>div.path>span._space:hover { background-color:unset; } fieldset.inner>div.output>div.layout>div.path>span._space:hover { background-color:unset; }
fieldset.inner>div.output>div.layout>div.path>span.view { font-style:normal; font-size:22px; padding:0 var(--input-padding); } fieldset.inner>div.output>div.layout>div.path>span.view { font-style:normal; font-size:22px; padding:0 var(--input-padding); }
body.windows fieldset.inner>div.output>div.layout>div.path>span.view { font-size:18px; }
fieldset.inner>div.output>div.layout>div.display h1 { border-bottom:var(--box-border); margin:var(--title-margin) 0; } fieldset.inner>div.output>div.layout>div.display h1 { border-bottom:var(--box-border); margin:var(--title-margin) 0; }
fieldset.inner>div.output>div.layout>div.display h2 { border-bottom:var(--box-border); margin:var(--title-margin) 0; } fieldset.inner>div.output>div.layout>div.display h2 { border-bottom:var(--box-border); margin:var(--title-margin) 0; }
fieldset.inner>div.output>div.layout>div.display pre>code { padding-left:var(--table-padding); border-left:var(--box-notice3); display:block; } fieldset.inner>div.output>div.layout>div.display pre>code { padding-left:var(--table-padding); border-left:var(--box-notice3); display:block; }

View File

@ -37,7 +37,7 @@ Volcanos(chat.ONIMPORT, {
"\u25E7": function(event) { var show = can.onmotion.toggle(can, can.ui.project); can.onimport.layout(can), can.isCmdMode() && can.onexport.session(can, PROJECT_HIDE, show? "": html.HIDE) }, "\u25E7": function(event) { var show = can.onmotion.toggle(can, can.ui.project); can.onimport.layout(can), can.isCmdMode() && can.onexport.session(can, PROJECT_HIDE, show? "": html.HIDE) },
"\u25E8": shy({transform: "rotate(90deg) translate"+(can.user.isWindows? "(-2px)": "(1px,-2px)")}, function(event) { "\u25E8": shy({transform: "rotate(90deg) translate"+(can.user.isWindows? "(-2px)": "(1px,-2px)")}, function(event) {
if (can.page.isDisplay(can.ui.display)) { return can.onmotion.hidden(can, can.ui.display), can.onimport.layout(can) } can.onaction.exec(event, can) }), if (can.page.isDisplay(can.ui.display)) { return can.onmotion.hidden(can, can.ui.display), can.onimport.layout(can) } can.onaction.exec(event, can) }),
"\u25E8 ": shy({width: 24}, function(event) { if (can.page.isDisplay(can.ui.profile)) { "\u25E8 ": shy({width: 32}, function(event) { if (can.page.isDisplay(can.ui.profile)) {
can._msg._profile_hidden = true can._msg._profile_hidden = true
return can.onmotion.hidden(can, can.ui.profile), can.onimport.layout(can) } can.onaction.show(event, can) }), return can.onmotion.hidden(can, can.ui.profile), can.onimport.layout(can) } can.onaction.show(event, can) }),
}, function(text, cb) { return cb && {text: [text, html.SPAN, html.VIEW], style: cb.meta, onclick: cb} })) }, function(text, cb) { return cb && {text: [text, html.SPAN, html.VIEW], style: cb.meta, onclick: cb} }))
@ -120,6 +120,7 @@ Volcanos(chat.ONIMPORT, {
can.ui.path.innerHTML = can.page.Format(html.A, can.base.trimPrefix(can.misc.MergePodCmd(can, {pod: file}), location.origin)) can.ui.path.innerHTML = can.page.Format(html.A, can.base.trimPrefix(can.misc.MergePodCmd(can, {pod: file}), location.origin))
} else if (isIndex()) { can.onmotion.hidden(can, can.ui.path) } else if (isIndex()) { can.onmotion.hidden(can, can.ui.path)
} else { can.onimport.__tabPath(can) } } else { can.onimport.__tabPath(can) }
can.page.Select(can, can.ui.content.parentNode, "div.scrollbar", function(target) { can.page.style(can, target, "visibility", "hidden") })
can.page.SelectChild(can, can.ui._content.parentNode, can.page.Keys(html.DIV_CONTENT, html.DIV_LAYOUT, html.FIELDSET_STORY, [[[html.IFRAME, html.CONTENT]]]), function(target) { can.page.SelectChild(can, can.ui._content.parentNode, can.page.Keys(html.DIV_CONTENT, html.DIV_LAYOUT, html.FIELDSET_STORY, [[[html.IFRAME, html.CONTENT]]]), function(target) {
can.onmotion.toggle(can, target, target == content) can.onmotion.toggle(can, target, target == content)
}), can.ui.content._plugin = msg._plugin }), can.ui.content._plugin = msg._plugin
@ -350,7 +351,7 @@ Volcanos(chat.ONSYNTAX, {
can.core.List(msg.Result().split(lex.NL), function(item) { can.onaction.appendLine(can, item) }) can.core.List(msg.Result().split(lex.NL), function(item) { can.onaction.appendLine(can, item) })
} }
can.onengine.signal(can, VIEW_CREATE, msg), can.base.isFunc(cb) && cb(msg._content = can.ui.content) can.onengine.signal(can, VIEW_CREATE, msg), can.base.isFunc(cb) && cb(msg._content = can.ui.content)
can.onmotion.delay(can, function() { can.onappend.scroll(can, can.ui.content) }) can.onmotion.delay(can, function() { can.onappend.scroll(can) })
} }
can.require([chat.PLUGIN_LOCAL+"code/inner/syntax.js"], function() { var parse = can.onexport.parse(can); can.Conf(chat.PLUG) && (can.onsyntax[parse] = can.Conf(chat.PLUG)) can.require([chat.PLUGIN_LOCAL+"code/inner/syntax.js"], function() { var parse = can.onexport.parse(can); can.Conf(chat.PLUG) && (can.onsyntax[parse] = can.Conf(chat.PLUG))
var p = can.onsyntax[parse]; !p? can.runAction({}, mdb.PLUGIN, [parse, msg.Option(nfs.FILE), msg.Option(nfs.PATH)], function(msg) { p = can.base.Obj(msg.Result()) var p = can.onsyntax[parse]; !p? can.runAction({}, mdb.PLUGIN, [parse, msg.Option(nfs.FILE), msg.Option(nfs.PATH)], function(msg) { p = can.base.Obj(msg.Result())
@ -386,8 +387,8 @@ Volcanos(chat.ONSYNTAX, {
var tr = can.onaction.appendLine(can, item); can.onappend.style(can, type, tr); if (index > 0) { return } var tr = can.onaction.appendLine(can, item); can.onappend.style(can, type, tr); if (index > 0) { return }
var line = can.onexport.line(can, tr)||can.onexport.line(can, tr.previousSibling) var line = can.onexport.line(can, tr)||can.onexport.line(can, tr.previousSibling)
can.onmotion.delay(can, function() { can.onmotion.delay(can, function() {
var bar = can.onappend.scroll(can, can.ui.content, line/can.ui.content._max, length/can.ui.content._max); can.onappend.style(can, type, bar) // var bar = can.onappend.scroll(can, can.ui.content, line/can.ui.content._max, length/can.ui.content._max); can.onappend.style(can, type, bar)
bar && (bar.onclick = function() { can.onimport.tabview(can, "", can.Option(nfs.FILE), line) }) // bar && (bar.onclick = function() { can.onimport.tabview(can, "", can.Option(nfs.FILE), line) })
}) })
} }
function append() { var rest = [] function append() { var rest = []

View File

@ -1,5 +1,5 @@
Volcanos(chat.ONIMPORT, {list: [mdb.VALUE, "close:button"], Volcanos(chat.ONIMPORT, {list: [mdb.VALUE, "close:button"],
_init: function(can, msg) { msg.Defer(function() { can.onappend.scroll(can, can._output) }) _init: function(can, msg) { msg.Defer(function() { can.onappend.scroll(can) })
can.onappend.table(can, msg), can.onappend.board(can, msg), can.onmotion.highlight(can, can.Option(mdb.VALUE, msg.Option(mdb.VALUE))) can.onappend.table(can, msg), can.onappend.board(can, msg), can.onmotion.highlight(can, can.Option(mdb.VALUE, msg.Option(mdb.VALUE)))
can.page.Select(can, can._option, "input[name=value]", function(target) { can.onmotion.hidden(can, target) }) can.page.Select(can, can._option, "input[name=value]", function(target) { can.onmotion.hidden(can, target) })
}, },

View File

@ -1,7 +1,7 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.Conf(html.PADDING, 10) Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.Conf(html.PADDING, 10)
can.onexport.title(can, can.Option(nfs.PATH))
can.page.Modify(can, target, msg.Results()), can.onimport._content(can, target) can.page.Modify(can, target, msg.Results()), can.onimport._content(can, target)
can.onmotion.delay(can, function() { can.onappend.scroll(can, can._output) }) can.onmotion.delay(can, function() { can.onappend.scroll(can) })
can.onexport.title(can, can.Option(nfs.PATH))
}, },
_content: function(can, target, cb) { can.onappend.style(can, web.WIKI_WORD) _content: function(can, target, cb) { can.onappend.style(can, web.WIKI_WORD)
can.page.Select(can, target, wiki.STORY_ITEM, function(target) { var meta = target.dataset||{}; cb && cb(target, meta) can.page.Select(can, target, wiki.STORY_ITEM, function(target) { var meta = target.dataset||{}; cb && cb(target, meta)