1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-01-26 20:55:35 +08:00
parent 6930b1df50
commit 9073ab33ab
2 changed files with 5 additions and 3 deletions

View File

@ -30,7 +30,7 @@ Volcanos(chat.ONENGINE, {_init: function(can, meta, list, cb, target) {
can.user.info.sessid && msg.Option(ice.MSG_SESSID, can.user.info.sessid)
names = can.base.MergeURL(names, ice.MSG_INDEX, sub.ConfIndex()), can.page.exportValue(sub, msg)
can.onengine.signal(panel, chat.ONREMOTE, can.request({}, {_follow: panel._follow, _msg: msg, _cmds: cmds, names: names}))
can.misc.Run(event, can, {names: names}, cmds, function(msg) { toast && toast.close && toast.close(), toast = true, _toast && can.user.toastSuccess(msg._can)
can.misc.Run(event, can, {names: names}, cmds, function(msg) { toast && can.user.toastSuccess(msg._can), toast && toast.close && toast.close(), toast = true
can.base.isFunc(cb) && cb(msg), Volcanos.meta.pack[can.core.Keys(panel._name, cmds.join(mdb.FS))] = msg
})
},
@ -109,7 +109,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
var output = can.page.SelectOne(can, field, html.DIV_OUTPUT)
var status = can.page.SelectOne(can, field, html.DIV_STATUS)
var sub = Volcanos(meta.name, {_root: can._root||can, _follow: can.core.Keys(can._follow, meta.name), _target: field,
_legend: legend, _option: option, _action: action, _output: output, _status: status, _history: [],
_legend: legend, _option: option, _action: action, _output: output, _status: status, _history: [], db: {}, ui: {},
Status: function(key, value) { if (can.base.isObject(key)) { return can.core.Item(key, sub.Status), key } try {
can.page.Select(can, status, [[[html.SPAN, key]]], function(target) {
if (key == web.SPACE && value) { value = can.page.Format(html.A, can.misc.MergePodCmd(can, {pod: value}), value) }

View File

@ -31,7 +31,9 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can._wss = can.onda
_data: function(can, name, item) { can.db[name] = can.db[name]||can.request(), can.db[name].Push(item), can.onimport.count(can, name) },
value: function(can, name, value) { can.page.Select(can, can._output, "div.item>span."+name, function(target) { target.innerHTML = value }) },
count: function(can, name) { can.page.Select(can, can._output, can.core.Keys(html.SPAN, name), function(item) { item.innerHTML = can.Conf(name, parseInt(can.Conf(name)||"0")+1+"")+"" }) },
ntip: function(can, msg, time, title, content) { can.onimport._data(can, NTIP, {time: time, fileline: can.base.trimPrefix(msg.Option("log.caller"), location.origin+nfs.PS), title: title, content: content}), can.page.Modify(can, can.ui.toast, [time, title, content].join(lex.SP)) },
ntip: function(can, msg, time, title, content) { can.onimport._data(can, NTIP, {time: time,
// fileline: can.base.trimPrefix(msg.Option("log.caller"), location.origin+nfs.PS),
title: title, content: content}), can.page.Modify(can, can.ui.toast, [time, title, content].join(lex.SP)) },
ncmd: function(can, msg, _follow, _cmds) { can.onimport._data(can, NCMD, {time: can.base.Time(), follow: _follow, cmds: _cmds}), can.onimport.nlog(can, NLOG) },
nlog: function(can, name) { can.onimport.count(can, name) },
menu: function(can, cmds, cb, trans) { can.base.isString(cmds) && (cmds = [cmds])