1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-11-26 14:31:52 +08:00
parent 8fb302feea
commit 6b45a242d6
3 changed files with 6 additions and 7 deletions

View File

@ -378,9 +378,9 @@ Volcanos("page", {
return can.base.isIn(name, mdb.CREATE, mdb.INSERT, cli.RESTART, cli.START, cli.BUILD, ctx.RUN, web.OPEN, "startall", "clone")? "notice":
can.base.isIn(name, mdb.REMOVE, mdb.DELETE, mdb.PRUNES, mdb.PRUNE, nfs.TRASH, "drop", cli.STOP, "stopall")? "danger": ""
},
exportValue: function(can, msg) {
msg.OptionDefault(ice.MSG_BG, can.page.styleValue(can, "--plugin-bg-color", can._output))
msg.OptionDefault(ice.MSG_FG, can.page.styleValue(can, "--plugin-fg-color", can._output))
exportValue: function(can, msg, target) { target = target||can._output
msg.OptionDefault(ice.MSG_BG, can.page.styleValue(can, "--plugin-bg-color", target))
msg.OptionDefault(ice.MSG_FG, can.page.styleValue(can, "--plugin-fg-color", target))
return msg
},
styleValue: function(can, key, target) { const styles = getComputedStyle(target||document.body); return styles.getPropertyValue(key) },

View File

@ -259,9 +259,7 @@ Volcanos("user", {
if (can.misc.CookieSessid(can)) { can.page.ClassList.del(can, document.body, aaa.LOGIN)
can.onmotion.clearFloat(can), can.onmotion.delay(can, function() { socket._close = true, socket.close() })
return can.base.isFunc(cb) && cb(), cb = null, true
}
can.core.Timer(1000, function() { check() })
can.onimport.theme(can)
} can.core.Timer(1000, function() { check() }), can.onimport.theme(can)
}
if (cmd == cli.PWD) { if (check()) { return } can.page.ClassList.add(can, document.body, aaa.LOGIN)
var list = {}; msg.Table(function(value) { if (value.order == "") {} else if (value.type == mdb.PLUGIN) { list[value.name] = function(target) {

View File

@ -78,7 +78,8 @@ Volcanos(chat.ONACTION, {_init: function(can) {
can.run(can.request({}, {_method: http.GET}), [], function(msg) { lang(msg)
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") }))
can.require(can.core.List(msg["theme.list"], function(item) { return nfs.SRC_TEMPLATE+web.CHAT_HEADER+"/theme/"+item }), function() { can.page.requireModules(can, [msg.Option("icon.lib")])
can.require(can.core.List(msg["theme.list"], function(item) { return nfs.SRC_TEMPLATE+web.CHAT_HEADER+"/theme/"+item }), function() {
can.onimport.theme(can), can.page.requireModules(can, [msg.Option("icon.lib")])
if (can.base.beginWith(location.pathname, nfs.WIKI_PORTAL, web.CHAT_CMD+web.WIKI_PORTAL, web.CHAT_CMD+"web.chat.oauth.client", web.CHAT_POD+"20230511-golang-story/cmd/web.code.gitea.client")) { return show(msg) }
if (location.pathname == nfs.PS && can.base.beginWith(msg.Option(ice.MAIN)||"", nfs.WIKI_PORTAL, web.CHAT_CMD+web.WIKI_PORTAL)) { return show(msg) }
if (!can.Conf(aaa.USERNICK, (msg.Option(aaa.USERNICK)||msg.Option(ice.MSG_USERNICK)||msg.Option(ice.MSG_USERNAME)).slice(0, 8))) {