From 35842bd525b49046d22ad07d97b873f28b96e3ff Mon Sep 17 00:00:00 2001 From: shy Date: Sat, 23 Dec 2023 17:02:56 +0800 Subject: [PATCH] add some --- panel/footer.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/panel/footer.js b/panel/footer.js index e3be8cbb..a43f40e0 100644 --- a/panel/footer.js +++ b/panel/footer.js @@ -49,18 +49,11 @@ Volcanos(chat.ONACTION, {_init: function(can) {}, onunload: function(can) { can._wss && can._wss.close() }, onaction_cmd: function(can) { can.onappend.style(can, html.HIDE) }, oncommand_focus: function(can) { can.page.Select(can, can._output, ["div.cmd", html.INPUT], function(target) { can.onmotion.focus(can, target) }) }, - ondebugs: function(can, msg) { - can.runAction(msg, msg.Option(ctx.ACTION), [msg.Option(ctx.INDEX)], function(_msg) { - _msg.Table(function(item) { item.mode = chat.FLOAT - can.onappend.plugin(can, item, function(sub) { - sub.run = function(event, cmds, cb) { can.run(can.request(event, {_method: http.POST, space: sub.Conf(web.SPACE)}), [ctx.ACTION, msg.Option(ctx.ACTION), ctx.RUN].concat(cmds), cb) } - can.getActionSize(function(left, top, width, height) { sub.onimport.size(sub, sub.ConfHeight(height/2), sub.ConfWidth(width), true) - can.onmotion.move(can, sub._target, {left: left||0, top: (top||0)+height/4}) - }), sub.onaction.close = function() { can.page.Remove(can, sub._target) } - }, document.body) - }) + ondebugs: function(can, msg) { can.runAction(msg, msg.Option(ctx.ACTION), [msg.Option(ctx.INDEX)], function(_msg) { _msg.Table(function(item) { + can.onappend._float(can, item, can.base.Obj(item.args, []), function(sub) { + sub.run = function(event, cmds, cb) { can.run(can.request(event, {_method: http.POST, space: sub.Conf(web.SPACE)}), [ctx.ACTION, msg.Option(ctx.ACTION), ctx.RUN].concat(cmds), cb) } }) - }, + }) }) }, }) Volcanos(chat.ONEXPORT, {list: [NTIP, NLOG, NCMD, NKEY, html.WIDTH, html.HEIGHT, nfs.VERSION], height: function(can) { return can._target.offsetHeight },