diff --git a/frame.js b/frame.js index 1f8284e3..f84509ae 100644 --- a/frame.js +++ b/frame.js @@ -1,4 +1,5 @@ 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, "") } 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) } diff --git a/panel/header.js b/panel/header.js index 6c333b75..8a2f50cd 100644 --- a/panel/header.js +++ b/panel/header.js @@ -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)]) }}]); 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]) }, _init: function(target) { item == mdb.TIME && can.onimport._time(can, target) }}]) }) diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index a97a1ac0..6ba02b54 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -298,9 +298,9 @@ Volcanos(chat.ONIMPORT, { display: function(can, msg) { 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.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.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) }), sub.onaction.close = function() { can.onmotion.hidden(can, can.ui.display), can.onimport.layout(can) } }) diff --git a/plugin/local/code/vimer.js b/plugin/local/code/vimer.js index ea5dad59..0e958b62 100644 --- a/plugin/local/code/vimer.js +++ b/plugin/local/code/vimer.js @@ -53,7 +53,21 @@ Volcanos(chat.ONFIGURE, { }, 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() - 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.Status("文件数", zone._total(total += msg.Length())) }, true) }