mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
13260d13c8
commit
c66b9ab28b
6
frame.js
6
frame.js
@ -313,7 +313,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
|||||||
_legend: can._legend, _option: can._option, _action: action||can._action, _output: output, _status: status||can._status,
|
_legend: can._legend, _option: can._option, _action: action||can._action, _output: output, _status: status||can._status,
|
||||||
Update: can.Update, Option: can.Option, Action: can.Action, Status: can.Status, db: {}, ui: {layout: function() {}},
|
Update: can.Update, Option: can.Option, Action: can.Action, Status: can.Status, db: {}, ui: {layout: function() {}},
|
||||||
}, [display, msg.Option(ice.MSG_DISPLAY_CSS), chat.PLUGIN_TABLE_JS], function(sub) { sub.Conf(can.Conf())
|
}, [display, msg.Option(ice.MSG_DISPLAY_CSS), chat.PLUGIN_TABLE_JS], function(sub) { sub.Conf(can.Conf())
|
||||||
sub.db.hash = can.isCmdMode()? can.misc.SearchHash(can): []
|
sub.db.hash = can.base.getValid(can.isCmdMode()? can.misc.SearchHash(can): [], can.misc.localStorage(can, [sub.ConfSpace()||can.misc.Search(can, ice.POD), sub.ConfIndex(), "hash"]))||[]
|
||||||
var last = can.sub; last && can.core.CallFunc([last, "onaction.hidden"], {can: last})
|
var last = can.sub; last && can.core.CallFunc([last, "onaction.hidden"], {can: last})
|
||||||
sub.run = function(event, cmds, cb, silent) { var msg = sub.request(event)._caller()
|
sub.run = function(event, cmds, cb, silent) { var msg = sub.request(event)._caller()
|
||||||
msg.RunAction(event, sub, cmds) || can.Update(event, can.Input(cmds, !silent), cb, silent)
|
msg.RunAction(event, sub, cmds) || can.Update(event, can.Input(cmds, !silent), cb, silent)
|
||||||
@ -403,6 +403,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
|||||||
type == html.PLUG || (type == html.STORY && item.style != html.FLOAT) || can.base.isIn(can.ConfIndex(),
|
type == html.PLUG || (type == html.STORY && item.style != html.FLOAT) || can.base.isIn(can.ConfIndex(),
|
||||||
// web.DESKTOP, web.MESSAGE, web.VIMER,
|
// web.DESKTOP, web.MESSAGE, web.VIMER,
|
||||||
) || (name = can.core.Keys(item.space||item._space, name))
|
) || (name = can.core.Keys(item.space||item._space, name))
|
||||||
|
item.index && (item.help = item.help||can.user.trans(can, item.index.split(".").pop(), ""))
|
||||||
var title = item.title || can.user.isMobile && (can.user.isEnglish(can)? name: (item.help||name)) || (!item.help || name == item.help || can.user.isEnglish(can)? name: name+"("+can.core.Split(item.help)[0]+")")
|
var title = item.title || can.user.isMobile && (can.user.isEnglish(can)? name: (item.help||name)) || (!item.help || name == item.help || can.user.isEnglish(can)? name: name+"("+can.core.Split(item.help)[0]+")")
|
||||||
target = can.base.isFunc(target)? target(): target
|
target = can.base.isFunc(target)? target(): target
|
||||||
return can.page.Append(can, target||can._output, [{view: [type, html.FIELDSET], style: item.style, list: [{type: html.LEGEND, list: [
|
return can.page.Append(can, target||can._output, [{view: [type, html.FIELDSET], style: item.style, list: [{type: html.LEGEND, list: [
|
||||||
@ -1035,6 +1036,9 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
|
|||||||
can.user.toast(can, "filter out "+count+" lines")
|
can.user.toast(can, "filter out "+count+" lines")
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
|
cacheClear: function(can, key) { delete(can._cache_data[key])
|
||||||
|
can.core.List(arguments, function(target, index) { index > 1 && delete(target._cache[key]) })
|
||||||
|
},
|
||||||
cache: function(can, next) { var list = can.base.getValid(can.base.Obj(can.core.List(arguments).slice(2)), [can._output])
|
cache: function(can, next) { var list = can.base.getValid(can.base.Obj(can.core.List(arguments).slice(2)), [can._output])
|
||||||
var data = can._cache_data = can._cache_data||{}, old = list[0]._cache_key
|
var data = can._cache_data = can._cache_data||{}, old = list[0]._cache_key
|
||||||
var key = next(function(save) { if (old) { data[old] = save } }, function(hash, load) { var bak = data[hash]; if (bak) { load(bak) } return hash })
|
var key = next(function(save) { if (old) { data[old] = save } }, function(hash, load) { var bak = data[hash]; if (bak) { load(bak) } return hash })
|
||||||
|
15
index.css
15
index.css
@ -196,7 +196,7 @@ div.project div.action div.item input:hover { border-right:var(--box-notice); }
|
|||||||
div.project div.action div.item.icons input { display:none; }
|
div.project div.action div.item.icons input { display:none; }
|
||||||
div.project div.action div.item.icons { background-color:var(--plugin-bg-color); padding:0; }
|
div.project div.action div.item.icons { background-color:var(--plugin-bg-color); padding:0; }
|
||||||
div.project div.list { margin-left:var(--button-margin); clear:both; }
|
div.project div.list { margin-left:var(--button-margin); clear:both; }
|
||||||
body.width6 div.project div.list { margin-left:var(--legend-margin); }
|
body.width6 fieldset.plugin>div.output>div.project div.list { margin-left:var(--legend-margin); }
|
||||||
// div.project div.list { border-left:var(--disable-fg-color) dashed 1px; }
|
// div.project div.list { border-left:var(--disable-fg-color) dashed 1px; }
|
||||||
div.project div.list fieldset { position:static; }
|
div.project div.list fieldset { position:static; }
|
||||||
div.project div.item.select {
|
div.project div.item.select {
|
||||||
@ -210,7 +210,7 @@ div.project div.item:not(.hide) {
|
|||||||
}
|
}
|
||||||
div.project div.item img { height:var(--action-height); width:var(--action-height); }
|
div.project div.item img { height:var(--action-height); width:var(--action-height); }
|
||||||
div.project div.item img { margin:0; }
|
div.project div.item img { margin:0; }
|
||||||
div.project div.item input:not([type=button]) { border-right:0; }
|
div.project div.item:not(:hover) input:not([type=button]) { border-right:0; }
|
||||||
div.project div.item.filter { padding:0; width:100%; position:sticky; top:0; }
|
div.project div.item.filter { padding:0; width:100%; position:sticky; top:0; }
|
||||||
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%; }
|
||||||
@ -237,6 +237,7 @@ div.toggle.project { top:20%; left:0; border-top-right-radius:var(--plugin-radiu
|
|||||||
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.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); }
|
||||||
|
fieldset.story div.project:not(.toggle) { width:230px; flex:0 0 230px; }
|
||||||
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 */
|
/* fieldset */
|
||||||
body.mobile div.item.online.state { display:none; }
|
body.mobile div.item.online.state { display:none; }
|
||||||
@ -471,6 +472,7 @@ fieldset.vimer.insert>div.action div.tabs.select { border-top:var(--box-danger3)
|
|||||||
fieldset.vimer.insert>legend { border-top:var(--box-danger3) !important; }
|
fieldset.vimer.insert>legend { border-top:var(--box-danger3) !important; }
|
||||||
fieldset.plugin.vimer>legend { margin-right:31px; }
|
fieldset.plugin.vimer>legend { margin-right:31px; }
|
||||||
div.action div.tabs:hover { background-color:var(--hover-bg-color); }
|
div.action div.tabs:hover { background-color:var(--hover-bg-color); }
|
||||||
|
fieldset.story div.action div.tabs:not(.select) { display:none; }
|
||||||
div.zone>div.item { background-color:var(--th-bg-color); }
|
div.zone>div.item { background-color:var(--th-bg-color); }
|
||||||
div.zone>div.list>div.zone>div.item { background-color:var(--th-bg-color); }
|
div.zone>div.list>div.zone>div.item { background-color:var(--th-bg-color); }
|
||||||
div.tabs div { background-color:var(--plugin-bg-color); }
|
div.tabs div { background-color:var(--plugin-bg-color); }
|
||||||
@ -526,8 +528,9 @@ fieldset.plugin { box-shadow:var(--plugin-box-shadow); border-radius:var(--plugi
|
|||||||
fieldset.story { box-shadow:var(--plugin-box-shadow); border-radius:var(--plugin-radius); }
|
fieldset.story { box-shadow:var(--plugin-box-shadow); border-radius:var(--plugin-radius); }
|
||||||
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); }
|
||||||
fieldset.plugin>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); }
|
body:not(.cmd) fieldset.plugin>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); }
|
||||||
fieldset.story>legend { box-shadow:var(--legend-box-shadow); border-top-left-radius:var(--plugin-radius); margin-right:var(--legend-margin); }
|
body:not(.cmd) fieldset.story>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); }
|
||||||
|
fieldset.story>legend { border-top-left-radius:var(--plugin-radius); }
|
||||||
fieldset.float>form.option input { border-top:0; }
|
fieldset.float>form.option input { border-top:0; }
|
||||||
fieldset.float>div.action input { border-top:0; }
|
fieldset.float>div.action input { 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); }
|
||||||
@ -795,9 +798,9 @@ body.print fieldset.draw div.output div.content svg { background-color:lightgray
|
|||||||
fieldset.Action>div.output>fieldset.ssh.cloud.profile { box-shadow:none; background-color:transparent; }
|
fieldset.Action>div.output>fieldset.ssh.cloud.profile { box-shadow:none; background-color:transparent; }
|
||||||
fieldset.Action>div.output>fieldset.ssh.cloud.profile:hover { box-shadow:none; }
|
fieldset.Action>div.output>fieldset.ssh.cloud.profile:hover { box-shadow:none; }
|
||||||
fieldset.Action>div.output>fieldset.ssh.cloud.profile>div.output { background-color:transparent; }
|
fieldset.Action>div.output>fieldset.ssh.cloud.profile>div.output { background-color:transparent; }
|
||||||
fieldset.Action>div.output>fieldset.plugin>legend { border-top:var(--box-notice3); border-top-left-radius:0; }
|
body:not(.cmd) fieldset.Action>div.output>fieldset.plugin>legend { border-top:var(--box-notice3); border-top-left-radius:0; }
|
||||||
// body.cmd fieldset.Action>div.output>fieldset.plugin>legend { min-width:var(--project-width); justify-content:center; }
|
// body.cmd fieldset.Action>div.output>fieldset.plugin>legend { min-width:var(--project-width); justify-content:center; }
|
||||||
fieldset.Action>div.output>fieldset.plugin>legend:not(:hover) { background-color:var(--output-bg-color); }
|
body:not(.cmd) fieldset.Action>div.output>fieldset.plugin>legend:not(:hover) { background-color:var(--output-bg-color); }
|
||||||
fieldset.Action:not(.horizon):not(.grid)>fieldset.plugin>form.option>div.item.text.path>input { width:var(--project-width); }
|
fieldset.Action:not(.horizon):not(.grid)>fieldset.plugin>form.option>div.item.text.path>input { width:var(--project-width); }
|
||||||
fieldset.web.code.docker.studio>div.output>fieldset>legend { display:none; }
|
fieldset.web.code.docker.studio>div.output>fieldset>legend { display:none; }
|
||||||
fieldset.web.code.docker.studio>div.output>fieldset>form.option>div:first-child { margin-left:var(--button-margin); }
|
fieldset.web.code.docker.studio>div.output>fieldset>form.option>div:first-child { margin-left:var(--button-margin); }
|
||||||
|
@ -4,7 +4,7 @@ Volcanos("core", {
|
|||||||
},
|
},
|
||||||
Keys: function() { var list = []
|
Keys: function() { var list = []
|
||||||
for (var i = 0; i < arguments.length; i++) { var v = arguments[i]; switch (typeof v) {
|
for (var i = 0; i < arguments.length; i++) { var v = arguments[i]; switch (typeof v) {
|
||||||
case code.OBJECT: for (var j = 0; j < v.length; j++) { list.push(v[j]) } break
|
case code.OBJECT: for (var j = 0; j < v.length; j++) { v[j] && list.push(v[j]) } break
|
||||||
case code.NUMBER: list.push(v+""); break
|
case code.NUMBER: list.push(v+""); break
|
||||||
case code.FUNCTION: v = v()
|
case code.FUNCTION: v = v()
|
||||||
default: v && list.push(v+"")
|
default: v && list.push(v+"")
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
Volcanos(chat.ONIMPORT, {
|
Volcanos(chat.ONIMPORT, {
|
||||||
_process: function(can, msg) {
|
_process: function(can, msg) { if (msg.IsErr()) { can.onappend.style(can, "warn", can.user.toastFailure(can, msg.Result())._target) }
|
||||||
if (msg.IsErr()) { can.onappend.style(can, "warn", can.user.toastFailure(can, msg.Result())._target) }
|
|
||||||
if (can.onimport[msg.OptionProcess()]) { return can.core.CallFunc([can.onimport, msg.OptionProcess()], {can: can, sub: can.sub, msg: msg, arg: msg.Option("_arg")}), true } },
|
if (can.onimport[msg.OptionProcess()]) { return can.core.CallFunc([can.onimport, msg.OptionProcess()], {can: can, sub: can.sub, msg: msg, arg: msg.Option("_arg")}), true } },
|
||||||
_location: function(can, msg, arg) { can.user.jumps(arg) },
|
_location: function(can, msg, arg) { can.user.jumps(arg) },
|
||||||
_replace: function(can, msg, arg) { location.replace(arg) },
|
_replace: function(can, msg, arg) { location.replace(arg) },
|
||||||
@ -173,7 +172,11 @@ Volcanos(chat.ONACTION, {list: ["刷新数据",
|
|||||||
},
|
},
|
||||||
"刷新数据": function(event, can) { can.Update(event, can.Input()), can.user.toastSuccess(can) },
|
"刷新数据": function(event, can) { can.Update(event, can.Input()), can.user.toastSuccess(can) },
|
||||||
"刷新界面": function(event, can) { var sub = can.sub; sub.onlayout._init(sub, sub.ConfHeight(), sub.ConfWidth()), can.user.toastSuccess(can) },
|
"刷新界面": function(event, can) { var sub = can.sub; sub.onlayout._init(sub, sub.ConfHeight(), sub.ConfWidth()), can.user.toastSuccess(can) },
|
||||||
"切换浮动": function(event, can, button, sub) { can.onaction._switch(can, sub, chat.FLOAT, function() { can.onmotion.hidden(can, can._action), can.onmotion.hidden(can, can._status), can.onmotion.float(can) }) },
|
"切换浮动": function(event, can, button, sub) {
|
||||||
|
can.onaction._switch(can, sub, chat.FLOAT, function() {
|
||||||
|
// can.onmotion.hidden(can, can._action), can.onmotion.hidden(can, can._status)
|
||||||
|
can.onmotion.float(can)
|
||||||
|
}) },
|
||||||
"切换全屏": function(event, can, button, sub) { can.onaction._switch(can, sub, chat.FULL, function() { can.page.style(can, can._target, html.LEFT, "", html.TOP, can.onexport.marginTop(), html.BOTTOM, "")
|
"切换全屏": function(event, can, button, sub) { can.onaction._switch(can, sub, chat.FULL, function() { can.page.style(can, can._target, html.LEFT, "", html.TOP, can.onexport.marginTop(), html.BOTTOM, "")
|
||||||
can.ConfHeight(can.page.height()-can.onexport.marginTop()-can.onexport.marginBottom(can)), can.ConfWidth(can.page.width())
|
can.ConfHeight(can.page.height()-can.onexport.marginTop()-can.onexport.marginBottom(can)), can.ConfWidth(can.page.width())
|
||||||
}) },
|
}) },
|
||||||
|
@ -292,7 +292,9 @@ Volcanos(chat.ONEXPORT, {
|
|||||||
session: function(can, key, value) { return can.misc[can.user.isWebview? "localStorage": "sessionStorage"](can, [can.Conf(ctx.INDEX), key, location.pathname].join(":"), value == ""? "": JSON.stringify(value)) },
|
session: function(can, key, value) { return can.misc[can.user.isWebview? "localStorage": "sessionStorage"](can, [can.Conf(ctx.INDEX), key, location.pathname].join(":"), value == ""? "": JSON.stringify(value)) },
|
||||||
action_value: function(can, key, def) { var value = can.Action(key); return can.base.isIn(value, ice.AUTO, key, undefined)? def: value },
|
action_value: function(can, key, def) { var value = can.Action(key); return can.base.isIn(value, ice.AUTO, key, undefined)? def: value },
|
||||||
tool: function(can) { can.misc.sessionStorage(can, [can.ConfIndex(), "tool"], JSON.stringify(can.page.Select(can, can._status, html.LEGEND, function(target) { return target._meta }))) },
|
tool: function(can) { can.misc.sessionStorage(can, [can.ConfIndex(), "tool"], JSON.stringify(can.page.Select(can, can._status, html.LEGEND, function(target) { return target._meta }))) },
|
||||||
hash: function(can, hash) { can.misc.SearchHash(can, hash) },
|
hash: function(can, hash) { can.misc.SearchHash(can, hash)
|
||||||
|
can.misc.localStorage(can, [can.ConfSpace()||can.misc.Search(can, ice.POD), can.ConfIndex(), "hash"], hash)
|
||||||
|
},
|
||||||
tabs: function(can) {},
|
tabs: function(can) {},
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONACTION, {
|
Volcanos(chat.ONACTION, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user