diff --git a/frame.js b/frame.js
index 85ce1aed..0066f1c6 100644
--- a/frame.js
+++ b/frame.js
@@ -896,7 +896,8 @@ Volcanos(chat.ONKEYMAP, {_init: function(can, target) { target = target||documen
can.page.Select(can, tr, html.TD, function(td) { has = has || td.innerText.indexOf(target.value)>-1 }), can.page.ClassList.set(can, tr, html.HIDDEN, !has)
}), target._index = -1, target._value = target.value
var total = can.page.Select(can, can._output, [html.TBODY, html.TR], function(tr) { if (!can.page.ClassList.has(can, tr, html.HIDDEN)) { return tr } }).length
- total == 0 && can.base.isFunc(cb) && cb(), can.Status(kit.Dict(mdb.TOTAL, total, mdb.INDEX, target._index))
+ can.Status(kit.Dict(mdb.TOTAL, total, mdb.INDEX, target._index))
+ total == 0 && can.base.isFunc(cb) && cb()
},
selectOutput: function(event, can) { if (!event.ctrlKey || event.key < "0" || event.key > "9") { return }
event.key == "0"? can.onimport._back(can): can.page.Select(can, can._output, html.TR, function(tr, index) { if (index == event.key) {
diff --git a/index.css b/index.css
index 290bec93..9690478e 100644
--- a/index.css
+++ b/index.css
@@ -152,7 +152,7 @@ body>div.input textarea { height:120px; width:240px !important; }
body>div.input div.action { width:100%; position:sticky; bottom:0; }
body>div.input div.action>div.item { margin:5px; float:right; }
body>div.input div.action>div.item>input[type=button] { width:110px; }
-body>div.input.login>div.output { text-align:center; }
+body>div.input.login>div.output { text-align:center; clear:both; }
body>div.input.login>div.output div.sso { display:flex; justify-content:center; cursor:pointer; }
body>div.input.login>div.output div.sso:hover { background-color:var(--hover-bg-color); }
body>div.input.login>div.output div.sso>img { height:32px; }
@@ -493,6 +493,15 @@ fieldset.qrcode>div.output div.code { padding:0; }
fieldset.macos.desktop.cmd>div.output>fieldset.macos.dock { z-index:11; }
fieldset.web.code.git.status>div.output table.content { width:100%; }
fieldset.web.code.git>div.output>fieldset.web.code.inner>div.output { overflow:auto; }
+
+fieldset.web.mall.region>div.output>table.content td:nth-child(3) { text-align:right; }
+fieldset.web.mall.region>div.output>table.content td:nth-child(4) { text-align:right; }
+fieldset.web.mall.region>div.output>table.content td:nth-child(5) { text-align:right; }
+
+fieldset.web.mall.region>div.output>table.content td:nth-child(3) { text-align:right; }
+fieldset.web.mall.region>div.output>table.content td:nth-child(4) { text-align:right; }
+fieldset.web.mall.region>div.output>table.content td:nth-child(5) { text-align:right; }
+
fieldset.web.chat.iframe>form.option input[name=hash] { width:320px; }
fieldset.can.view { font-size:14px; }
fieldset.can.data { font-size:14px; }
diff --git a/lib/base.js b/lib/base.js
index 98d11104..f9f7f3bc 100644
--- a/lib/base.js
+++ b/lib/base.js
@@ -54,17 +54,17 @@ Volcanos("base", {
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().split(" ")[0]
- if (size.endsWith("tb") || size.endsWith("t")) { return parseInt(size) * this._unit.t }
- if (size.endsWith("gb") || size.endsWith("g") || size.endsWith("gib")) { return parseInt(size) * this._unit.g }
- 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 }
- return parseInt(size)
+ if (size.endsWith("tb") || size.endsWith("t")) { return parseFloat(size) * this._unit.t }
+ if (size.endsWith("gb") || size.endsWith("g") || size.endsWith("gib")) { return parseFloat(size) * this._unit.g }
+ if (size.endsWith("mb") || size.endsWith("m") || size.endsWith("mib")) { return parseFloat(size) * this._unit.m }
+ if (size.endsWith("kb") || size.endsWith("k")) { return parseFloat(size) * this._unit.k }
+ return parseFloat(size)
}, _unit: {k: 1024, m: 1024*1024, g: 1024*1024*1024, t: 1024*1024*1024*1024},
- Size: function(size) { size = parseInt(size); var n = 100, k = this._unit.k, m = this._unit.m, g = this._unit.g, t = this._unit.t
- if (size > t) { return parseInt(size/t) + nfs.PT + parseInt(size/g%k*n/k) + "T" }
- if (size > g) { return parseInt(size/g) + nfs.PT + parseInt(size/m%k*n/k) + "G" }
- if (size > m) { return parseInt(size/m) + nfs.PT + parseInt(size/k%k*n/k) + "M" }
- if (size > k) { return parseInt(size/k) + nfs.PT + parseInt(size%k*n/k) + "K" }
+ Size: function(size) { size = parseFloat(size); var n = 100, k = this._unit.k, m = this._unit.m, g = this._unit.g, t = this._unit.t
+ if (size > t) { return parseFloat(size/t) + nfs.PT + parseFloat(size/g%k*n/k) + "T" }
+ if (size > g) { return parseFloat(size/g) + nfs.PT + parseFloat(size/m%k*n/k) + "G" }
+ if (size > m) { return parseFloat(size/m) + nfs.PT + parseFloat(size/k%k*n/k) + "M" }
+ if (size > k) { return parseFloat(size/k) + nfs.PT + parseFloat(size%k*n/k) + "K" }
return size + "B"
},
Number: function(d, n) { var res = []
diff --git a/lib/page.js b/lib/page.js
index 98129f6d..b2f4b75d 100644
--- a/lib/page.js
+++ b/lib/page.js
@@ -184,8 +184,11 @@ Volcanos("page", {
} }); 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 }
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(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 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||"0"))
+ })
+ 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)||0: text })
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 false }
@@ -213,10 +216,8 @@ Volcanos("page", {
return list.concat(">", arg[1], "", type, ">").join("")
} },
Color: function(text) { if (typeof text != code.STRING) { return "" } text = text.replace(/\\n/g, "
")
- if (text.indexOf(ice.HTTP) == 0 && text.length > 10) { var ls = text.split(lex.SP); text = ""+ls[0]+""+ls.slice(1).join(lex.SP) }
- if (text.indexOf("export ctx_dev=") == 0 && text.length > 10) {
- return "