fix(front): properly close album modal in parent template

This commit is contained in:
ArneBo 2025-04-09 13:58:20 +02:00
parent e23377df06
commit 44cf5b05ab
2 changed files with 4 additions and 3 deletions

View File

@ -39,12 +39,11 @@ const submit = async () => {
title: newAlbumTitle.value,
artist: channel.value.artist?.id
})
emit('created')
} catch (error) {
errors.value = (error as BackendError).backendErrors
} finally {
isLoading.value = false
isOpen.value = false // TODO: Fix the @created event to close the modal in channels/DetailOverview.vue
emit('created')
}
}

View File

@ -94,6 +94,8 @@ if (isOwner.value) {
})
})
}
const { to, isOpen } = useModal('album')
</script>
<template>
@ -206,7 +208,7 @@ if (isOwner.value) {
v-if="isOwner"
:model-value="object"
:channel="object"
@created="useModal('album').isOpen.value = false; seriesKey = new Date()"
@created="isOpen = false; seriesKey = new Date()"
/>
</section>
</template>