mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt some
This commit is contained in:
parent
821432e63d
commit
85d4f28161
@ -44,10 +44,10 @@ Volcanos("base", {
|
|||||||
if (str.indexOf(ice.HTTP) == 0) { var res = this._parse(str, {type: mdb.LINK, name: "", text: str}); return res.name = res._origin.split("://").pop().split(nfs.PS)[0], res }
|
if (str.indexOf(ice.HTTP) == 0) { var res = this._parse(str, {type: mdb.LINK, name: "", text: str}); return res.name = res._origin.split("://").pop().split(nfs.PS)[0], res }
|
||||||
try { res = JSON.parse(str), res.text = res.text||str, res.type = res.type||nfs.JSON } catch (e) { res = {type: mdb.TEXT, text: str} } return res
|
try { res = JSON.parse(str), res.text = res.text||str, res.type = res.type||nfs.JSON } catch (e) { res = {type: mdb.TEXT, text: str} } return res
|
||||||
},
|
},
|
||||||
ParseSize: function(size) { size = size.toLowerCase()
|
ParseSize: function(size) { size = size.toLowerCase().split(" ")[0]
|
||||||
if (size.endsWith("tb") || size.endsWith("t")) { return parseInt(size) * this._unit.t }
|
if (size.endsWith("tb") || size.endsWith("t")) { return parseInt(size) * this._unit.t }
|
||||||
if (size.endsWith("gb") || size.endsWith("g")) { return parseInt(size) * this._unit.g }
|
if (size.endsWith("gb") || size.endsWith("g") || size.endsWith("gib")) { return parseInt(size) * this._unit.g }
|
||||||
if (size.endsWith("mb") || size.endsWith("m")) { return parseInt(size) * this._unit.m }
|
if (size.endsWith("mb") || size.endsWith("m") || size.endsWith("mib")) { return parseInt(size) * this._unit.m }
|
||||||
if (size.endsWith("kb") || size.endsWith("k")) { return parseInt(size) * this._unit.k }
|
if (size.endsWith("kb") || size.endsWith("k")) { return parseInt(size) * this._unit.k }
|
||||||
return parseInt(size)
|
return parseInt(size)
|
||||||
}, _unit: {k: 1024, m: 1024*1024, g: 1024*1024*1024, t: 1024*1024*1024*1024},
|
}, _unit: {k: 1024, m: 1024*1024, g: 1024*1024*1024, t: 1024*1024*1024*1024},
|
||||||
|
@ -185,7 +185,7 @@ Volcanos("page", {
|
|||||||
} }); return table },
|
} }); return table },
|
||||||
RangeTable: function(can, table, index, asc) { index = can.base.isArray(index)? can.core.List(index, function(item) { if (item > -1) { return item } }): [index]; if (index.length == 0) { return }
|
RangeTable: function(can, table, index, asc) { index = can.base.isArray(index)? can.core.List(index, function(item) { if (item > -1) { return item } }): [index]; if (index.length == 0) { return }
|
||||||
var list = can.page.Select(can, table, html.TR, function(tr) { if (can.page.isDisplay(tr)) { return tr } }).slice(1)
|
var list = can.page.Select(can, table, html.TR, function(tr) { if (can.page.isDisplay(tr)) { return tr } }).slice(1)
|
||||||
var is_time = true, is_number = true; can.core.List(list, function(tr) { var text = tr.childNodes[index[0]].innerHTML; is_time = is_time && Date.parse(text) > 0, is_number = is_number && !isNaN(parseInt(text)) })
|
var is_time = true, is_number = true; can.core.List(list, function(tr) { var text = tr.childNodes[index[0]].innerHTML; is_time = is_time && Date.parse(text) > 0, is_number = is_number && !isNaN(parseFloat(text)) })
|
||||||
var num_list = can.core.List(list, function(tr) { var text = tr.childNodes[index[0]].innerHTML; return is_time? Date.parse(text): is_number? can.base.ParseSize(text): text })
|
var num_list = can.core.List(list, function(tr) { var text = tr.childNodes[index[0]].innerHTML; return is_time? Date.parse(text): is_number? can.base.ParseSize(text): text })
|
||||||
function isless(a, b, index) { if (a.childNodes[index[0]] && b.childNodes[index[0]]) {
|
function isless(a, b, index) { if (a.childNodes[index[0]] && b.childNodes[index[0]]) {
|
||||||
if (a.childNodes[index[0]].innerHTML < b.childNodes[index[0]].innerHTML) { return true }
|
if (a.childNodes[index[0]].innerHTML < b.childNodes[index[0]].innerHTML) { return true }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
fieldset.vimer>div.output>div.project>div.zone.space div.item.stop { color:gray; }
|
fieldset.vimer>div.output>div.project>div.zone.space div.item.stop { color:gray; }
|
||||||
fieldset.inner>div.output>div.layout>div.layout>div.content div.tips { display:none; }
|
fieldset.inner>div.output>div.layout>div.layout>div.content div.tips { display:none; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content div.tips { color:gray; font-style:italic; position:absolute; top:0; right:0; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.tips { color:gray; font-style:italic; position:absolute; top:0; right:0; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content input.current { background-color:transparent !important; color:transparent; padding-left:10px; height:20px; position:absolute; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content input.current { background-color:transparent; color:transparent; padding-left:10px; height:20px; position:absolute; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete { background-color:unset; padding-top:0; display:none; position:absolute; height:1px; overflow:visible; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete { background-color:unset; padding-top:0; display:none; position:absolute; height:1px; overflow:visible; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete div.prefix { color:transparent; white-space:pre; float:left; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete div.prefix { color:transparent; white-space:pre; float:left; }
|
||||||
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete table.content thead { display:none; }
|
fieldset.vimer>div.output>div.layout>div.layout div.content div.complete table.content thead { display:none; }
|
||||||
|
@ -4,3 +4,4 @@ div.json div.item div.item:hover { border:var(--box-border); }
|
|||||||
div.json div.item label.nonce { color:#9cbeca4f; }
|
div.json div.item label.nonce { color:#9cbeca4f; }
|
||||||
div.json div.item span.string { color:orange; }
|
div.json div.item span.string { color:orange; }
|
||||||
div.json label { user-select:none; }
|
div.json label { user-select:none; }
|
||||||
|
body:not(.windows) div.json { font-family:monospace; }
|
||||||
|
3
proto.js
3
proto.js
@ -99,6 +99,7 @@ var web = {CHAT: "chat",
|
|||||||
WIKI_PORTAL: "web.wiki.portal",
|
WIKI_PORTAL: "web.wiki.portal",
|
||||||
CHAT_MACOS_DESKTOP: "web.chat.macos.desktop",
|
CHAT_MACOS_DESKTOP: "web.chat.macos.desktop",
|
||||||
CHAT_MACOS_SESSION: "web.chat.macos.session",
|
CHAT_MACOS_SESSION: "web.chat.macos.session",
|
||||||
|
CHAT_IFRAME: "web.chat.iframe",
|
||||||
CHAT_FAVOR: "web.chat.favor",
|
CHAT_FAVOR: "web.chat.favor",
|
||||||
CHAT_FLOWS: "web.chat.flows",
|
CHAT_FLOWS: "web.chat.flows",
|
||||||
TEAM_PLAN: "web.team.plan",
|
TEAM_PLAN: "web.team.plan",
|
||||||
@ -327,7 +328,7 @@ var Volcanos = shy({iceberg: "/chat/", volcano: "/frame.js", cache: {}, pack: {}
|
|||||||
can.base.isFunc(item.Option)? can.core.List(item.Option(), function(key) {
|
can.base.isFunc(item.Option)? can.core.List(item.Option(), function(key) {
|
||||||
key.indexOf("_") == 0 || key.indexOf("user.") == 0 || set(key, item.Option(key))
|
key.indexOf("_") == 0 || key.indexOf("user.") == 0 || set(key, item.Option(key))
|
||||||
}): can.core.Item(can.base.isFunc(item)? item(): item, set)
|
}): can.core.Item(can.base.isFunc(item)? item(): item, set)
|
||||||
}); set(ice.MSG_HEIGHT, can.ConfHeight()||"32"), set(ice.MSG_WIDTH, can.ConfWidth()||"320"), set(ice.MSG_MODE, can.Mode())
|
}); set(ice.MSG_HEIGHT, (can.ConfHeight()||"32")+""), set(ice.MSG_WIDTH, (can.ConfWidth()||"320")+""), set(ice.MSG_MODE, can.Mode())
|
||||||
return msg
|
return msg
|
||||||
},
|
},
|
||||||
requestAction: function(event, button) { return can.request(event, {action: button, _toast: ice.PROCESS+" "+button}) },
|
requestAction: function(event, button) { return can.request(event, {action: button, _toast: ice.PROCESS+" "+button}) },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user