mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(web): admin layout (#4461)
This commit is contained in:
parent
268a9c4803
commit
9d225d3d06
12 changed files with 333 additions and 344 deletions
|
|
@ -3,11 +3,14 @@
|
|||
import type { UserResponseDto } from '@api';
|
||||
import NavigationBar from '../shared-components/navigation-bar/navigation-bar.svelte';
|
||||
import SideBar from '../shared-components/side-bar/side-bar.svelte';
|
||||
import AdminSideBar from '../shared-components/side-bar/admin-side-bar.svelte';
|
||||
|
||||
export let user: UserResponseDto;
|
||||
export let hideNavbar = false;
|
||||
export let showUploadButton = false;
|
||||
export let title: string | undefined = undefined;
|
||||
export let scrollbar = true;
|
||||
export let admin = false;
|
||||
|
||||
$: scrollbarClass = scrollbar ? 'immich-scrollbar p-4 pb-8' : 'scrollbar-hidden pl-4';
|
||||
</script>
|
||||
|
|
@ -23,7 +26,11 @@
|
|||
class="relative grid h-screen grid-cols-[theme(spacing.18)_auto] overflow-hidden bg-immich-bg pt-[var(--navbar-height)] dark:bg-immich-dark-bg md:grid-cols-[theme(spacing.64)_auto]"
|
||||
>
|
||||
<slot name="sidebar">
|
||||
<SideBar />
|
||||
{#if admin}
|
||||
<AdminSideBar />
|
||||
{:else}
|
||||
<SideBar />
|
||||
{/if}
|
||||
</slot>
|
||||
<slot name="content">
|
||||
{#if title}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue