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-06-05 15:32:43 +08:00
parent c2b6b3825e
commit 7622ca567f
2 changed files with 6 additions and 6 deletions

View File

@ -145,14 +145,14 @@ Volcanos(chat.ONENGINE, {
cmds.length == 0 && can.core.ItemOrder(list, mdb.ORDER, function(key, value) { if (!value) { return } cmds.length == 0 && can.core.ItemOrder(list, mdb.ORDER, function(key, value) { if (!value) { return }
if (value.debug && can.misc.Search(can, ice.MSG_DEBUG) != ice.TRUE) { return } if (value.debug && can.misc.Search(can, ice.MSG_DEBUG) != ice.TRUE) { return }
if (value.nodetype && value.nodetype != can.user.info.nodetype) { return } if (value.nodetype && value.nodetype != can.user.info.nodetype) { return }
if (can.base.isIn(can.user.info.userrole, value.type||aaa.VOID, aaa.TECH, aaa.ROOT)) { if (can.base.isIn(can.user.info.userrole||aaa.VOID, value.type||aaa.VOID, aaa.TECH, aaa.ROOT)) {
can.core.Item(value.storm).length > 0 && msg.Push({hash: key, name: can.user.isEnglish(can)? key: value.name, icon: value.icon||"", main: value.main||false}) can.core.Item(value.storm).length > 0 && msg.Push({hash: key, name: can.user.isEnglish(can)? key: value.name, icon: value.icon||"", main: value.main||false})
} }
}) })
if (cmds.length != 1 && cmds[1] != chat.STORM) { return false } var river = list[cmds[0]]; if (!river) { return false } if (cmds.length != 1 && cmds[1] != chat.STORM) { return false } var river = list[cmds[0]]; if (!river) { return false }
can.core.ItemOrder(river.storm, mdb.ORDER, function(key, value) { if (!value) { return } can.core.ItemOrder(river.storm, mdb.ORDER, function(key, value) { if (!value) { return }
if (value.nodetype && value.nodetype != can.user.info.nodetype) { return } if (value.nodetype && value.nodetype != can.user.info.nodetype) { return }
if (can.base.isIn(can.user.info.userrole, value.type||aaa.VOID, aaa.TECH, aaa.ROOT)) { if (can.base.isIn(can.user.info.userrole||aaa.VOID, value.type||aaa.VOID, aaa.TECH, aaa.ROOT)) {
msg.Push({hash: key, name: can.user.isEnglish(can)? key: value.name||(can.user.trans(can, key)+" "+key), icon: value.icon||icon[key]||"", main: value.main||false}) msg.Push({hash: key, name: can.user.isEnglish(can)? key: value.name||(can.user.trans(can, key)+" "+key), icon: value.icon||icon[key]||"", main: value.main||false})
} }
}), can.base.isFunc(cb) && cb(msg); return true }), can.base.isFunc(cb) && cb(msg); return true

View File

@ -22,16 +22,16 @@ Volcanos(chat.ONIMPORT, {
term.onCursorMove(function() { can.onexport.term(can, term) }) term.onCursorMove(function() { can.onexport.term(can, term) })
var fitAddon = new FitAddon.FitAddon(); term.loadAddon(fitAddon), term._fit = fitAddon, can.onmotion.delay(can, function() { fitAddon.fit() }) var fitAddon = new FitAddon.FitAddon(); term.loadAddon(fitAddon), term._fit = fitAddon, can.onmotion.delay(can, function() { fitAddon.fit() })
term.loadAddon(new WebLinksAddon.WebLinksAddon()) term.loadAddon(new WebLinksAddon.WebLinksAddon())
can.onmotion.clear(can, target), term.open(target), term.focus() can.onmotion.clear(can, target), term.open(target), term.focus(), can.onmotion.delay(can, function() { term.focus() })
can.onengine.listen(can, chat.ONTHEMECHANGE, function() { term.selectAll(), can.onimport._connect(can, item, target, can.base.trimSuffix(term.getSelection(), lex.NL)) }) can.onengine.listen(can, chat.ONTHEMECHANGE, function() { term.selectAll(), can.onimport._connect(can, item, target, can.base.trimSuffix(term.getSelection(), lex.NL)) })
can.page.style(can, target, html.BACKGROUND_COLOR, term._publicOptions.theme.background||cli.BLACK) can.page.style(can, target, html.BACKGROUND_COLOR, term._publicOptions.theme.background||cli.BLACK)
return can.db[item.hash] = term return can.db[item.hash] = term
}, },
_theme: function(can, item) { return can.base.Obj(item.theme)||( _theme: function(can, item) { return can.base.Obj(item.theme)||(
can.getHeaderTheme() == html.LIGHT? {background: "#0000", foreground: cli.BLACK, cursor: cli.BLUE}: can.getHeaderTheme() == html.LIGHT? {background: "#0000", foreground: cli.BLACK, cursor: cli.BLUE}:
can.getHeaderTheme() == html.DARK? {background: "#0000", foreground: cli.SILVER, cursor: cli.SILVER}: can.getHeaderTheme() == html.DARK? {background: "#0000", foreground: cli.SILVER, cursor: cli.SILVER}:
can.getHeaderTheme() == chat.BLACK? {background: "#0000", foreground: cli.CYAN, cursor: cli.WHITE}: can.getHeaderTheme() == chat.BLACK? {background: "#0000", foreground: cli.CYAN, cursor: cli.WHITE}:
{background: "#0000", foreground: cli.BLACK, cursor: cli.BLUE} {background: "#0000", foreground: cli.BLACK, cursor: cli.BLUE}
) }, ) },
_resize: function(can, term, size) { _resize: function(can, term, size) {
can.runAction(can.request({}, size, term._item), web.RESIZE, [], function(msg) {}) can.runAction(can.request({}, size, term._item), web.RESIZE, [], function(msg) {})