refactor: download action (#25124)

This commit is contained in:
Jason Rasmussen
2026-01-07 17:01:20 -05:00
committed by GitHub
parent ef4aec7398
commit 4f803832ad
9 changed files with 109 additions and 103 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { isEnabled } from '$lib/utils';
import { IconButton, type ActionItem } from '@immich/ui';
type Props = {
@@ -9,6 +10,6 @@
const { title, icon, color = 'secondary', onAction } = $derived(action);
</script>
{#if icon && (action.$if?.() ?? true)}
{#if icon && isEnabled(action)}
<IconButton variant="ghost" shape="round" {color} {icon} aria-label={title} onclick={() => onAction(action)} />
{/if}