diff --git a/src/views/Profile/Dialogs/PageInformations/BannerPicker.vue b/src/views/Profile/Dialogs/PageInformations/BannerPicker.vue index 2b64e11..5cff0bb 100644 --- a/src/views/Profile/Dialogs/PageInformations/BannerPicker.vue +++ b/src/views/Profile/Dialogs/PageInformations/BannerPicker.vue @@ -18,7 +18,7 @@ >
- Annuler + Annuler Enregistrer
@@ -34,6 +34,8 @@ const props = defineProps({ } }) +const emits = defineEmits(['closeRequested']) + const selectedFile = ref("") const fileUrl = ref(props.creator.storedDataUrls.bannerPictureUrl) @@ -60,9 +62,14 @@ const publish = async () => { formData) props.creator.storedDataUrls.bannerPictureUrl = fileUrl + emits('closeRequested') } catch (error) { console.error(error) } } +const cancel = () => { + emits('closeRequested') +} + diff --git a/src/views/Profile/PageInformations.vue b/src/views/Profile/PageInformations.vue index 543d1bc..6cd7b88 100644 --- a/src/views/Profile/PageInformations.vue +++ b/src/views/Profile/PageInformations.vue @@ -38,14 +38,31 @@ const componentsMap = { ColorMenu }; -const openModal = (component) => { - currentComponent.value = componentsMap[component]; - dialog.value = true; -}; +const openDialog = (component) => { + currentComponent.value = componentsMap[component] + dialog.value = true +} + +const closeDialog = () => { + currentComponent.value = null + dialog.value = false +}