diff --git a/src/lib/components/channel/Channel.svelte b/src/lib/components/channel/Channel.svelte index a5bccf4aaa..8237d5858d 100644 --- a/src/lib/components/channel/Channel.svelte +++ b/src/lib/components/channel/Channel.svelte @@ -373,7 +373,7 @@ $socket?.on('events:channel', channelEventHandler); - mediaQuery = window.matchMedia('(min-width: 1024px)'); + mediaQuery = window.matchMedia('(min-width: 768px)'); mediaQuery.addEventListener('change', handleMediaQuery); handleMediaQuery(mediaQuery); @@ -553,6 +553,7 @@ bind:width={threadPanelWidth} minWidth={320} maxWidth={640} + minSiblingWidth={360} className="h-full" >
diff --git a/src/lib/components/chat/ChatControls.svelte b/src/lib/components/chat/ChatControls.svelte index e8e5ea5375..77b0c3bc4d 100644 --- a/src/lib/components/chat/ChatControls.svelte +++ b/src/lib/components/chat/ChatControls.svelte @@ -347,7 +347,7 @@ -
+
{ const newId = $selectedTerminalId === terminal.url ? null : terminal.url; selectedTerminalId.set(newId); - if (newId && window.matchMedia('(min-width: 1024px)').matches) { + if (newId && !$mobile) { showControls.set($settings?.showFilesOnTerminalSelect ?? true); } @@ -92,7 +93,7 @@ const selectSystem = async (terminal: (typeof systemTerminals)[0]) => { const newId = $selectedTerminalId === terminal.id ? null : terminal.id; selectedTerminalId.set(newId); - if (newId && window.matchMedia('(min-width: 1024px)').matches) { + if (newId && !$mobile) { showControls.set($settings?.showFilesOnTerminalSelect ?? true); } diff --git a/src/lib/components/layout/SearchModal.svelte b/src/lib/components/layout/SearchModal.svelte index a1b86153c3..b2e16c4825 100644 --- a/src/lib/components/layout/SearchModal.svelte +++ b/src/lib/components/layout/SearchModal.svelte @@ -88,9 +88,11 @@ const quietButton = 'focus-ring flex h-[1.6875rem] shrink-0 items-center justify-center gap-1 rounded-lg px-1.5 text-[0.6875rem] font-normal text-gray-500 hover:bg-gray-50/60 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800/60 dark:hover:text-gray-200'; $: if (show && typeof window !== 'undefined') { + const savedPreview = localStorage.getItem('searchPreview'); preview = - window.matchMedia('(min-width: 1024px)').matches && - localStorage.getItem('searchPreview') !== 'false'; + savedPreview === null + ? window.matchMedia('(min-width: 768px)').matches + : savedPreview === 'true'; } $: schedule(show, query, kind, sharing, scope); diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 3ddd1ae054..4e0cbe36fb 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -104,7 +104,6 @@ import MoreHorizontalIcon from './Sidebar/icons/MoreHorizontal.svelte'; import MobileSwipePanel from '../common/MobileSwipePanel.svelte'; - const BREAKPOINT = 768; const DEFAULT_PINNED_ITEMS = ['notes', 'workspace']; let scrollTop = 0;