mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Show active state
This commit is contained in:
1 parent
8eecd942ed
commit
bdcbc4b3aa
1 file changed
+12
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { fade } from 'svelte/transition';
|
||||
import { page } from '$app/stores';
|
||||
import {
|
||||
Icon,
|
||||
Sidebar,
|
||||
@@ -62,6 +63,7 @@
|
||||
}
|
||||
|
||||
$: state = $isTabletViewport ? 'closed' : getSidebarState();
|
||||
$: pathname = $page.url.pathname;
|
||||
|
||||
$: updateSidebarState(state);
|
||||
|
||||
@@ -148,6 +150,7 @@
|
||||
<a
|
||||
href={`/console/project-${project.$id}/${projectOption.slug}`}
|
||||
class="link"
|
||||
class:active={pathname.includes(projectOption.slug)}
|
||||
on:click={() => {
|
||||
sideBarIsOpen = false;
|
||||
}}
|
||||
@@ -276,6 +279,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.active {
|
||||
background: var(--color-bgcolor-neutral-secondary, #f4f4f7);
|
||||
.link-text {
|
||||
color: var(--color-fgcolor-neutral-primary);
|
||||
}
|
||||
.link-icon {
|
||||
color: var(--color-fgcolor-neutral-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.icons .link {
|
||||
gap: 0;
|
||||
|
||||
Reference in new issue
Block a user