diff --git a/.gitignore b/.gitignore index d61fb406..dd619d8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ *.swp *.swo -can.js -can.css +cmd.js +cmd.css cache.js cache.css .DS_Store diff --git a/frame.js b/frame.js index 8ea88add..5adc9992 100644 --- a/frame.js +++ b/frame.js @@ -26,7 +26,8 @@ Volcanos("onengine", {help: "搜索引擎", list: [], _init: function(can, meta, _search: function(event, can, msg, panel, cmds, cb) { var sub, mod = can, fun = can, key = ""; can.core.List(cmds[1].split("."), function(value) { fun && (sub = mod, mod = fun, fun = mod[value], key = value) - }); if (!sub || !mod || !fun) { can.misc.Warn("not found", cmds) + }); if (!sub || !mod || !fun) { + // can.misc.narn("not found", cmds) return can.base.isFunc(cb) && cb(msg.Echo("warn: ", "not found: ", cmds)) } diff --git a/page/cmd.html b/page/cmd.html index dd798129..3c2bad7c 100644 --- a/page/cmd.html +++ b/page/cmd.html @@ -1,7 +1,8 @@ +
+ + - - - + + - diff --git a/panel/action.js b/panel/action.js index 5110fc6a..c819543f 100644 --- a/panel/action.js +++ b/panel/action.js @@ -96,7 +96,8 @@ Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg, }) } - can.onimport._share(can, can.user.Search(can, can._SHARE)) + var ls = location.pathname.split("/") + can.onimport._share(can, can.user.Search(can, can._SHARE) || ls[1]=="share" && ls[2]) }, onresize: function(can, msg, width, height) { var args = {width: width, height: height} can.Conf(args), can.onengine.signal(can, "onaction_resize", can.request({}, args)) diff --git a/proto.js b/proto.js index 227a661a..f633d226 100644 --- a/proto.js +++ b/proto.js @@ -131,6 +131,7 @@ const html = { ITEM: "item", LIST: "list", } + function shy(help, meta, list, cb) { var index = 0, args = arguments; function next(check) { if (index < args.length && (!check || check == typeof args[index])) { @@ -238,11 +239,10 @@ Volcanos.meta._load = function(url, cb) { return item } } - -function app(name, tool) { - Volcanos({name: name, iceberg: "/chat/", volcano: "/frame.js", preload: ["/page/can.css"], +function cmd(tool) { + Volcanos({name: "chat", iceberg: "/chat/", volcano: "/frame.js", preload: [], libs: ["/lib/base.js", "/lib/core.js", "/lib/misc.js", "/lib/page.js", "/lib/user.js"], - panels: [{name: "cmd", help: "工作台", pos: "main", tool: tool}], main: {name: "Header", list: []}, plugin: [ + panels: [{name: "cmd", help: "工作台", pos: "main", tool: tool}], main: {name: "cmd", list: []}, plugin: [ "/plugin/state.js", "/plugin/input.js", "/plugin/table.js",