From 9d9e0a974599460ed6dc71b5f2632dc090ecd8a5 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Tue, 8 Apr 2025 15:36:53 +0200 Subject: [PATCH] Fix subnavigation (collections databases) for mobile --- src/lib/components/chat/chat.svelte | 13 +++++++++++-- src/lib/layout/shellStudio.svelte | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/lib/components/chat/chat.svelte b/src/lib/components/chat/chat.svelte index 249996bf6..1fb3c87ce 100644 --- a/src/lib/components/chat/chat.svelte +++ b/src/lib/components/chat/chat.svelte @@ -12,8 +12,9 @@ type Props = { showChat: boolean; width: number; + hasSubNavigation: boolean; }; - let { showChat = $bindable(), width }: Props = $props(); + let { showChat = $bindable(), width, hasSubNavigation }: Props = $props(); let minimizeChat = $state($isSmallViewport ? true : false); @@ -22,7 +23,8 @@ class="chat" style:width={$isSmallViewport ? 'calc(100vw - 16px)' : showChat ? `${width}px` : 0} class:minimize-chat={minimizeChat} - class:is-visible={showChat}> + class:is-visible={showChat} + class:sub-navigation={hasSubNavigation}>
{#if !minimizeChat}
@@ -95,6 +97,13 @@ top: 48px; height: calc(100vh - 70px); } + + &.sub-navigation { + @media (max-width: 1024px) { + top: 96px; + height: calc(100vh - 96px); + } + } } .chat.minimize-chat { top: auto; diff --git a/src/lib/layout/shellStudio.svelte b/src/lib/layout/shellStudio.svelte index 345d4285f..21646a41d 100644 --- a/src/lib/layout/shellStudio.svelte +++ b/src/lib/layout/shellStudio.svelte @@ -120,7 +120,10 @@ class:sub-navigation={$page.data.subNavigation}> {#if $isSmallViewport} {#if hasProjectSidebar} - + {/if} @@ -133,7 +136,10 @@ {:else} {#if hasProjectSidebar} - + {#if $showChat}