mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
add some
This commit is contained in:
parent
fa52a9cbb8
commit
9fb348c414
24
index.css
24
index.css
@ -114,8 +114,16 @@ table.content th.select[data-asc="0"] i.bi-sort-up { display:none; }
|
||||
table.content th.select[data-asc="1"] i.bi-sort-down-alt { display:none; }
|
||||
table.content td.option { cursor:pointer; }
|
||||
table.content td { padding:var(--table-padding); }
|
||||
table.content td i { padding:var(--input-padding); color:var(--notice-bg-color); }
|
||||
table.content td i.bi-trash { color:var(--danger-bg-color); }
|
||||
table.content td i { padding:var(--input-padding); }
|
||||
table.content:not(.detail) td input.icons { display:none; }
|
||||
table.content.checkbox th:first-child { text-align:center; padding:var(--table-padding); position:sticky; left:2px; }
|
||||
table.content.checkbox td:first-child { text-align:center; padding:var(--table-padding); position:sticky; left:2px; }
|
||||
table.content.action th:last-child { text-align:center; padding:var(--table-padding); position:sticky; right:2px; }
|
||||
table.content.action td:last-child { text-align:center; padding:var(--table-padding); position:sticky; right:2px; }
|
||||
table.content.action td:last-child i { color:var(--notice-bg-color); }
|
||||
table.content.action td:last-child i.bi-trash { color:var(--danger-bg-color); }
|
||||
table.content.action td:last-child input { border:none; color:var(--notice-bg-color); }
|
||||
table.content.action td:last-child input:hover { background-color:var(--hover-bg-color); color:var(--notice-bg-color); }
|
||||
table.content.detail td:first-child { word-break:keep-all; white-space:pre; }
|
||||
table.content.detail td:first-child { text-align:center; }
|
||||
table.content.detail td:first-child { background-color:var(--plugin-bg-color); position:sticky; left:0; }
|
||||
@ -123,18 +131,14 @@ table.content.detail td i { display:none; }
|
||||
table.content.detail td { white-space:break-spaces; }
|
||||
table.content.detail tr.action { background-color:var(--plugin-bg-color); position:sticky; bottom:0; }
|
||||
table.content.detail tr.action input.icons { display:none; }
|
||||
table.content.detail tr.action i { display:unset; }
|
||||
table.content:not(.detail) td input.icons { display:none; }
|
||||
table.content.checkbox th:first-child { text-align:center; padding:var(--table-padding); position:sticky; left:2px; }
|
||||
table.content.checkbox td:first-child { text-align:center; padding:var(--table-padding); position:sticky; left:2px; }
|
||||
table.content.action th:last-child { text-align:center; padding:var(--table-padding); position:sticky; right:2px; }
|
||||
table.content.action td:last-child { text-align:center; padding:var(--table-padding); position:sticky; right:2px; }
|
||||
table.content.detail tr.action input { color:var(--notice-bg-color); }
|
||||
table.content.detail tr.action i { display:unset; color:var(--notice-bg-color); }
|
||||
table.content.detail tr.action i.bi-trash { color:var(--danger-bg-color); }
|
||||
body.mobile table.content.checkbox th:first-child { padding:var(--table-padding) var(--input-padding); }
|
||||
body.mobile table.content.checkbox td:first-child { padding:var(--table-padding) var(--input-padding); }
|
||||
body.mobile table.content.action th:last-child { padding:var(--table-padding) var(--input-padding); }
|
||||
body.mobile table.content.action td:last-child { padding:var(--table-padding) var(--input-padding); }
|
||||
table.content input { border:none; background-color:var(--th-bg-color); color:var(--notice-bg-color); padding:var(--input-padding); }
|
||||
table.content input:hover { color:var(--notice-bg-color); }
|
||||
table.content input { border:none; background-color:var(--th-bg-color); padding:var(--input-padding); }
|
||||
table.content input:not(:last-child) { margin-right:var(--input-margin); }
|
||||
body:not(.mobile) fieldset.Action:not(.tabview):not(.horizon):not(.grid) fieldset.plugin:not(.float):not(.full):not(.cmd)>div.output>table.content td i { display:none; }
|
||||
body:not(.mobile) fieldset.Action:not(.tabview):not(.horizon):not(.grid) fieldset.plugin:not(.float):not(.full):not(.cmd)>div.output>table.content td input.icons { display:unset; }
|
||||
|
@ -90,7 +90,7 @@ div.vimer.open.float td:first-child { display:none; }
|
||||
div.vimer.open.float td:nth-child(2) { display:none; }
|
||||
div.vimer.plug.float div.item.text input { width:var(--river-width); }
|
||||
div.layout.flex>input.current { clear:both; }
|
||||
tr.line>td.line { user-select:none; border-right:var(--box-border); }
|
||||
tr.line>td.line { -webkit-user-select:none; border-right:var(--box-border); }
|
||||
tr.line>td.line { text-align:right; line-height:var(--code-line-height); padding:0 var(--button-padding); position:sticky; left:0; }
|
||||
tr.line>td.text { white-space:pre; line-height:var(--code-line-height); padding-left:var(--input-padding); width:100%; }
|
||||
tr.line:hover { background-color:var(--hover-bg-color); }
|
||||
|
@ -39,7 +39,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
}
|
||||
}
|
||||
if (can.base.isIn(sub.ConfIndex(), wiki.WORD)) { sub.onexport.output = function() { can.page.style(can, sub._output, html.HEIGHT, "", html.MAX_HEIGHT, "") } }
|
||||
})
|
||||
}, item.style == html.FLOAT && can.page.tagis(can._target, "fieldset.story")? document.body: can._output)
|
||||
})
|
||||
},
|
||||
_float: function(can, msg) { can.onimport._field(can, msg, function(sub) { can.onmotion.float(sub) }) },
|
||||
|
@ -52,7 +52,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
], lex.SP, mdb.FS),
|
||||
), onmouseenter: function(event) { can.base.isFunc(cb) && cb(event) } }) }
|
||||
can.onmotion.clear(can, can.ui.svg), can.ui.svg.Value(mdb.COUNT, 0)
|
||||
var begin = 0; can.core.Next(can.list, function(item, next, index) { var p = index==which? pos(x, y, margin*4, begin+item.span/2): [x, y]
|
||||
var begin = 0; can.core.Next(can.list, function(item, next, index) { var p = index==which? pos(x, y, 1*margin, begin+item.span/2): [x, y]
|
||||
pie(p[0], p[1], r, begin, item.span, item.color, item.name||item.command, function(event) { can.onimport._draw(can, x, y, r, margin, can.db.which = index) }), begin += item.span
|
||||
index == which && (can.db.current = item.value)
|
||||
can.onmotion.select(can, can.ui.table, html.TR, index), can.Status(item.value), can.onmotion.delay(can, next, can.db.delay)
|
||||
@ -68,7 +68,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
return parseInt(value)
|
||||
},
|
||||
layout: function(can) { if (!can.ui || !can.ui.svg) { return }
|
||||
var height = can.base.Max(can.ConfHeight(), can.ConfWidth()/2), margin = 10, r = height/2-5*margin
|
||||
var height = can.base.Max(can.ConfHeight(), can.ConfWidth()/2), margin = 10, r = height/2-1*margin-margin
|
||||
can.page.style(can, can.ui.display, html.WIDTH, can.ConfWidth()-height), can.ui.svg.Val(html.HEIGHT, height), can.ui.svg.Val(html.WIDTH, height)
|
||||
can._draw = function(which) { can.onimport._draw(can, height/2-margin/2, can.ConfHeight()/2-margin/2, r, margin, which) }, can._draw(can.db.which||0)
|
||||
can.page.style(can, can._output, html.HEIGHT, can.ConfHeight(), html.WIDTH, can.ConfWidth())
|
||||
|
@ -193,7 +193,13 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
||||
tabs._target._close(), can.onkeymap.prevent(event)
|
||||
}}], onclick: function(event) {
|
||||
can.onmotion.select(can, action, html.DIV_TABS, tabs._target), can.base.isFunc(cb) && cb(event, tabs)
|
||||
}, _init: function(target) { var menu = tabs._menu||shy(function(event, button) { can.Update(event, [ctx.ACTION, button]) })
|
||||
}, _init: function(target) {
|
||||
if (action == can._action) {
|
||||
can.page.Select(can, can._action, "div.item._space.state", function(space) {
|
||||
can.page.insertBefore(can, target, space)
|
||||
})
|
||||
}
|
||||
var menu = tabs._menu||shy(function(event, button) { can.Update(event, [ctx.ACTION, button]) })
|
||||
target._item = tabs, tabs._target = target, target._close = function() { close(target) || cbs && cbs(tabs) }
|
||||
var _action = can.page.parseAction(can, tabs)
|
||||
can.page.Modify(can, target, {draggable: true,
|
||||
@ -246,10 +252,8 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
||||
},
|
||||
plug: function(can, meta, cb, target, field) { if (!meta || !meta.index) { return }
|
||||
meta.type = meta.type||html.PLUG, meta.name = meta.index, can.onappend.plugin(can, meta, function(sub) { sub.sup = can
|
||||
sub.run = function(event, cmds, cb) {
|
||||
if (can.page.Select(can, sub._option, "input[name=path]").length > 0 && sub.Option(nfs.PATH) == "") { sub.request(event, {path: nfs.PWD}) }
|
||||
can.runActionCommand(can.request(event, can.Option(), {space: meta.space}), meta.index, cmds, cb)
|
||||
}, sub.onaction.close = function() { can.onmotion.hidden(can, target) }, can.base.isFunc(cb) && cb(sub)
|
||||
// sub.run = function(event, cmds, cb) { can.runActionCommand(can.request(event, can.Option(), {space: meta.space}), meta.index, cmds, cb) }
|
||||
sub.onaction.close = function() { can.onmotion.hidden(can, target) }, can.base.isFunc(cb) && cb(sub)
|
||||
}, target, field)
|
||||
},
|
||||
})
|
||||
|
9
proto.js
9
proto.js
@ -67,10 +67,13 @@ var Volcanos = shy({iceberg: "", volcano: "", frame: chat.FRAME_JS, _cache: {},
|
||||
return can.user.input(event, can, meta.feature[cmds[1]], function(args) { can.Update(can.request(event, {_handle: ice.TRUE}, can.Option()), cmds.slice(0, 2).concat(args)) })
|
||||
} can.runAction(event, cmds[1], cmds.slice(2), cb, true)
|
||||
},
|
||||
runActionCommand: function(event, index, args, cb) { can.request(event)._caller()
|
||||
can.runAction(event, ctx.RUN, [index].concat(args), cb, true)
|
||||
runActionCommand: function(event, index, args, cb) {
|
||||
can.request(event)._caller()
|
||||
// can.runAction(event, ctx.RUN, [index].concat(args), cb, true)
|
||||
can.run(event, [ctx.ACTION, ctx.RUN].concat(index, args||[]), cb, true)
|
||||
},
|
||||
runAction: function(event, action, args, cb, silent) { var msg = can.request(event, {_handle: ice.TRUE})
|
||||
runAction: function(event, action, args, cb, silent) {
|
||||
var msg = can.request(event, {_handle: ice.TRUE})
|
||||
// can.request(can.base.isIn(msg._can, can, can._fields? can.sup: can.sub)? can.Option(): {})._caller()
|
||||
can.request(event, can.Option())._caller()
|
||||
can.run(event, [ctx.ACTION].concat(action, args||[]), cb, silent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user