1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00

opt share

This commit is contained in:
shylinux 2021-08-05 09:56:48 +08:00
parent 22c2690809
commit 6f78a40a1e
5 changed files with 15 additions and 12 deletions

4
.gitignore vendored
View File

@ -1,7 +1,7 @@
*.swp
*.swo
can.js
can.css
cmd.js
cmd.css
cache.js
cache.css
.DS_Store

View File

@ -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))
}

View File

@ -1,7 +1,8 @@
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="/page/cmd.css">
</head>
<body>
<!-- <script src="/proto.js"></script> -->
<script src="/page/can.js"></script>
<script>app("/chat/")</script>
<script src="/page/cmd.js"></script>
<script>cmd()</script>
</body>

View File

@ -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))

View File

@ -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",