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:
Snowknight26
2024-08-24 23:59:18 -05:00
committed by GitHub
parent 843345df4f
commit 7a4fccb1b2
4 changed files with 21 additions and 10 deletions

View File

@@ -82,9 +82,9 @@
} from '@mdi/js';
import { fly } from 'svelte/transition';
import type { PageData } from './$types';
import { dialogController } from '$lib/components/shared-components/dialog/dialog';
import { t } from 'svelte-i18n';
import { onDestroy } from 'svelte';
import { confirmAlbumDelete } from '$lib/utils/album-utils';
export let data: PageData;
@@ -365,9 +365,7 @@
};
const handleRemoveAlbum = async () => {
const isConfirmed = await dialogController.show({
prompt: $t('album_delete_confirmation', { values: { album: album.albumName } }),
});
const isConfirmed = await confirmAlbumDelete(album);
if (!isConfirmed) {
viewMode = ViewMode.VIEW;