diff --git a/resources/js/components/drawers/AlbumEdit.vue b/resources/js/components/drawers/AlbumEdit.vue index b4503863219..481fba697d8 100644 --- a/resources/js/components/drawers/AlbumEdit.vue +++ b/resources/js/components/drawers/AlbumEdit.vue @@ -58,7 +58,13 @@
- +
@@ -96,4 +102,9 @@ const canShare = computed(() => props.album.rights.can_share_with_users && numUs const canMove = computed(() => props.config.is_model_album && props.album.rights.can_move); const canTransfer = computed(() => props.config.is_base_album && numUsers.value > 1 && props.album.rights.can_transfer); const canDelete = computed(() => props.config.is_base_album && props.album.rights.can_delete); + +function close() { + activeTab.value = 0; + are_details_open.value = false; +} diff --git a/resources/js/components/forms/album/AlbumDelete.vue b/resources/js/components/forms/album/AlbumDelete.vue index 263fdb8b59f..ba4119fc3ee 100644 --- a/resources/js/components/forms/album/AlbumDelete.vue +++ b/resources/js/components/forms/album/AlbumDelete.vue @@ -26,8 +26,13 @@ const props = defineProps<{ const router = useRouter(); const title = computed(() => sprintf(trans("lychee.DELETE_ALBUM_CONFIRMATION"), props.album.title)); +const emits = defineEmits<{ + deleted: []; +}>(); + function execute() { AlbumService.delete([props.album.id]).then(() => { + emits("deleted"); if (props.is_model_album) { const album = props.album as App.Http.Resources.Models.AlbumResource; AlbumService.clearCache(album.parent_id);