mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
opt code
This commit is contained in:
parent
1ca5eea8e1
commit
13a9429bd5
@ -148,7 +148,7 @@ div.tabs span.icon:hover { background-color:aliceblue; color:black; }
|
||||
div.tabs>div:hover span.icon { visibility:visible; }
|
||||
div.action>div.tabs:hover span.icon { visibility:visible; }
|
||||
div.tabs>div.select span.icon { visibility:visible; }
|
||||
// div.code { position:sticky; left:0; }
|
||||
fieldset>div.output>div.code { position:sticky; left:0; }
|
||||
div.plug { font-style:italic; }
|
||||
div.item.text { position:relative; }
|
||||
div.item.text>span.icon.delete { font-size:20px; line-height:28px; position:absolute; top:2px; right:10px; visibility:hidden; }
|
||||
|
@ -89,7 +89,7 @@ Volcanos("misc", {
|
||||
WSS: function(can, args, cb, onopen, onclose, onerror, _msg) { if (can.user.isIE) { return }
|
||||
var url = location.protocol.replace(ice.HTTP, "ws")+"//"+location.host+"/space/"
|
||||
if (url.indexOf(html.CHROME) == 0) { url = "ws://localhost:9020/space/" }
|
||||
var socket = new WebSocket(can.base.MergeURL(url, args)); _msg = _msg || can.request()._caller()
|
||||
try { var socket = new WebSocket(can.base.MergeURL(url, args)); _msg = _msg || can.request()._caller() } catch {}
|
||||
socket.onclose = function() { can.misc.Log(html.WSS, cli.CLOSE, args)
|
||||
can.base.isFunc(onclose)? onclose(socket): can.core.Timer(can.base.random(3000, 100), function() {
|
||||
args.name = args.name||can._wss_name, can.misc.WSS(can, args, cb, onopen, onerror, onclose, _msg)
|
||||
|
@ -36,7 +36,9 @@ Volcanos(chat.ONACTION, {_init: function(can, target) {
|
||||
can._root.River && can.onmotion.delay(can, function() { if (can.Mode()) { return } var gt = can.page.unicode.next, lt = can.page.unicode.prev, river = can._root.River._target
|
||||
var target = can.page.Append(can, can._target, [{view: [[html.TOGGLE, chat.PROJECT], "", can.page.isDisplay(river)? lt: gt], onclick: function(event) {
|
||||
can.page.Modify(can, target, (can._river_show = can.onmotion.toggle(can, river))? lt: gt), can.onaction.layout(can)
|
||||
can.misc.sessionStorage(can, "river:hide", can._river_show? "": ice.TRUE)
|
||||
}}])._target; can._toggle = target
|
||||
can.misc.sessionStorage(can, "river:hide") == ice.TRUE && target.click()
|
||||
}); if (!can.Conf(chat.TOOL) && !can.user.mod.isCmd) { return } can._names = location.pathname
|
||||
can.Conf(chat.TOOL)? can.onappend.layout(can, can._output, FLOW, can.core.List(can.Conf(chat.TOOL), function(item, index, list) { item.type = chat.PLUGIN
|
||||
if (list.length == 1) { can.user.title(item.index), can.onaction._onaction_cmd(can), item.mode = chat.CMD, item.opts = can.misc.Search(can) } return item
|
||||
|
@ -5,7 +5,9 @@ Volcanos(chat.ONFIGURE, {key: {
|
||||
}) },
|
||||
_show: function(can, msg, cb, target, name) { if (msg.Length() == 0 || msg.Length() == 1 && msg.Append(name) == target.value) { 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
|
||||
return {text: [value, html.TD, value == ""? html.HR: ""], style: msg.append && msg.append.length == 1? kit.Dict(html.MIN_WIDTH, target.offsetWidth-16): {}, onclick: function(event) {
|
||||
can.close(); if (msg.cb && msg.cb[index]) { return msg.cb[index](value) }
|
||||
var _cb = can.Conf("select"); if (_cb) { return _cb(target.value = value) } can.base.isFunc(cb) && cb(can, value, target.value)
|
||||
|
@ -25,6 +25,7 @@ fieldset.inner>div.output>div.layout.flow>div.layout>div.content * { font-family
|
||||
fieldset.inner>div.output>div.layout.flow>div.tabs { font-family:monospace; font-size:14px; display:none; }
|
||||
fieldset.inner>div.output>div.layout.flow>div.path { font-family:monospace; font-size:14px; display:none; }
|
||||
fieldset.inner>div.output>div.layout.flow>div.display div.status>div { padding:5px; float:left; }
|
||||
fieldset.inner>div.output>div.layout.flow>div.layout>div.profile div.status>div { padding:5px; float:left; }
|
||||
fieldset.inner>div.output>div.layout.flow { position:relative; }
|
||||
fieldset.inner.cmd>div.output>div.project { border-right:dimgray solid 1px; }
|
||||
fieldset.inner.cmd>div.output div.profile { border-left:dimgray solid 1px; }
|
||||
|
@ -216,7 +216,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
|
||||
if (cmds.length > 0 && cmds[0] == ctx.ACTION) {
|
||||
can.run(can.request(event, can.Option()), cmds, cb||function(msg) { can.onappend._output(sub, msg, sub.Conf(ctx.DISPLAY)) }, true)
|
||||
} else { can.onappend._output(sub, can.request(event), sub.Conf(ctx.DISPLAY)) }
|
||||
}, can.db.toolkit[url.split(ice.QS)[0]] = sub, can.base.isFunc(cb)? cb(sub): sub.select(), can.page.Modify(can, sub._legend, url)
|
||||
}, can.db.toolkit[url.split(ice.QS)[0]] = sub, can.base.isFunc(cb)? cb(sub): sub.select(), can.page.Modify(can, sub._legend, can.base.trimPrefix(url, "inner/"))
|
||||
})
|
||||
},
|
||||
}, [""])
|
||||
|
Loading…
x
Reference in New Issue
Block a user