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:
Alex 2022-07-24 22:47:12 -05:00 committed by GitHub
parent 9c3f848fa8
commit 969f770df0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 109 additions and 15 deletions

View file

@ -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}