mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt offer
This commit is contained in:
parent
050490cb8b
commit
d526f0e289
1
frame.js
1
frame.js
@ -1,4 +1,5 @@
|
|||||||
Volcanos(chat.ONENGINE, {_init: function(can, meta, list, cb, target) {
|
Volcanos(chat.ONENGINE, {_init: function(can, meta, list, cb, target) {
|
||||||
|
can.user.isMobile && can.require(["https://unpkg.com/vconsole@latest/dist/vconsole.min.js"], function() { new window.VConsole() })
|
||||||
if (can.misc.Search(can, ice.MSG_SESSID)) { can.misc.CookieSessid(can, can.misc.Search(can, ice.MSG_SESSID)); return can.misc.Search(can, ice.MSG_SESSID, "") }
|
if (can.misc.Search(can, ice.MSG_SESSID)) { can.misc.CookieSessid(can, can.misc.Search(can, ice.MSG_SESSID)); return can.misc.Search(can, ice.MSG_SESSID, "") }
|
||||||
can.user.title(can.misc.Search(can, chat.TITLE)||can.misc.Search(can, ice.POD)||location.host)
|
can.user.title(can.misc.Search(can, chat.TITLE)||can.misc.Search(can, ice.POD)||location.host)
|
||||||
can.run = function(event, cmds, cb) { var msg = can.request(event); cmds = cmds||[]; return (can.onengine[cmds[0]]||can.onengine._remote)(event, can, msg, can, cmds, cb) }
|
can.run = function(event, cmds, cb) { var msg = can.request(event); cmds = cmds||[]; return (can.onengine[cmds[0]]||can.onengine._remote)(event, can, msg, can, cmds, cb) }
|
||||||
|
@ -18,7 +18,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
|||||||
can.onaction.carte(event, can, [can.page.Format(html.IMG, can.onexport.avatar(can), 160)])
|
can.onaction.carte(event, can, [can.page.Format(html.IMG, can.onexport.avatar(can), 160)])
|
||||||
}}]); return
|
}}]); return
|
||||||
}
|
}
|
||||||
can.page.Append(can, target, [{view: [can.base.join([chat.STATE, item]), html.DIV, (can.Conf(item)||msg.Option(item)||"").slice(0, 10)], onmouseenter: function(event) {
|
can.page.Append(can, target, [{view: [can.base.join([chat.STATE, item]), html.DIV, (can.Conf(item)||msg.Option(item)||"").split("@")[0].slice(0, 10)], onmouseenter: function(event) {
|
||||||
can.core.CallFunc([can.onaction, item], [event, can, item])
|
can.core.CallFunc([can.onaction, item], [event, can, item])
|
||||||
}, _init: function(target) { item == mdb.TIME && can.onimport._time(can, target) }}])
|
}, _init: function(target) { item == mdb.TIME && can.onimport._time(can, target) }}])
|
||||||
})
|
})
|
||||||
|
@ -298,9 +298,9 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
display: function(can, msg) {
|
display: function(can, msg) {
|
||||||
var height = can.display_size[can.onexport.keys(can)]||can.ConfHeight()/2
|
var height = can.display_size[can.onexport.keys(can)]||can.ConfHeight()/2
|
||||||
can.onimport.process(can, msg, can.ui.display, height, can.ui.display.offsetWidth, function(sub) {
|
can.onimport.process(can, msg, can.ui.display, height, can.ui.display.offsetWidth, function(sub) {
|
||||||
can.page.style(can, sub._output, html.HEIGHT, ""), can.onmotion.delay(can, function() {
|
can.page.style(can, sub._output, html.HEIGHT, "", html.MAX_HEIGHT, ""), can.onmotion.delay(can, function() {
|
||||||
can.display_size[can.onexport.keys(can)] = can.base.Max(sub._output.offsetHeight, can.ConfHeight()/2)+html.ACTION_HEIGHT+sub.onexport.statusHeight(sub)
|
can.display_size[can.onexport.keys(can)] = can.base.Max(sub._output.offsetHeight, can.ConfHeight()/2)+html.ACTION_HEIGHT+sub.onexport.statusHeight(sub)
|
||||||
can.page.style(can, sub._output, html.MAX_HEIGHT, can.display_size[can.onexport.keys(can)])
|
can.page.style(can, sub._output, html.MAX_HEIGHT, can.display_size[can.onexport.keys(can)]-2*html.ACTION_HEIGHT)
|
||||||
can.onimport.layout(can)
|
can.onimport.layout(can)
|
||||||
}), sub.onaction.close = function() { can.onmotion.hidden(can, can.ui.display), can.onimport.layout(can) }
|
}), sub.onaction.close = function() { can.onmotion.hidden(can, can.ui.display), can.onimport.layout(can) }
|
||||||
})
|
})
|
||||||
|
@ -53,7 +53,21 @@ Volcanos(chat.ONFIGURE, {
|
|||||||
},
|
},
|
||||||
source: function(can, target, zone, path) { var total = 0
|
source: function(can, target, zone, path) { var total = 0
|
||||||
function show(target, path) { can.run(can.request({}, {dir_root: path, dir_deep: true}), [nfs.PWD], function(msg) { var list = msg.Table()
|
function show(target, path) { can.run(can.request({}, {dir_root: path, dir_deep: true}), [nfs.PWD], function(msg) { var list = msg.Table()
|
||||||
can.core.List(list, function(item) { item._menu = shy({trash: function(event) { can.onaction._run(event, can, nfs.TRASH, [can.base.Path(path, item.path)]) }}) })
|
can.core.List(list, function(item) { item._menu = shy({
|
||||||
|
trash: function(event) { can.onaction._run(event, can, nfs.TRASH, [can.base.Path(path, item.path)]) },
|
||||||
|
create: function(event) {
|
||||||
|
can.user.input(event, can, ["filename"], function(list) {
|
||||||
|
if (can.base.endWith(item.path, ice.PS)) {
|
||||||
|
can.request(event, {path: path+item.path, file: list[0]})
|
||||||
|
} else {
|
||||||
|
can.request(event, {path: path+item.path.split(ice.PS).slice(0, -1).join(ice.PS)+ice.PS, file: list[0]})
|
||||||
|
}
|
||||||
|
can.onaction._run(event, can, nfs.SAVE, [], function(msg) {
|
||||||
|
can.onimport.tabview(can, path, (msg.Option(nfs.PATH)+msg.Option(nfs.FILE)).slice(path.length))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}) })
|
||||||
can.onimport.tree(can, list, nfs.PATH, ice.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target)
|
can.onimport.tree(can, list, nfs.PATH, ice.PS, function(event, item) { can.onimport.tabview(can, path, item.path) }, target)
|
||||||
can.Status("文件数", zone._total(total += msg.Length()))
|
can.Status("文件数", zone._total(total += msg.Length()))
|
||||||
}, true) }
|
}, true) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user