From 4a2a7da01037295fde648e052af999e9b291d731 Mon Sep 17 00:00:00 2001 From: shaoying Date: Sun, 18 Jul 2021 23:41:22 +0800 Subject: [PATCH] add cmd.js --- page/cmd.html | 21 +++++++++++++++++++++ page/cmd.js | 20 ++++++++++++++++++++ panel/cmd.css | 0 panel/cmd.js | 14 ++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 page/cmd.html create mode 100644 page/cmd.js create mode 100644 panel/cmd.css create mode 100644 panel/cmd.js diff --git a/page/cmd.html b/page/cmd.html new file mode 100644 index 00000000..53bd62f5 --- /dev/null +++ b/page/cmd.html @@ -0,0 +1,21 @@ + + + + + + + + + + volcanos + + + + + + + + + + + diff --git a/page/cmd.js b/page/cmd.js new file mode 100644 index 00000000..dd592398 --- /dev/null +++ b/page/cmd.js @@ -0,0 +1,20 @@ +Volcanos({name: "chat", iceberg: "/chat/", volcano: "/frame.js", + libs: ["/lib/base.js", "/lib/core.js", "/lib/misc.js", "/lib/page.js", "/lib/user.js"], panels: [ + {name: "cmd", help: "工作台", pos: "main"}, + ], main: {name: "Header", list: []}, plugin: [ + "/plugin/state.js", + "/plugin/input.js", + "/plugin/table.js", + "/plugin/input/key.js", + "/plugin/input/date.js", + "/plugin/story/trend.js", + "/plugin/story/spide.js", + "/plugin/local/code/inner.js", + "/plugin/local/code/vimer.js", + "/plugin/local/wiki/draw/path.js", + "/plugin/local/wiki/draw.js", + "/plugin/local/wiki/word.js", + "/plugin/local/team/plan.js", + ], +}) + diff --git a/panel/cmd.css b/panel/cmd.css new file mode 100644 index 00000000..e69de29b diff --git a/panel/cmd.js b/panel/cmd.js new file mode 100644 index 00000000..cb04538f --- /dev/null +++ b/panel/cmd.js @@ -0,0 +1,14 @@ + +Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg, list, cb, target) { + console.log("what") + can.base.isFunc(cb) && cb() + }, + onmain: function(can, msg) { + var args = location.pathname.split("/").slice(1) + can.onappend.plugin(can, {index: args[2], args: args.slice(3), opts: can.user.Search(), width: window.innerWidth}, function(sub, meta) { + sub.run = function(event, cmds, cb) { can.run(event, ["action", "run", args[2]].concat(cmds), cb) } + can.onmotion.hidden(can, sub._legend) + can.user.title(meta.name) + }) + }, +})