From af342b6570750eb4c8434ec51de02145fdabaade Mon Sep 17 00:00:00 2001 From: Shea Date: Mon, 22 Jun 2026 09:23:31 +0300 Subject: [PATCH] fix make it not look weird on thin pc monitors Signed-off-by: Shea --- src/app/pages/client/sidebar/UserQuickTools.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/pages/client/sidebar/UserQuickTools.tsx b/src/app/pages/client/sidebar/UserQuickTools.tsx index 512142d24..b5c02e921 100644 --- a/src/app/pages/client/sidebar/UserQuickTools.tsx +++ b/src/app/pages/client/sidebar/UserQuickTools.tsx @@ -7,7 +7,7 @@ import { SettingsTab } from './SettingsTab'; import { useAtom } from 'jotai'; import { isResizingSidebarAtom } from '$state/isResizingSidebar'; import * as css from './UserQuickTools.css'; -import { mobileOrTablet } from '$utils/user-agent'; +import { ScreenSize, useScreenSizeContext } from '$hooks/useScreenSize'; export function UserQuickTools({ width, @@ -20,6 +20,9 @@ export function UserQuickTools({ const underOutstep = width < 190 + 66; const isCollapsed = width < 50 + 66; + const screenSize = useScreenSizeContext(); + const compact = screenSize === ScreenSize.Mobile; + return ( <> {/* Doing it properly and nicely would require a major rewrite that would cause more trouble*/} @@ -31,7 +34,7 @@ export function UserQuickTools({ style={{ opacity: isResizingSidebar ? '0%' : '100%', transition: isResizingSidebar ? 'opacity 0.2s ease' : 'opacity 0.5s ease', - width: mobileOrTablet() ? '100%' : toRem(width), + width: compact ? '100%' : toRem(width), paddingRight: underOutstep ? config.space.S200 : config.space.S300, }} >