diff --git a/src/lib/layout/coverTitle.svelte b/src/lib/layout/coverTitle.svelte index eb3a43fa1..3f3b30f06 100644 --- a/src/lib/layout/coverTitle.svelte +++ b/src/lib/layout/coverTitle.svelte @@ -2,11 +2,12 @@ import { isSmallViewport } from '$lib/stores/viewport'; import { IconChevronLeft } from '@appwrite.io/pink-icons-svelte'; import { Typography, Button, Icon } from '@appwrite.io/pink-svelte'; + import { isStudio } from '$lib/system'; export let href: string = null; -{#if href} +{#if href && !isStudio} diff --git a/src/lib/layout/shellStudio.svelte b/src/lib/layout/shellStudio.svelte index 804707e29..345d4285f 100644 --- a/src/lib/layout/shellStudio.svelte +++ b/src/lib/layout/shellStudio.svelte @@ -51,8 +51,10 @@ pathnameWatcher.subscribe(() => {}); let resizer; - let resizerLeftPosition = 500; - let chatWidth = resizerLeftPosition - 52; + $: resizerLeftPosition = $page.data?.subNavigation ? 360 : 500; + $: resizerLeftOffset = $page.data?.subNavigation ? 0 : 52; + $: chatWidth = resizerLeftPosition - resizerLeftOffset; + let isResizing = false; function startResize(event) { @@ -67,8 +69,18 @@ if (!isResizing) return; if (resizer) { - resizerLeftPosition = event.clientX; - chatWidth = event.clientX - 52; + resizerLeftPosition = $page.data?.subNavigation ? event.clientX - 280 : event.clientX; + const maxSize = $page.data?.subNavigation + ? window.innerWidth - 660 + : window.innerWidth - 460; + + const minSize = 320; + + if (resizerLeftPosition > maxSize) { + resizerLeftPosition = maxSize; + } else if (resizerLeftPosition < minSize) { + resizerLeftPosition = minSize; + } } } @@ -102,15 +114,18 @@ -
+
{#if $isSmallViewport} {#if hasProjectSidebar} {/if} - {#if $page.data?.header} - + {#if $page.data?.subNavigation} + {/if} @@ -145,6 +160,11 @@ project={$page.data.project} bind:showChat={$showChat} bind:isOpen={showSideNavigation} /> + {#if $page.data.subNavigation} + + {/if} {:else}