mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
3d919855ec
commit
18ab2b8534
2
frame.js
2
frame.js
@ -526,7 +526,7 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
|
||||
clearCarte: function(can) { can.page.SelectChild(can, document.body, "div.carte.float", function(target) { can.page.Remove(can, target) }) },
|
||||
clearInput: function(can) { can.page.SelectChild(can, document.body, "div.input.float", function(target) { can.page.Remove(can, target) }) },
|
||||
hidden: function(can, target, show) { target = target||can._target
|
||||
if (target.length > 0) { return can.core.List(target, function(target) { can.onmotion.hidden(can, target, show) }) }
|
||||
if (!target.tagName && target.length > 0) { return can.core.List(target, function(target) { can.onmotion.hidden(can, target, show) }) }
|
||||
return can.page.ClassList.set(can, target, html.HIDE, !show)? target._hide && target._hide(): target._show && target._show(), show
|
||||
},
|
||||
toggle: function(can, target, show, hide) { target = target||can._target
|
||||
|
11
index.css
11
index.css
@ -58,6 +58,13 @@ fieldset>form.option>div.item.select { border-radius:5px; }
|
||||
fieldset>div.action>div.item.select { border-radius:5px; }
|
||||
fieldset>div.action>div.item.button { border-radius:5px; }
|
||||
fieldset>div.action>div.item { margin-right:10px; box-shadow:var(--box-shadow); }
|
||||
|
||||
fieldset.web.code.docker.studio>div.action>div.item { font-style:italic; height:32px; padding:5px 10px; }
|
||||
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>form.option>div:first-child { margin-left:10px; }
|
||||
fieldset.web.code.docker.studio>div.output { padding:10px; }
|
||||
|
||||
fieldset>div.output { width:100%; }
|
||||
fieldset>div.output table.content input { margin-right:10px; box-shadow:var(--box-shadow); }
|
||||
fieldset>div.status { width:100%; }
|
||||
@ -151,7 +158,7 @@ div.item.button>span.icon.create { font-size:32px; line-height:32px; translate:0
|
||||
div.tabs span.icon { margin-left:5px; visibility:hidden; }
|
||||
div.tabs>div.select span.icon { visibility:visible; }
|
||||
div.tabs>div:hover span.icon { visibility:visible; }
|
||||
div.tabs:hover span.icon { visibility:visible; }
|
||||
div.tabs:hover>span.icon { visibility:visible; }
|
||||
fieldset.plug>form.option>div.icon { margin-left:5px; }
|
||||
fieldset.panel>div.action>div.button>span.icon { display:none; }
|
||||
fieldset.plugin:not(.story):not(.float):not(.full):not(.cmd)>form.option>div.icon { display:none; }
|
||||
@ -208,7 +215,7 @@ div.content>div.toggle:hover { background-color:var(--hover-bg-color); color:var
|
||||
div.content>div.toggle.project { top:20%; left:0; height:80px; width:unset; padding-top:25px; transform:scale(1, 3); border:none; }
|
||||
div.content>div.toggle.profile { top:20%; right:0; height:80px; padding-top:25px; transform:scale(1, 3); border:none; }
|
||||
div.content>div.toggle.display { left:20%; bottom:0; width:80px; text-align:center; transform:scale(3, 1); border:none; }
|
||||
div.project:not(.toggle) { border-right:var(--box-border); width:230px; }
|
||||
div.project:not(.toggle) { border-right:var(--box-border); width:230px; flex:0 0 230px; }
|
||||
div.profile:not(.toggle) { border-left:var(--box-border); min-width:230px; }
|
||||
div.display:not(.toggle) { border-top:var(--box-border); }
|
||||
/* table card */
|
||||
|
@ -74,6 +74,11 @@ Volcanos("user", {
|
||||
"full", "全屏", "Close", "关闭", "Close Other", "关闭其它", "Rename Tabs", "重命名",
|
||||
"add", "添加", "opt", "优化", "fix", "修复", "message", "信息",
|
||||
"max", "最大", "auto", "自动",
|
||||
"push", "上传", "pull", "下载",
|
||||
"logs", "日志",
|
||||
"configs", "配置",
|
||||
"inspect", "详情",
|
||||
"portal", "首页",
|
||||
"confirm", "确定",
|
||||
"upgrade", "升级",
|
||||
"compile", "编译",
|
||||
|
@ -3,7 +3,7 @@ Volcanos(chat.ONFIGURE, {key: {
|
||||
name == ctx.INDEX && can.core.Item(can.onengine.plugin.meta, function(key) { msg.Push(ctx.INDEX, can.core.Keys(ice.CAN, key)) })
|
||||
can._show(can, msg, cb, target, name)
|
||||
}) },
|
||||
_show: function(can, msg, cb, target, name) { if (msg.Length() == 0 || msg.Length() == 1 && msg.Append(name) == target.value && target.value != "") { return can.onmotion.hidden(can) }
|
||||
_show: function(can, msg, cb, target, name) { if (msg.Length() == 0 || msg.Length() == 1 && msg.Append(name) == target.value && target.value != "" || msg.Length() == 1 && msg.Append(name) == "") { return can.onmotion.hidden(can) }
|
||||
if (can.base.isIn(msg.append[msg.append.length-1], ctx.ACTION, "cb")) { msg.append = msg.append.slice(0, -1) } var list = {}
|
||||
can.onmotion.clear(can), can.onappend.table(can, msg, function(value, key, index, item) { value = item[key]
|
||||
if (msg.append.length == 1 && index < 100 && list[value]) { return } list[value] = true
|
||||
|
@ -44,18 +44,18 @@ Volcanos(chat.ONFIGURE, {
|
||||
}, true) } if (path.length == 1) { return show(target, zone, path[0]) } can.page.Remove(can, zone._action)
|
||||
can.onimport.zone(can, can.core.List(path, function(path) { return kit.Dict(mdb.NAME, path, path == args[0]? chat._INIT: chat._DELAY_INIT, function(target, zone) { show(target, zone, path) }) }), target)
|
||||
},
|
||||
xterm: function(can, target, zone) { can.onimport._zone(can, zone, web.CODE_XTERM, function(sub, msg) {
|
||||
sub.onexport.record = function(sub, value, key, item) { can.onimport.tabview(can, "", [web.CODE_XTERM, item.hash, item.name||item.type].join(mdb.FS), ctx.INDEX) }
|
||||
}) },
|
||||
favor: function(can, target, zone) { can.onimport._zone(can, zone, web.CHAT_FAVOR, function(sub, msg) {
|
||||
sub.onexport.record = function(sub, value, key, item, event) { switch (item.type) {
|
||||
case nfs.FILE: var ls = can.onexport.split(can, item.text); can.onimport.tabview(can, ls[0], ls[1]); break
|
||||
case mdb.LINK: can.onimport.tabview(can, "", item.text, web.SPACE); break
|
||||
case ctx.INDEX: can.onimport.tabview(can, "", item.text, ctx.INDEX); break
|
||||
case ssh.SHELL: can.onimport.tabview(can, "", [web.CODE_XTERM, item.text].join(mdb.FS), ctx.INDEX); break
|
||||
case cli.OPENS: can.runAction(event, cli.OPENS, [item.text]); break
|
||||
} }
|
||||
}) },
|
||||
// xterm: function(can, target, zone) { can.onimport._zone(can, zone, web.CODE_XTERM, function(sub, msg) {
|
||||
// sub.onexport.record = function(sub, value, key, item) { can.onimport.tabview(can, "", [web.CODE_XTERM, item.hash, item.name||item.type].join(mdb.FS), ctx.INDEX) }
|
||||
// }) },
|
||||
// favor: function(can, target, zone) { can.onimport._zone(can, zone, web.CHAT_FAVOR, function(sub, msg) {
|
||||
// sub.onexport.record = function(sub, value, key, item, event) { switch (item.type) {
|
||||
// case nfs.FILE: var ls = can.onexport.split(can, item.text); can.onimport.tabview(can, ls[0], ls[1]); break
|
||||
// case mdb.LINK: can.onimport.tabview(can, "", item.text, web.SPACE); break
|
||||
// case ctx.INDEX: can.onimport.tabview(can, "", item.text, ctx.INDEX); break
|
||||
// case ssh.SHELL: can.onimport.tabview(can, "", [web.CODE_XTERM, item.text].join(mdb.FS), ctx.INDEX); break
|
||||
// case cli.OPENS: can.runAction(event, cli.OPENS, [item.text]); break
|
||||
// } }
|
||||
// }) },
|
||||
space: function(can, target, zone) { can.onimport._zone(can, zone, web.DREAM, function(sub, msg) {
|
||||
sub.onimport._open = function(_, msg, arg) {
|
||||
var link = can.misc.ParseURL(can, arg); if (link.pod) { can.onimport.tabview(can, "", link.pod, web.SPACE), sub.Update(); return }
|
||||
|
36
plugin/story/studio.js
Normal file
36
plugin/story/studio.js
Normal file
@ -0,0 +1,36 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg, cb) { cb && cb(msg), can.onmotion.clear(can)
|
||||
can.isCmdMode() && can.sup.onimport.size(can.sup, can.page.height(), can.page.width())
|
||||
can.onimport._tabs(can, msg) // can.onimport._full(can, msg)
|
||||
},
|
||||
_tabs: function(can, msg) {
|
||||
can.onappend.style(can, "studio")
|
||||
msg.Table(function(value, index) { value.nick = value.help||value.name.split(" ")[0]
|
||||
var target = can.onimport.item(can, value, function() {
|
||||
if (can.onmotion.cache(can, function() { return value.index }, can._output)) { return }
|
||||
can.onappend.plugin(can, value, function(sub) {
|
||||
sub.onexport.output = function() { sub.onimport.size(sub, can.ConfHeight()-20, can.ConfWidth()-20) }
|
||||
target.oncontextmenu = function(event) {
|
||||
sub._legend.onclick(event)
|
||||
}
|
||||
}, can._output)
|
||||
|
||||
}, function(event) {
|
||||
}, can._action); index == 0 && target.click()
|
||||
})
|
||||
},
|
||||
_full: function(can, msg) {
|
||||
can.ui = can.onappend.layout(can), can.page.style(can, can.ui.content, html.PADDING, 10)
|
||||
msg.Table(function(value, index) { value.nick = value.help||value.name.split(" ")[0]
|
||||
var target = can.onimport.item(can, value, function(event) {
|
||||
if (can.onmotion.cache(can, function() { return value.index }, can.ui.content)) { return }
|
||||
can.onappend.plugin(can, value, function(sub) {
|
||||
sub.onexport.output = function() { sub.onimport.size(sub, can.ConfHeight()-20, can.ConfWidth()-can.ui.project.offsetWidth-20) }
|
||||
}, can.ui.content)
|
||||
}, function() {}); index == 0 && target.click()
|
||||
})
|
||||
},
|
||||
layout: function(can) {
|
||||
can.page.styleHeight(can, can._output, can.ConfHeight())
|
||||
},
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user