From 62b943844e8af9c70f3d65ec89ade28a5926f7c2 Mon Sep 17 00:00:00 2001 From: shy Date: Thu, 5 Oct 2023 13:03:36 +0800 Subject: [PATCH] add some --- index.css | 1 + panel/header.js | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/index.css b/index.css index 34d17ad6..6c990402 100644 --- a/index.css +++ b/index.css @@ -125,6 +125,7 @@ body>div.carte div.item { white-space:pre; padding:5px 10px; } body>div.carte div.item span.icon.next { float:right; line-height:22px; height:22px; } body>div.carte.select.float>div.item { text-align:center; } body>div.input { padding:20px; } +body>div.input div.output { clear:both; } body>div.input td { padding:10px; } body>div.input td:nth-child(2) { padding:10px 0;} body>div.input tr.icon td:last-child { position:relative; } diff --git a/panel/header.js b/panel/header.js index d8298ff6..6f51f642 100644 --- a/panel/header.js +++ b/panel/header.js @@ -62,14 +62,15 @@ Volcanos(chat.ONACTION, {_init: function(can) { 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.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) } - if (location.pathname == "/" && can.base.beginWith(msg.Option(ice.MAIN)||"", "/wiki/portal/", "/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))) { - return can.user.login(can, function() { can.onengine.signal(can, chat.ONMAIN, msg) }, msg) - } show(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)]) + 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) } + if (location.pathname == "/" && can.base.beginWith(msg.Option(ice.MAIN)||"", "/wiki/portal/", "/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))) { + return can.user.login(can, function() { can.onengine.signal(can, chat.ONMAIN, msg) }, msg) + } show(msg) + }) }) }, onstorm_select: function(can, river, storm) { can.Conf(chat.RIVER, river), can.Conf(chat.STORM, storm) },