From 2fd4ee4a01b1864fc9a765e0eb8347bf4c3074c6 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Wed, 26 Feb 2025 10:11:01 +0100 Subject: [PATCH] Fix responsiveness for tablet --- src/lib/stores/viewport.ts | 4 ++-- .../collection-[collection]/subNavigation.svelte | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/stores/viewport.ts b/src/lib/stores/viewport.ts index 159eb7c9d..beeb1777c 100644 --- a/src/lib/stores/viewport.ts +++ b/src/lib/stores/viewport.ts @@ -6,11 +6,11 @@ export const isTabletViewport = writable(false); export function updateViewport() { if (typeof window !== 'undefined') { isSmallViewport.set( - typeof window !== 'undefined' ? window.matchMedia('(max-width: 768px)').matches : false + typeof window !== 'undefined' ? window.matchMedia('(max-width: 767px)').matches : false ); isTabletViewport.set( - typeof window !== 'undefined' ? window.matchMedia('(max-width: 1024px)').matches : false + typeof window !== 'undefined' ? window.matchMedia('(max-width: 1023px)').matches : false ); } } diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/subNavigation.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/subNavigation.svelte index ddc079015..172aa29ae 100644 --- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/subNavigation.svelte +++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/subNavigation.svelte @@ -21,6 +21,7 @@ $: selectedCollection = sortedCollections.find((collection) => collection.$id === collectionId); let openBottomSheet = false; + console.log('isTabletViewport', $isTabletViewport); {#if !$isTabletViewport}