diff --git a/const.js b/const.js index 1543b8f9..6e2ce989 100644 --- a/const.js +++ b/const.js @@ -99,11 +99,12 @@ var web = {CHAT: "chat", PORTAL: "portal", STUDIO: "studio", SERVICE: "service", WIKI_WORD: "web.wiki.word", WIKI_DRAW: "web.wiki.draw", WIKI_PORTAL: "web.wiki.portal", + CHAT_PORTAL: "web.chat.portal", + CHAT_HEADER: "web.chat.header", + CHAT_IFRAME: "web.chat.iframe", + CHAT_OATUH_CLIENT: "web.chat.oauth.client", CHAT_MACOS_DESKTOP: "web.chat.macos.desktop", CHAT_MACOS_SESSION: "web.chat.macos.session", - CHAT_OATUH_CLIENT: "web.chat.oauth.client", - CHAT_IFRAME: "web.chat.iframe", - CHAT_HEADER: "web.chat.header", CHAT_FAVOR: "web.chat.favor", CHAT_FLOWS: "web.chat.flows", TEAM_PLAN: "web.team.plan", diff --git a/panel/footer.js b/panel/footer.js index 94601ef6..9a9c9102 100644 --- a/panel/footer.js +++ b/panel/footer.js @@ -1,8 +1,7 @@ (function() { var NTIP = "ntip", NLOG = "nlog", NCMD = "ncmd", NKEY = "nkey" Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.Conf(NKEY, can.core.Item(can.misc.localStorage(can)).length) - can._wss = can.ondaemon._init(can); if (can.user.mod.isCmd) { return } can.Conf("version", can.base.trimPrefix(window._version, "?_v=").split("&")[0]) - can.onimport._title(can, msg, target), can.onimport._command(can, msg, target) - can.onimport._storm(can, msg, target) + can._wss = can.ondaemon._init(can); if (can.user.mod.isCmd && can.misc.Search(can, ice.CMD) != web.CHAT_PORTAL) { return } can.Conf("version", can.base.trimPrefix(window._version, "?_v=").split("&")[0]) + can.onimport._title(can, msg, target), can.onimport._command(can, msg, target), can.onimport._storm(can, msg, target) can.ConfHeight(can.page.height()), can.ConfWidth(can.page.width()) can.onimport._state(can, msg, target), can.onimport._toast(can, msg, target) }, diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index 0f083985..281615dc 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -265,7 +265,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { var paths = can.core.Sp layout: function(can) { if (can.isSimpleMode()) { can.page.style(can, can._output, html.MAX_HEIGHT, "") } if (can.isSimpleMode() || can.Conf(ctx.STYLE) == html.OUTPUT) { return can.page.style(can, can.ui.content, html.WIDTH, can.ConfWidth()) } if (can.isCmdMode()) { can.ConfHeight(can.page.height()) } - var content = can.ui.content; if (content._root) { can.ui.content = content._root } can.ui.size = {profile: can._msg.Option(html.WIDTH), display: can._msg.Option(html.HEIGHT)} + var content = can.ui.content; if (!content) { return } if (content._root) { can.ui.content = content._root } can.ui.size = {profile: can._msg.Option(html.WIDTH), display: can._msg.Option(html.HEIGHT)} can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) { can.ui.content = content, can.onlayout.layout(can, height, width) can.ui.tabs.style.width = "" var sub = can.ui.profile._plugin; sub && can.page.isDisplay(can.ui.profile) && sub.onimport && sub.onimport.size(sub, can.ui.profile.offsetHeight, can.ui.profile.offsetWidth-1, true)