refactor: albums-list (#23765)

This commit is contained in:
Jason Rasmussen
2025-11-10 11:49:59 -05:00
committed by GitHub
parent dd393c8346
commit a4e65a7ea8
4 changed files with 74 additions and 99 deletions

View File

@@ -12,7 +12,6 @@ import {
import { handleError } from '$lib/utils/handle-error';
import type { AlbumResponseDto } from '@immich/sdk';
import * as sdk from '@immich/sdk';
import { modalManager } from '@immich/ui';
import { orderBy } from 'lodash-es';
import { t } from 'svelte-i18n';
import { get } from 'svelte/store';
@@ -203,19 +202,6 @@ export const expandAllAlbumGroups = () => {
collapseAllAlbumGroups([]);
};
export const confirmAlbumDelete = async (album: AlbumResponseDto) => {
const $t = get(t);
const confirmation =
album.albumName.length > 0
? $t('album_delete_confirmation', { values: { album: album.albumName } })
: $t('unnamed_album_delete_confirmation');
const description = $t('album_delete_confirmation_description');
const prompt = `${confirmation} ${description}`;
return modalManager.showDialog({ prompt });
};
interface AlbumSortOption {
[option: string]: (order: SortOrder, albums: AlbumResponseDto[]) => AlbumResponseDto[];
}