refactor: admin sidebar (#18276)

This commit is contained in:
Jason Rasmussen 2025-05-14 11:23:57 -04:00 committed by GitHub
parent 4efc41d5d9
commit 4445288758
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 103 additions and 55 deletions

View file

@ -30,10 +30,12 @@
interface Props {
showUploadButton?: boolean;
onUploadClick: () => void;
onUploadClick?: () => void;
// TODO: remove once this is only used in <AppShellHeader>
noBorder?: boolean;
}
let { showUploadButton = true, onUploadClick }: Props = $props();
let { showUploadButton = true, onUploadClick, noBorder = false }: Props = $props();
let shouldShowAccountInfoPanel = $state(false);
let shouldShowNotificationPanel = $state(false);
@ -55,7 +57,9 @@
>
<SkipLink text={$t('skip_to_content')} />
<div
class="grid h-full grid-cols-[theme(spacing.32)_auto] items-center border-b py-2 dark:border-b-immich-dark-gray sidebar:grid-cols-[theme(spacing.64)_auto]"
class="grid h-full grid-cols-[theme(spacing.32)_auto] items-center py-2 dark:border-b-immich-dark-gray sidebar:grid-cols-[theme(spacing.64)_auto] {noBorder
? ''
: 'border-b'}"
>
<div class="flex flex-row gap-1 mx-4 items-center">
<IconButton
@ -103,7 +107,7 @@
/>
{/if}
{#if !page.url.pathname.includes('/admin') && showUploadButton}
{#if !page.url.pathname.includes('/admin') && showUploadButton && onUploadClick}
<Button
leadingIcon={mdiTrayArrowUp}
onclick={onUploadClick}