Allow confirmation on closing reply form

This commit is contained in:
tusooa 2023-04-06 14:15:57 -04:00
commit fb87477298
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
11 changed files with 170 additions and 14 deletions

View file

@ -473,6 +473,13 @@ const Status = {
},
toggleReplying () {
this.$emit('interacted')
if (this.replying) {
this.$refs.postStatusForm.requestClose()
} else {
this.doToggleReplying()
}
},
doToggleReplying () {
controlledOrUncontrolledToggle(this, 'replying')
},
gotoOriginal (id) {

View file

@ -598,13 +598,15 @@
class="status-container reply-form"
>
<PostStatusForm
ref="postStatusForm"
class="reply-body"
:reply-to="status.id"
:attentions="status.attentions"
:replied-user="status.user"
:copy-message-scope="status.visibility"
:subject="replySubject"
@posted="toggleReplying"
@posted="doToggleReplying"
@can-close="doToggleReplying"
/>
</div>
</template>