mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00: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:
parent
843345df4f
commit
7a4fccb1b2
4 changed files with 21 additions and 10 deletions
|
|
@ -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 });
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue