mirror of
https://github.com/immich-app/immich
synced 2026-08-29 13:15:45 +00:00
refactor: albums-list (#23765)
This commit is contained in:
parent
dd393c8346
commit
a4e65a7ea8
4 changed files with 74 additions and 99 deletions
|
|
@ -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[];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue