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-04-08 11:20:12 +08:00
parent b0d687654e
commit b296e255e1
6 changed files with 20 additions and 11 deletions

View File

@ -154,6 +154,7 @@ var yac = {
} }
var ssh = { var ssh = {
SHELL: "shell", SHELL: "shell",
CLOUD_PROFILE: "ssh.cloud.profile",
} }
var gdb = { var gdb = {
SIGNAL: "signal", SIGNAL: "signal",

View File

@ -398,7 +398,10 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
)) && (name = can.core.Keys(item.space||item._space, name)) )) && (name = can.core.Keys(item.space||item._space, name))
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: [item.icon && {icon: item.icon}, {text: title}]}, {view: [html.OPTION, html.FORM]}, html.ACTION, html.OUTPUT, html.STATUS]}]) return can.page.Append(can, target||can._output, [{view: [type, html.FIELDSET], style: item.style, list: [{type: html.LEGEND, list: [
item.icons && {img: can.misc.Resource(can, (item.icons.indexOf("/") == -1? "usr/icons/": "")+item.icons)},
item.icon && {icon: item.icon}, {text: title},
]}, {view: [html.OPTION, html.FORM]}, html.ACTION, html.OUTPUT, html.STATUS]}])
}, },
input: function(can, item, value, target, style) { if ([html.BR, html.HR].indexOf(item.type) > -1) { return can.page.Append(can, target, [item]) } input: function(can, item, value, target, style) { if ([html.BR, html.HR].indexOf(item.type) > -1) { return can.page.Append(can, target, [item]) }
var _icon = [], _item = can.base.Copy({className: "", type: "", name: ""}, item), input = can.page.input(can, _item, value) var _icon = [], _item = can.base.Copy({className: "", type: "", name: ""}, item), input = can.page.input(can, _item, value)

View File

@ -378,7 +378,7 @@ div.output.flex { overflow:hidden; align-items:flex-start; justify-content: flex
div.layout.flex>* { float:left; clear:none; } div.layout.flex>* { float:left; clear:none; }
div.flex:not(.hide) { display:flex; align-items:center; justify-content:center; } div.flex:not(.hide) { display:flex; align-items:center; justify-content:center; }
div.output.flex:not(.hide) { display:flex; align-items:flex-start; justify-content:flex-start; } div.output.flex:not(.hide) { display:flex; align-items:flex-start; justify-content:flex-start; }
fieldset>div.status>legend { margin-right:var(--button-margin); float:right; clear:none; border-bottom-left-radius:var(--button-margin); border-bottom-right-radius:var(--button-margin); } fieldset>div.status>legend { margin-right:var(--button-margin); float:right; clear:none; }
fieldset>div.status>legend>span.remove { margin-left:var(--input-margin); } fieldset>div.status>legend>span.remove { margin-left:var(--input-margin); }
fieldset>div.status>legend>span.remove:hover { background-color:var(--hover-bg-color); } fieldset>div.status>legend>span.remove:hover { background-color:var(--hover-bg-color); }
fieldset>div.status>legend:not(:hover)>span.remove { visibility:hidden; } fieldset>div.status>legend:not(:hover)>span.remove { visibility:hidden; }
@ -489,7 +489,7 @@ div.profile:not(.toggle) { border-left:var(--box-border); }
div.display:not(.toggle) { border-top:var(--box-border); } div.display:not(.toggle) { border-top:var(--box-border); }
fieldset>div.status { border-top:var(--status-border); } fieldset>div.status { border-top:var(--status-border); }
/* border-radius */ /* border-radius */
legend { border-top-left-radius:var(--plugin-radius); } fieldset.plugin>legend { border-top-left-radius:var(--plugin-radius); }
body.mobile legend { border-top-right-radius:var(--plugin-radius); } body.mobile legend { border-top-right-radius:var(--plugin-radius); }
select { border-radius:var(--button-radius); } select { border-radius:var(--button-radius); }
input[type=button] { border-radius:var(--button-radius); } input[type=button] { border-radius:var(--button-radius); }
@ -540,6 +540,7 @@ body div.path { font-family:var(--code-font-family); }
body div.carte { font-family:var(--code-font-family); } body div.carte { font-family:var(--code-font-family); }
body { font-size:var(--body-font-size); } body { font-size:var(--body-font-size); }
legend { font-size:var(--legend-font-size); line-height:30px; height:var(--action-height); } legend { font-size:var(--legend-font-size); line-height:30px; height:var(--action-height); }
legend img { margin-right:var(--input-margin); height:32px }
select, input { font-size:var(--body-font-size); height:var(--action-height); } input::placeholder, textarea::placeholder { font-style:italic; color:var(--disable-fg-color); } select, input { font-size:var(--body-font-size); height:var(--action-height); } input::placeholder, textarea::placeholder { font-style:italic; color:var(--disable-fg-color); }
input[type=checkbox] { height:16px; width:16px; } input[type=checkbox] { height:16px; width:16px; }
textarea { font-size:var(--body-font-size); padding:var(--input-padding); height:var(--textarea-height); width:100%; outline:none; resize:vertical; } textarea { font-size:var(--body-font-size); padding:var(--input-padding); height:var(--textarea-height); width:100%; outline:none; resize:vertical; }
@ -568,8 +569,8 @@ fieldset>div.status { font-family:var(--status-font-family); font-style:italic;
fieldset>div.status>div.item { padding:var(--input-padding); height:30px; } fieldset>div.status>div.item { padding:var(--input-padding); height:30px; }
fieldset>div.status>div.item>label { font-size:var(--status-font-size); } fieldset>div.status>div.item>label { font-size:var(--status-font-size); }
fieldset>div.status>div.item>span { margin-left:var(--input-padding); } fieldset>div.status>div.item>span { margin-left:var(--input-padding); }
fieldset>div.status>legend { font-style:italic; height:30px; } fieldset>div.status>legend { font-style:italic; border-left:var(--box-border3); height:30px; }
fieldset>div.status>legend.select { border-left:var(--box-notice); border-radius:0; } fieldset>div.status>legend.select { border-left:var(--box-notice3); border-radius:0; }
fieldset.plug>div.status { height:31px; } fieldset.plug>div.status { height:31px; }
/* icon */ /* icon */
i.bi.bi-toggle-on { color:var(--notice-bg-color); } i.bi.bi-toggle-on { color:var(--notice-bg-color); }
@ -757,6 +758,9 @@ body.print div.float { background-color:snow; }
body.print fieldset.draw div.output { background-color:lightgray; } body.print fieldset.draw div.output { background-color:lightgray; }
body.print fieldset.draw div.output div.content svg { background-color:lightgray; } body.print fieldset.draw div.output div.content svg { background-color:lightgray; }
/* misc */ /* misc */
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>div.output { background-color:transparent; }
fieldset.web.code.docker.studio>div.output>fieldset { margin:0; } fieldset.web.code.docker.studio>div.output>fieldset { margin:0; }
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); }

View File

@ -3,6 +3,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) { var river = can.Conf(chat.R
var _select; can.onmotion.clear(can), can.onaction.layout(can, list[3]) var _select; can.onmotion.clear(can), can.onaction.layout(can, list[3])
can.core.Next(msg.Table(), function(item, next, index) { item.type = chat.PLUGIN, item.mode = can.Mode(); if (item.deleted == ice.TRUE) { return next() } can.core.Next(msg.Table(), function(item, next, index) { item.type = chat.PLUGIN, item.mode = can.Mode(); if (item.deleted == ice.TRUE) { return next() }
if (msg.Length() == 1) { item.height = can.ConfHeight()-can.Conf(html.MARGIN_Y), can.base.isIn(item.index, web.CHAT_MACOS_DESKTOP, web.CHAT_MESSAGE, web.WIKI_PORTAL) && (item.style = html.OUTPUT) } if (msg.Length() == 1) { item.height = can.ConfHeight()-can.Conf(html.MARGIN_Y), can.base.isIn(item.index, web.CHAT_MACOS_DESKTOP, web.CHAT_MESSAGE, web.WIKI_PORTAL) && (item.style = html.OUTPUT) }
can.base.isIn(item.index, ssh.CLOUD_PROFILE) && (item.style = html.OUTPUT)
list.length == 0 && can.user.info.nodetype == web.SERVER && item._command == web.DREAM && (list = [river, storm, item._command]) list.length == 0 && can.user.info.nodetype == web.SERVER && item._command == web.DREAM && (list = [river, storm, item._command])
can.onappend.plugin(can, item, function(sub, meta, skip) { if (meta.index == "can._notfound" && !can.misc.isDebug(can)) { return skip || next() } can.onappend.plugin(can, item, function(sub, meta, skip) { if (meta.index == "can._notfound" && !can.misc.isDebug(can)) { return skip || next() }
sub.run = function(event, cmds, cb) { return can.run(can.request(event, {pod: meta.pod||meta.space}), (can.base.beginWith(meta.index, "can.")? [meta.index]: [river, storm, meta.id||meta.index]).concat(cmds), cb) } sub.run = function(event, cmds, cb) { return can.run(can.request(event, {pod: meta.pod||meta.space}), (can.base.beginWith(meta.index, "can.")? [meta.index]: [river, storm, meta.id||meta.index]).concat(cmds), cb) }
@ -162,7 +163,7 @@ Volcanos(chat.ONENGINE, {_engine: function(event, sup, msg, can, cmds, cb) {
}), cb(msg) }), cb(msg)
}) })
} else { can.core.List(storm.list, function(item) { can.base.isString(item) && (item = {index: item}) } else { can.core.List(storm.list, function(item) { can.base.isString(item) && (item = {index: item})
msg.Push(ctx.INDEX, item.index||"") msg.Push(ctx.INDEX, item.index||"").Push(mdb.ICONS, item.icons||"")
msg.Push(mdb.NAME, item.name||"").Push(mdb.HELP, item.help||"") msg.Push(mdb.NAME, item.name||"").Push(mdb.HELP, item.help||"")
msg.Push(ctx.INPUTS, JSON.stringify(item.inputs)).Push(ctx.FEATURE, JSON.stringify(item.feature)) msg.Push(ctx.INPUTS, JSON.stringify(item.inputs)).Push(ctx.FEATURE, JSON.stringify(item.feature))
msg.Push(ctx.ARGS, item.args||"[]").Push(ctx.STYLE, item.style||"").Push(ctx.DISPLAY, item.display||"") msg.Push(ctx.ARGS, item.args||"[]").Push(ctx.STYLE, item.style||"").Push(ctx.DISPLAY, item.display||"")

View File

@ -55,7 +55,7 @@ Volcanos(chat.ONIMPORT, {
can.onappend._toggle(can, can.ui.display, function(event) { can.onaction.prev(event, can) }, function(event) { can.onaction.next(event, can) }) can.onappend._toggle(can, can.ui.display, function(event) { can.onaction.prev(event, can) }, function(event) { can.onaction.next(event, can) })
can.Status({begin: begin, limit: limit, total: list.length}) can.Status({begin: begin, limit: limit, total: list.length})
}, },
layout: function(can) { can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) { layout: function(can) { can.ui.layout && can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) {
can.page.Select(can, can.ui.content, can.page.Keys(html.IMG, html.VIDEO), function(target) { can.page.Select(can, can.ui.content, can.page.Keys(html.IMG, html.VIDEO), function(target) {
can.user.isMobile && !can.user.isLandscape()? can.page.style(can, target, html.HEIGHT, "", html.MAX_HEIGHT, height, html.MAX_WIDTH, width): can.user.isMobile && !can.user.isLandscape()? can.page.style(can, target, html.HEIGHT, "", html.MAX_HEIGHT, height, html.MAX_WIDTH, width):
can.page.style(can, target, html.MAX_HEIGHT, height, html.MAX_WIDTH, width) can.page.style(can, target, html.MAX_HEIGHT, height, html.MAX_WIDTH, width)

View File

@ -126,10 +126,10 @@ Volcanos(chat.ONACTION, {list: ["刷新数据",
["视图", "参数", "插件", ["视图", "参数", "插件",
function(can) { if (can._action.innerHTML) { return "操作" } }, function(can) { if (can._action.innerHTML) { return "操作" } },
function(can) { if (can._status.innerHTML) { return "状态" } }, function(can) { if (can._status.innerHTML) { return "状态" } },
function(can) { if (can.sub.ui.project) { return "专注" } }, function(can) { if (can.sub && can.sub.ui.project) { return "专注" } },
function(can) { if (can.sub.ui.project) { return "项目" } }, function(can) { if (can.sub && can.sub.ui.project) { return "项目" } },
function(can) { if (can.sub.ui.profile) { return "预览" } }, function(can) { if (can.sub && can.sub.ui.profile) { return "预览" } },
function(can) { if (can.sub.ui.display) { return "演示" } }, function(can) { if (can.sub && can.sub.ui.display) { return "演示" } },
], ],
function(can) { if (can.misc.Search(can, ice.MSG_DEBUG)) { function(can) { if (can.misc.Search(can, ice.MSG_DEBUG)) {
return ["调试", return ["调试",