mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
fix(web): show a clearer confirmation message when deleting an unnamed album (#11988)
* fix(web): show a different confirmation message when deleting an unnamed album * Rename the function * Fix formatting
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { dialogController } from '$lib/components/shared-components/dialog/dialog';
|
||||
import { AppRoute } from '$lib/constants';
|
||||
import {
|
||||
AlbumFilter,
|
||||
@@ -199,3 +200,16 @@ export const collapseAllAlbumGroups = (groupIds: string[]) => {
|
||||
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 dialogController.show({ prompt });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user