From 6c9ee005fda23840d1864dfd52ff5de92b667fbc Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Fri, 3 Oct 2025 12:47:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A9=AB=E8=B1=8E=E5=B1=8F=E5=88=87?= =?UTF-8?q?=E6=8F=9B=20resize=20=E6=99=82=E7=9A=84=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E4=B8=8D=E7=95=B6=20*=20=E6=A9=AB=E5=B1=8F=E6=99=82,=20?= =?UTF-8?q?=E6=B8=AC=E8=A9=A6=20Via=20=E7=80=8F=E8=A6=BD=E5=99=A8=E6=99=82?= =?UTF-8?q?=20=E5=8F=AF=E8=83=BD=E6=98=AF=E5=9B=A0=E7=82=BA=E5=85=A8?= =?UTF-8?q?=E5=B1=8F=E4=B8=8D=E7=95=B6,=20=E5=A4=A7=E5=B0=8F=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A2=BA,=20=E4=B9=9F=E5=9B=A0=E6=AD=A4=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=89=8B=E5=8B=95=E7=B8=AE=E5=B0=8F,=20=E7=B9=BC?= =?UTF-8?q?=E7=BA=8C=E5=88=87=E8=B1=8E=E5=B1=8F=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/index.ts b/client/index.ts index dc27019..777031f 100644 --- a/client/index.ts +++ b/client/index.ts @@ -26,13 +26,13 @@ import AppMobile from './ui/AppMobile.tsx' import isMobileUI from "./ui/isMobileUI.ts" ReactDOM.createRoot(document.getElementById('app') as HTMLElement).render(React.createElement(isMobileUI() ? AppMobile : App, null)) -const onResize = () => { +const onResize = () => setTimeout(() => { document.body.style.setProperty('--whitesilk-widget-message-maxwidth', breakpoint().down('md') ? "80%" : "70%") // deno-lint-ignore no-window - document.body.style.setProperty('--whitesilk-window-width', window.innerWidth + 'px') + document.body.style.setProperty('--whitesilk-window-width', window.screen.availWidth + 'px') // deno-lint-ignore no-window - document.body.style.setProperty('--whitesilk-window-height', window.innerHeight + 'px') -} + document.body.style.setProperty('--whitesilk-window-height', window.screen.availHeight + 'px') +}, 100) // deno-lint-ignore no-window no-window-prefix window.addEventListener('resize', onResize) onResize()