diff --git a/web/src/lib/components/layouts/AdminPageLayout.svelte b/web/src/lib/components/layouts/AdminPageLayout.svelte index 6a0d6508dc..6ec982d132 100644 --- a/web/src/lib/components/layouts/AdminPageLayout.svelte +++ b/web/src/lib/components/layouts/AdminPageLayout.svelte @@ -1,7 +1,7 @@ @@ -42,22 +48,20 @@
- {#if actions.length > 0} + {#if enabledActions.length > 0} diff --git a/web/src/lib/components/layouts/user-page-layout.svelte b/web/src/lib/components/layouts/user-page-layout.svelte index 34c1aef4fc..af85f5f37f 100644 --- a/web/src/lib/components/layouts/user-page-layout.svelte +++ b/web/src/lib/components/layouts/user-page-layout.svelte @@ -40,6 +40,12 @@ children, }: Props = $props(); + const enabledActions = $derived( + actions + .filter((action): action is HeaderButtonActionItem => !isMenuItemType(action)) + .filter((action) => action.$if?.() ?? true), + ); + let scrollbarClass = $derived(scrollbar ? 'immich-scrollbar' : 'scrollbar-hidden'); let hasTitleClass = $derived(title ? 'top-16 h-[calc(100%-(--spacing(16)))]' : 'top-0 h-full'); @@ -82,22 +88,20 @@ {@render buttons?.()} - {#if actions.length > 0} + {#if enabledActions.length > 0}