1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-26 09:14:06 +08:00
This commit is contained in:
shylinux 2021-05-19 11:21:22 +08:00
parent b6dd113562
commit 654153ebd6
5 changed files with 8 additions and 6 deletions

View File

@ -14,7 +14,7 @@ Volcanos("onengine", {help: "搜索引擎", list: [], _init: function(can, meta,
}, function() { can.onlayout.topic(can)
can.misc.Log(can.user.title(), "run", can)
can.base.Copy(can.onengine.river, can.Conf("river"))
can.onmotion._init(can, target), can.onkeypop._init(can, target)
can.ondaemon._init(can), can.onmotion._init(can, target), can.onkeypop._init(can, target)
can.onengine.signal(can, "onmain", can.request())
})
},
@ -61,7 +61,7 @@ Volcanos("onengine", {help: "搜索引擎", list: [], _init: function(can, meta,
},
})
Volcanos("ondaemon", {help: "推荐引擎", list: [], _init: function(can, name) { if (can.user.isLocalFile) { return }
can.misc.WSS(can, {type: "chrome", name: can.user.Search(can, "daemon")||name}, function(event, msg, cmd, arg) { if (!msg) { return }
can.misc.WSS(can, {type: "chrome", name: can.user.Search(can, "daemon")||name||""}, function(event, msg, cmd, arg) { if (!msg) { return }
can.base.isFunc(can.ondaemon[cmd])? can.core.CallFunc(can.ondaemon[cmd], {
"can": can, "msg": msg, "cmd": cmd, "arg": arg, "cb": function() { msg.Reply() },
}): can.onengine._search({}, can, msg, can, ["_search", cmd].concat(arg), function() {
@ -69,7 +69,9 @@ Volcanos("ondaemon", {help: "推荐引擎", list: [], _init: function(can, name)
})
})
}, _list: [""],
pwd: function(can, msg, arg) { can.ondaemon._list[0] = arg[0] },
pwd: function(can, msg, arg) {
can.ondaemon._list[0] = arg[0]
},
grow: function(can, msg, arg) {
var sub = can.ondaemon._list[msg.Option("_target")]
if (!sub || !sub._outputs || !sub._outputs.length) { return }

View File

@ -146,7 +146,7 @@ Volcanos("page", {help: "网页模块", ClassList: {
if (type == "input") {
data.type == "button" && (data.value = can.user.trans(can, data.value))
if (data.type == "text") { data.autocomplete = data.autocomplete||"off"
if (data.type == "text" || !data.type) { data.autocomplete = data.autocomplete||"off"
data.placeholder = can.user.trans(can, (data.placeholder||data.name||"").split(".").pop())
data.title = can.user.trans(can, data.title||data.placeholder)
}

View File

@ -398,6 +398,7 @@ fieldset div.action>div.item select {
fieldset>div.status>div.item {
float:left; padding:4px;
height:18px;
}
fieldset>div.status>div.item>label {
font-size:10px; color:gray;

View File

@ -175,7 +175,6 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, meta,
function init() { can.run({}, [], function(msg) {
can.onimport._init(can, msg, [], function(msg) {
can.onengine.signal(can, "onlogin", msg)
can.ondaemon._init(can)
}, can._output)
can.search({}, ["River.onmotion.toggle"])

View File

@ -70,7 +70,7 @@ var Volcanos = shy("火山架", {args: {}, pack: {}, libs: [], cache: {}}, [], f
var msg = can.request(event); msg.Option(key, value)
return can.search(event, [name+".onimport."+key])
},
search: function(event, cmds, cb) { can.run && can.run(event, ["_search"].concat(cmds), cb, true) },
search: function(event, cmds, cb) { return can.run && can.run(event, ["_search"].concat(cmds), cb, true) },
const: function(list) { can.core.List(typeof list == "object"? list: arguments, function(v) { can["_"+v.toUpperCase()] = v }) },
Conf: function(key, value) { return can.core.Value(can._conf, key, value) }, _conf: {},