logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: 8a58de5c9fd7b275df2c79eafa8260a9e1fb706e
parent fb8747729850a683995efc0c9823455b13e37e66
Author: tusooa <tusooa@kazv.moe>
Date:   Thu,  6 Apr 2023 14:25:19 -0400

Allow confirmation on closing edit form

Diffstat:

Msrc/components/edit_status_form/edit_status_form.js3+++
Msrc/components/edit_status_form/edit_status_form.vue1+
Msrc/components/edit_status_modal/edit_status_modal.js3+++
Msrc/components/edit_status_modal/edit_status_modal.vue4+++-
4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/components/edit_status_form/edit_status_form.js b/src/components/edit_status_form/edit_status_form.js @@ -12,6 +12,9 @@ const EditStatusForm = { } }, methods: { + requestClose () { + this.$refs.postStatusForm.requestClose() + }, doEditStatus ({ status, spoilerText, sensitive, media, contentType, poll }) { const params = { store: this.$store, diff --git a/src/components/edit_status_form/edit_status_form.vue b/src/components/edit_status_form/edit_status_form.vue @@ -1,5 +1,6 @@ <template> <PostStatusForm + ref="postStatusForm" v-bind="params" :post-handler="doEditStatus" :disable-polls="true" diff --git a/src/components/edit_status_modal/edit_status_modal.js b/src/components/edit_status_modal/edit_status_modal.js @@ -43,6 +43,9 @@ const EditStatusModal = { }, methods: { closeModal () { + this.$refs.editStatusForm.requestClose() + }, + doCloseModal () { this.$store.dispatch('closeEditStatusModal') } } diff --git a/src/components/edit_status_modal/edit_status_modal.vue b/src/components/edit_status_modal/edit_status_modal.vue @@ -9,9 +9,11 @@ {{ $t('post_status.edit_status') }} </div> <EditStatusForm + ref="editStatusForm" class="panel-body" :params="params" - @posted="closeModal" + @posted="doCloseModal" + @can-close="doCloseModal" /> </div> </Modal>