mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
add state.rewrite
This commit is contained in:
parent
9329fc01b8
commit
a4d8f0ae4f
@ -118,13 +118,12 @@ Volcanos({name: "chat", iceberg: "/chat/", volcano: "/frame.js",
|
||||
"spide", "share", "cache", "story",
|
||||
]},
|
||||
"aaa": {name: "权限 aaa", index: [
|
||||
"user", "sess", "role",
|
||||
"user", "sess", "role", "totp",
|
||||
]},
|
||||
"nfs": {name: "文件 nfs", index: [
|
||||
"nfs.cat", "nfs.dir", "nfs.tail", "nfs.trash",
|
||||
]},
|
||||
"ssh": {name: "脚本 ssh", index: [
|
||||
"aaa.totp", "web.code.tmux.session",
|
||||
"connect", "session", "service", "channel",
|
||||
]},
|
||||
}},
|
||||
|
@ -2,6 +2,10 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, conf,
|
||||
},
|
||||
_process: function(can, msg) { return can.core.CallFunc([can.onimport, msg.Option("_process")], [can, msg]) },
|
||||
|
||||
_rewrite: function(can, msg, _arg) { can.Option(msg._arg[0], msg._arg[1])
|
||||
can.onappend._output(can, can.Conf(), {}, can.Pack())
|
||||
return true
|
||||
},
|
||||
_refresh: function(can, msg) {
|
||||
can.core.Timer(parseInt(msg.Option("_delay")||"500"), function() {
|
||||
var sub = can.request({}, {_count: parseInt(msg.Option("_count"))-1})
|
||||
|
1
proto.js
1
proto.js
@ -38,6 +38,7 @@ var Volcanos = shy("火山架", {args: {}, pack: {}, libs: [], cache: {}}, [], f
|
||||
for (var i = 0; i < cache.length; i++) { var sub = cache[i]
|
||||
if (typeof cb == "function" && cb(can, name, sub)) { continue }
|
||||
if (can[sub._name] && can[sub._name]._merge && can[sub._name]._merge(can, sub)) { continue }
|
||||
if (sub._name == "onkeypop") { can[sub._name] = sub; continue }
|
||||
!can[sub._name] && (can[sub._name] = {}); for (var k in sub) {
|
||||
can[sub._name].hasOwnProperty(k) || (can[sub._name][k] = sub[k])
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user