mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Fix subnavigation (collections databases) for mobile
This commit is contained in:
@@ -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);
|
||||
</script>
|
||||
@@ -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}>
|
||||
<div class="chat-content">
|
||||
{#if !minimizeChat}
|
||||
<header>
|
||||
@@ -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;
|
||||
|
||||
@@ -120,7 +120,10 @@
|
||||
class:sub-navigation={$page.data.subNavigation}>
|
||||
{#if $isSmallViewport}
|
||||
{#if hasProjectSidebar}
|
||||
<Chat bind:showChat={$showChat} width={chatWidth} />
|
||||
<Chat
|
||||
bind:showChat={$showChat}
|
||||
width={chatWidth}
|
||||
hasSubNavigation={$page.data?.subNavigation} />
|
||||
{/if}
|
||||
<Card.Base>
|
||||
<Layout.Stack>
|
||||
@@ -133,7 +136,10 @@
|
||||
{:else}
|
||||
<Layout.Stack direction="row" gap="l">
|
||||
{#if hasProjectSidebar}
|
||||
<Chat bind:showChat={$showChat} width={chatWidth} />
|
||||
<Chat
|
||||
bind:showChat={$showChat}
|
||||
width={chatWidth}
|
||||
hasSubNavigation={$page.data?.subNavigation} />
|
||||
{#if $showChat}
|
||||
<div
|
||||
class="resizer"
|
||||
@@ -218,7 +224,9 @@
|
||||
}
|
||||
|
||||
&.sub-navigation {
|
||||
margin-top: 96px;
|
||||
@media (min-width: 1024px) {
|
||||
margin-top: 48px;
|
||||
width: calc(100vw - 320px);
|
||||
margin-left: 215px;
|
||||
}
|
||||
@@ -300,7 +308,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
:global(.sub-navigation nav) {
|
||||
:global(.sub-navigation nav),
|
||||
:global(.sub-navigation header) {
|
||||
--bgcolor-neutral-primary: var(--bgcolor-neutral-default);
|
||||
--border-width-s: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user