From 7622ca567f8c6c5da17def5354db7ea676086bab Mon Sep 17 00:00:00 2001 From: shy Date: Wed, 5 Jun 2024 15:32:43 +0800 Subject: [PATCH] add some --- panel/river.js | 4 ++-- plugin/local/code/xterm.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/panel/river.js b/panel/river.js index 8a37f0b0..90bd8916 100644 --- a/panel/river.js +++ b/panel/river.js @@ -145,14 +145,14 @@ Volcanos(chat.ONENGINE, { 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.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}) } }) 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 } 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}) } }), can.base.isFunc(cb) && cb(msg); return true diff --git a/plugin/local/code/xterm.js b/plugin/local/code/xterm.js index d614b5a6..38a37f40 100644 --- a/plugin/local/code/xterm.js +++ b/plugin/local/code/xterm.js @@ -22,16 +22,16 @@ Volcanos(chat.ONIMPORT, { 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() }) 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.page.style(can, target, html.BACKGROUND_COLOR, term._publicOptions.theme.background||cli.BLACK) return can.db[item.hash] = term }, _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.DARK? {background: "#0000", foreground: cli.SILVER, cursor: cli.SILVER}: - can.getHeaderTheme() == chat.BLACK? {background: "#0000", foreground: cli.CYAN, cursor: cli.WHITE}: - {background: "#0000", foreground: cli.BLACK, cursor: cli.BLUE} + can.getHeaderTheme() == html.DARK? {background: "#0000", foreground: cli.SILVER, cursor: cli.SILVER}: + can.getHeaderTheme() == chat.BLACK? {background: "#0000", foreground: cli.CYAN, cursor: cli.WHITE}: + {background: "#0000", foreground: cli.BLACK, cursor: cli.BLUE} ) }, _resize: function(can, term, size) { can.runAction(can.request({}, size, term._item), web.RESIZE, [], function(msg) {})