From f5fcce9505b6a1497138795d19723e5e46f3147f Mon Sep 17 00:00:00 2001 From: shy Date: Sat, 30 Sep 2023 08:58:38 +0800 Subject: [PATCH] add some --- lib/user.js | 10 +++++----- panel/header.js | 5 ++--- plugin/state.js | 3 ++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/user.js b/lib/user.js index ebc24c11..59abbf4b 100644 --- a/lib/user.js +++ b/lib/user.js @@ -51,11 +51,11 @@ Volcanos("user", { this.isMobile? location.href = url: null }, close: function(url) { return window.close() }, - theme: function(can, name) { - can.base.isString(name) && (name = [name]) || name || [] - can.user.mod.cmd && name.push(can.user.mod.cmd.replaceAll(".", " ")) - can.user.language(can) && name.push(can.core.Split(can.user.language(can), "-")[0]), can.user.mod.isCmd && name.push(chat.CMD), can.user.isWebview && name.push(html.WEBVIEW) - can.user.isWindows && name.push("windows"), can.user.isMobile && name.push(html.MOBILE) && can.user.isLandscape() && name.push(html.LANDSCAPE) + theme: function(can, name) { can.base.isString(name) && (name = [name]) || name || [] + can.user.language(can) && name.push(can.core.Split(can.user.language(can), "-")[0]) + can.user.mod.isCmd && name.push(chat.CMD), can.user.mod.cmd && name.push(can.user.mod.cmd.replaceAll(".", " ")) + can.user.isMobile && name.push(html.MOBILE) && can.user.isLandscape() && name.push(html.LANDSCAPE) + can.user.isWebview && name.push(html.WEBVIEW), can.user.isWindows && name.push("windows") can.page.styleClass(can, document.body, name.join(lex.SP)) }, title: function(text) { if (window.webview) { return title(text) } return text && (document.title = text), document.title }, diff --git a/panel/header.js b/panel/header.js index 187aacd4..d8298ff6 100644 --- a/panel/header.js +++ b/panel/header.js @@ -61,9 +61,8 @@ Volcanos(chat.ONACTION, {_init: function(can) { msg.Option(nfs.SCRIPT) && can.require(can.base.Obj(msg.Option(nfs.SCRIPT)), function(can) { can.onaction.source(can, msg) }) lang(msg, function() { can.onmotion.clear(can), can.onimport._init(can, can.request(), can._output), can.onengine.signal(can, chat.ONLOGIN) }) } - can.run(can.request({}, {_method: http.GET}), [], function(msg) { - lang(msg), can.page.requireModules(can, [msg.Option(mdb.ICONS)]) - can.require(can.core.List(msg["theme.list"], function(item) { return "src/template/web.chat.header/theme/"+item })) + can.run(can.request({}, {_method: http.GET}), [], function(msg) { lang(msg) + can.require(can.core.List(msg["theme.list"], function(item) { return "src/template/web.chat.header/theme/"+item }), function() { can.page.requireModules(can, [msg.Option(mdb.ICONS)]) }) can.onaction._menus[1] = [chat.THEME, ice.AUTO].concat(can.core.List(msg["theme.list"], function(item) { return can.base.trimSuffix(item, ".css") })) can.onaction._menus[2] = [aaa.LANGUAGE, ice.AUTO].concat(can.core.List(msg["language.list"], function(item) { return can.base.trimSuffix(item, ".js") })) if (can.base.beginWith(location.pathname, "/wiki/portal/", "/chat/cmd/web.wiki.portal/", "/chat/cmd/web.chat.oauth.client", "/chat/pod/20230511-golang-story/cmd/web.code.gitea.client")) { return show(msg) } diff --git a/plugin/state.js b/plugin/state.js index d2c25681..1e34daad 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -57,7 +57,8 @@ Volcanos(chat.ONIMPORT, { Volcanos(chat.ONACTION, {list: [ "刷新数据", "刷新界面", "切换浮动", "切换全屏", - "远程控制", "共享工具", + // "远程控制", "共享工具", + "共享工具", "打开链接", "生成链接", "生成脚本", "生成图片", ["视图", "参数", "操作", "状态", "专注", "项目", "预览", "演示"],