mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt some
This commit is contained in:
parent
53bab2b443
commit
346a051790
5
frame.js
5
frame.js
@ -370,14 +370,13 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
target.addEventListener("scroll", function(event) { can.page.style(can, ui.scrollbar, html.TOP, target.scrollTop+offset*target.offsetHeight, html.RIGHT, -target.scrollLeft) })
|
||||
return ui.scrollbar
|
||||
}
|
||||
var height = target.offsetHeight*target.offsetHeight/target.scrollHeight
|
||||
var ui = can.page.Append(can, target, [{view: "scrollbar", style: {height: height},
|
||||
var ui = can.page.Append(can, target, [{view: "scrollbar", style: {height: target.offsetHeight*target.offsetHeight/target.scrollHeight},
|
||||
onmousedown: function(event) { var begin = {top: target.scrollTop, y: event.y}
|
||||
window._scroll = function(event) { target.scrollTop = begin.top+(event.y-begin.y)/target.offsetHeight*target.scrollHeight, can.onkeymap.prevent(event) }
|
||||
},
|
||||
}])
|
||||
target.addEventListener("scroll", function(event) { can.onmotion.delayOnce(can, function() { can.page.style(can, ui.scrollbar, "visibility", "visible")
|
||||
can.page.style(can, ui.scrollbar, html.TOP, can.base.Min(target.scrollTop+target.scrollTop/target.scrollHeight*target.offsetHeight, 0, target.scrollHeight-height), html.RIGHT, -target.scrollLeft)
|
||||
can.page.style(can, ui.scrollbar, html.TOP, target.scrollTop+target.scrollTop/target.scrollHeight*target.offsetHeight, html.RIGHT, -target.scrollLeft)
|
||||
can.onmotion.delayOnce(can, function() { can.page.style(can, ui.scrollbar, "visibility", "hidden") }, 3000, target._delay_scroll = target._delay_scroll||[])
|
||||
}, 0, target._delay_scroll = target._delay_scroll||[]) })
|
||||
return ui.scrollbar
|
||||
|
@ -274,9 +274,10 @@ fieldset.location>div.action input[type=text] { width:40px; }
|
||||
fieldset.config form.option input[name=key] { width:240px; }
|
||||
fieldset.inner.float>div.status { display:none; }
|
||||
fieldset.qrcode>div.output div.code { padding:0; }
|
||||
fieldset.xterm>div.action>div.tabs:only-child { display:none; }
|
||||
fieldset.xterm>div.layout { clear:both; }
|
||||
fieldset.xterm div.layout div.output { border-left:gray solid 1px; border-top:gray solid 1px; }
|
||||
fieldset.xterm div.layout div.output.select { border:blue solid 1px; }
|
||||
fieldset.xterm>div.layout { clear:both; }
|
||||
fieldset.plan div.output div.content>table.content { height:100%; width:100%; }
|
||||
fieldset.draw>form.option>div.item.pid>input { width:60px; }
|
||||
fieldset.draw div.output svg { margin-bottom:-4px; }
|
||||
|
@ -120,14 +120,14 @@ Volcanos("misc", {
|
||||
},
|
||||
MergeURL: function(can, obj, clear) { var path = location.pathname; obj._path && (path = obj._path), delete(obj._path)
|
||||
can.misc.Search(can, log.DEBUG) && (obj.debug = ice.TRUE); var hash = obj._hash||""; delete(obj._hash)
|
||||
var args = [web.CHAT]; can.core.List([ice.POD, ice.CMD], function(key) { obj[key] && args.push(key, obj[key]), delete(obj[key]) })
|
||||
var args = [web.CHAT]; can.core.List([ice.POD, ice.CMD, web.WEBSITE], function(key) { obj[key] && args.push(key, obj[key]), delete(obj[key]) })
|
||||
var _location = location; if (can.user.isExtension) { var _location = new URL(Volcanos.meta.iceberg) }
|
||||
return can.base.MergeURL(_location.origin+(args.length == 1? path: nfs.PS+args.join(nfs.PS))+(clear? "": _location.search), obj)+(hash? "#"+hash: "")
|
||||
},
|
||||
ParseURL: function(can, url) { url = url||location.href; var args = can.base.ParseURL(url), _location = new URL(url)
|
||||
ParseURL: function(can, url) { var args = can.base.ParseURL(url), _location = new URL(url)
|
||||
delete(args.link), delete(args.origin), delete(args._origin)
|
||||
var ls = can.core.Split(_location.pathname, nfs.PS); if (ls[0] == chat.SHARE) { args[chat.SHARE] = ls[1] }
|
||||
for (var i = 1; i < ls.length; i += 2) { if (can.base.isIn(ls[i], [ice.POD, ice.CMD])) { args[ls[i]] = ls[i+1] } }
|
||||
for (var i = 1; i < ls.length; i += 2) { if (can.base.isIn(ls[i], [ice.POD, ice.CMD, web.WEBSITE])) { args[ls[i]] = ls[i+1] } }
|
||||
return args
|
||||
},
|
||||
SplitPath: function(can, path) { var ls = path.split(nfs.PS); if (ls.length == 1) { return [nfs.PWD, ls[0]] }
|
||||
|
@ -46,9 +46,8 @@ Volcanos(chat.ONACTION, {_init: function(can) { can.onmotion.hidden(can) }, list
|
||||
}}]); show()
|
||||
},
|
||||
plugin: function(event, can, data) { if (can.base.isFunc(data.text)) { return can.onmotion.hidden(can), data.text(event) }
|
||||
var cmd = data.cmd == ctx.COMMAND? can.core.Keys(data.type, data.name.split(lex.SP)[0]): can.core.Keys(data.ctx, data.cmd), arg = cmd == web.WIKI_WORD? [data.name]: []
|
||||
data.type == ice.CMD && (cmd = data.name, arg = can.base.Obj(data.text))
|
||||
var meta = {type: chat.STORY, index: cmd||msg.Option(mdb.INDEX), args: arg}
|
||||
var cmd = data.cmd == ctx.COMMAND? can.core.Keys(data.type, data.name.split(lex.SP)[0]): can.core.Keys(data.ctx, data.cmd)
|
||||
var meta = {type: chat.STORY, index: cmd||msg.Option(mdb.INDEX), args: cmd == web.WIKI_WORD? [data.name]: []}
|
||||
if (data.type == cli.OPENS) { return can.runAction(event, cli.OPENS, [data.text], null, true) }
|
||||
if (data.type == ssh.SHELL) { meta = {index: web.CODE_XTERM, args: [data.text]} }
|
||||
if (data.type == ctx.INDEX) { meta = {index: data.text.split(mdb.FS)[0], args: data.text.split(mdb.FS).slice(1) } }
|
||||
|
@ -197,7 +197,7 @@ Volcanos(chat.ONEXPORT, {
|
||||
args: function(can) { return can.page.SelectArgs(can, can._option, "", function(target) { return target.value }) },
|
||||
output: function(can, msg) {},
|
||||
action: function(can, button, line) {},
|
||||
record: function(can, value, key, item, event) {},
|
||||
record: function(can, value, key, line) {},
|
||||
marginTop: function() { return 0 },
|
||||
actionHeight: function(can) { return can.page.ClassList.has(can, can._target, html.OUTPUT)? 0: html.ACTION_HEIGHT },
|
||||
statusHeight: function(can) { return can.page.ClassList.has(can, can._target, html.OUTPUT) || !can.page.isDisplay(can._status) || can._status.innerHTML == "" || (can._target.offsetHeight > 0 && can._status.offsetHeight == 0)? 0: html.ACTION_HEIGHT },
|
||||
|
1
proto.js
1
proto.js
@ -81,7 +81,6 @@ var web = {CHAT: "chat",
|
||||
WEBSITE: "website", DRAW: "draw", PLAY: "play", CLEAR: "clear", REFRESH: "refresh", RESIZE: "resize", FILTER: "filter", INPUT: "input",
|
||||
CANCEL: "cancel", SUBMIT: "submit", UPLOAD: "upload", DOWNLOAD: "download", TOIMAGE: "toimage",
|
||||
SHARE_CACHE: "/share/cache/", SHARE_LOCAL: "/share/local/",
|
||||
LINK: "link", WORKER: "worker", SERVER: "server", GATEWAY: "gateway",
|
||||
|
||||
AT: "@", QS: "?", HTTP: "http",
|
||||
GET: "GET", PUT: "PUT", POST: "POST", DELETE: "DELETE",
|
||||
|
Loading…
x
Reference in New Issue
Block a user