mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web): use user layout on admin pages (#2550)
This commit is contained in:
parent
c2145cbe11
commit
2dc8a93685
3 changed files with 41 additions and 58 deletions
|
|
@ -11,11 +11,7 @@
|
|||
|
||||
<header>
|
||||
{#if !hideNavbar}
|
||||
<NavigationBar
|
||||
{user}
|
||||
shouldShowUploadButton={showUploadButton}
|
||||
on:uploadClicked={() => openFileUploadDialog()}
|
||||
/>
|
||||
<NavigationBar {user} {showUploadButton} on:uploadClicked={() => openFileUploadDialog()} />
|
||||
{/if}
|
||||
|
||||
<slot name="header" />
|
||||
|
|
@ -24,7 +20,9 @@
|
|||
<main
|
||||
class="grid md:grid-cols-[theme(spacing.64)_auto] grid-cols-[theme(spacing.18)_auto] relative pt-[var(--navbar-height)] h-screen overflow-hidden bg-immich-bg dark:bg-immich-dark-bg"
|
||||
>
|
||||
<SideBar />
|
||||
<slot name="sidebar">
|
||||
<SideBar />
|
||||
</slot>
|
||||
<slot name="content">
|
||||
{#if title}
|
||||
<section class="relative">
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
import IconButton from '$lib/components/elements/buttons/icon-button.svelte';
|
||||
import Cog from 'svelte-material-icons/Cog.svelte';
|
||||
export let user: UserResponseDto;
|
||||
export let shouldShowUploadButton = true;
|
||||
export let showUploadButton = true;
|
||||
|
||||
let shouldShowAccountInfo = false;
|
||||
let shouldShowAccountInfoPanel = false;
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
<ThemeButton />
|
||||
|
||||
{#if !$page.url.pathname.includes('/admin') && shouldShowUploadButton}
|
||||
{#if !$page.url.pathname.includes('/admin') && showUploadButton}
|
||||
<div in:fly={{ x: 50, duration: 250 }}>
|
||||
<LinkButton on:click={() => dispatch('uploadClicked')}>
|
||||
<div class="flex gap-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue