Skip to content

Commit

Permalink
fixup: wont show fullscreen icon on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa committed Apr 9, 2023
1 parent 601e72b commit 3c1e818
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
24 changes: 13 additions & 11 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -593,17 +593,19 @@ export function Chat(props: {
}}
/>
</div>
<div className={styles["window-action-button"]}>
<IconButton
icon={chatStore.config.tightBorder ? <MinIcon /> : <MaxIcon />}
bordered
onClick={() => {
chatStore.updateConfig(
(config) => (config.tightBorder = !config.tightBorder),
);
}}
/>
</div>
{!isMobileScreen() && (
<div className={styles["window-action-button"]}>
<IconButton
icon={chatStore.config.tightBorder ? <MinIcon /> : <MaxIcon />}
bordered
onClick={() => {
chatStore.updateConfig(
(config) => (config.tightBorder = !config.tightBorder),
);
}}
/>
</div>
)}
</div>

<PromptToast
Expand Down
4 changes: 4 additions & 0 deletions app/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ function useDragSideBar() {
};

useEffect(() => {
if (isMobileScreen()) {
return;
}

document.documentElement.style.setProperty(
"--sidebar-width",
`${limit(chatStore.config.sidebarWidth ?? 300)}px`,
Expand Down

0 comments on commit 3c1e818

Please sign in to comment.