From 3c1e81897adf24aaf86c2a1f52c16f5de1dddaea Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Mon, 10 Apr 2023 01:12:30 +0800 Subject: [PATCH] fixup: wont show fullscreen icon on mobile --- app/components/chat.tsx | 24 +++++++++++++----------- app/components/home.tsx | 4 ++++ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index d25deec8d..33ac3ac57 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -593,17 +593,19 @@ export function Chat(props: { }} /> -
- : } - bordered - onClick={() => { - chatStore.updateConfig( - (config) => (config.tightBorder = !config.tightBorder), - ); - }} - /> -
+ {!isMobileScreen() && ( +
+ : } + bordered + onClick={() => { + chatStore.updateConfig( + (config) => (config.tightBorder = !config.tightBorder), + ); + }} + /> +
+ )} { + if (isMobileScreen()) { + return; + } + document.documentElement.style.setProperty( "--sidebar-width", `${limit(chatStore.config.sidebarWidth ?? 300)}px`,