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
+3 -1
View File
@@ -26,7 +26,7 @@ import {
type SharedLinkResponseDto,
type UserResponseDto,
} from '@immich/sdk';
import { toastManager, type ActionItem } from '@immich/ui';
import { toastManager, type ActionItem, type IfLike } from '@immich/ui';
import { mdiCogRefreshOutline, mdiDatabaseRefreshOutline, mdiHeadSyncOutline, mdiImageRefreshOutline } from '@mdi/js';
import { init, register, t } from 'svelte-i18n';
import { derived, get } from 'svelte/store';
@@ -443,3 +443,5 @@ export const semverToName = ({ major, minor, patch }: ServerVersionResponseDto)
export const withoutIcons = (actions: ActionItem[]): ActionItem[] =>
actions.map((action) => ({ ...action, icon: undefined }));
export const isEnabled = ({ $if }: IfLike) => $if?.() ?? true;