mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Delete album on web (#373)
* Show context menu * Show context menu at the correct location * Implement delete album button * Delete album within album viewer
This commit is contained in:
parent
9c3f848fa8
commit
969f770df0
6 changed files with 109 additions and 15 deletions
|
|
@ -222,6 +222,21 @@
|
|||
console.log('Error [sharedUserDeletedHandler] ', e);
|
||||
}
|
||||
};
|
||||
|
||||
const removeAlbum = async () => {
|
||||
if (
|
||||
window.confirm(
|
||||
`Are you sure you want to delete album ${album.albumName}? If the album is shared, other users will not be able to access it.`
|
||||
)
|
||||
) {
|
||||
try {
|
||||
await api.albumApi.deleteAlbum(album.id);
|
||||
goto(backUrl);
|
||||
} catch (e) {
|
||||
console.log('Error [userDeleteMenu] ', e);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<section class="bg-immich-bg">
|
||||
|
|
@ -265,6 +280,7 @@
|
|||
on:click={() => (isShowShareUserSelection = true)}
|
||||
logo={ShareVariantOutline}
|
||||
/>
|
||||
<CircleIconButton title="Remove album" on:click={removeAlbum} logo={DeleteOutline} />
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue