From 8da88e8bc84288f8a1187c4fb1dd3e7b3debaf5a Mon Sep 17 00:00:00 2001 From: liwenrui Date: Mon, 6 Nov 2023 16:44:35 +0800 Subject: [PATCH] * widen chat area. --- module/index/view/chatview.html.php | 21 ++++++++++--------- .../ext/view/index.xuanxuan.html.hook.php | 6 +++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/module/index/view/chatview.html.php b/module/index/view/chatview.html.php index e395a0aea8..c8a3ae0d3c 100644 --- a/module/index/view/chatview.html.php +++ b/module/index/view/chatview.html.php @@ -12,20 +12,20 @@
@@ -49,16 +49,17 @@ { clearInterval(xuanFrameWaitLoop); tries = 0; - const chatsMenuWaitLoop = setInterval(function() + const chatsViewWaitLoop = setInterval(function() { if(document.querySelector('#xx-embed-container iframe').contentDocument.querySelector('.app-chats-menu')) { - clearInterval(chatsMenuWaitLoop); - document.querySelector('#xx-embed-container iframe').contentDocument.querySelector('.app-chats-menu').style.top = '48px'; + clearInterval(chatsViewWaitLoop); + document.querySelector('#xx-embed-container iframe').contentDocument.querySelector('.app-chats-menu').style.cssText = 'width: 330px !important; top: 48px;'; + document.querySelector('#xx-embed-container iframe').contentDocument.querySelector('.app-chats-cache').style.cssText = 'right: 330px !important;'; } else { - if(++tries > 20) clearInterval(chatsMenuWaitLoop); + if(++tries > 20) clearInterval(chatsViewWaitLoop); } }, 200); } diff --git a/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php b/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php index 030c11722d..f4b1058550 100644 --- a/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php +++ b/xuanxuan/extension/xuan/index/ext/view/index.xuanxuan.html.hook.php @@ -54,9 +54,9 @@ if(isset($this->config->xuanxuan->turnon) && $this->config->xuanxuan->turnon && #chatNoticeBadge.show {opacity: 1; transform: scale(1);} #xx-embed-container {bottom: 40px!important; z-index: 1010!important;} #xx-embed-container .xx-embed-has-animation {transition: min-width .5s ease-out, min-height .5s ease-out, transform, opacity!important;} -#xx-embed-container .xx-embed {width: 280px; height: 100%; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06)!important;} +#xx-embed-container .xx-embed {width: 330px; height: 100%; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06)!important;} #xx-embed-container .xx-embed.xx-embed-hidden, -#xx-embed-container .xx-embed.xx-embed-collapsed {width: 280px!important; height: 100%!important; opacity: .7; pointer-events: none; transform: translateY(100%); display: block!important;} +#xx-embed-container .xx-embed.xx-embed-collapsed {width: 330px!important; height: 100%!important; opacity: .7; pointer-events: none; transform: translateY(100%); display: block!important;} #xx-embed-container .xx-embed.has-chat-view {min-width: 1000px!important;} #xx-embed-container .xx-embed-body {min-height: initial!important;} @@ -88,7 +88,7 @@ function handleXuanRouteChange(route) Xuanxuan.setGlobalOptions( { position: 'right', - width: 280, + width: 330, preload: true, showHeader: false, onNotice: handleXuanNoticeChange,