Close dialog on draft save/abandon without promting to save. Fixes #1351
This commit is contained in:
parent
a18854a30d
commit
d0228728f4
5 changed files with 7 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
|||
class="panel-body"
|
||||
:params="params"
|
||||
@posted="doCloseModal"
|
||||
@draft-done="doCloseModal"
|
||||
@can-close="doCloseModal"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -116,6 +116,7 @@ const PostStatusForm = {
|
|||
],
|
||||
emits: [
|
||||
'posted',
|
||||
'draft-done',
|
||||
'resize',
|
||||
'mediaplay',
|
||||
'mediapause',
|
||||
|
@ -761,12 +762,14 @@ const PostStatusForm = {
|
|||
this.newStatus.id = id
|
||||
}
|
||||
this.saveable = false
|
||||
this.$emit('draft-done')
|
||||
})
|
||||
} else if (this.newStatus.id) {
|
||||
// There is a draft, but there is nothing in it, clear it
|
||||
return this.abandonDraft()
|
||||
.then(() => {
|
||||
this.saveable = false
|
||||
this.$emit('draft-done')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -339,7 +339,7 @@
|
|||
v-if="!hideDraft"
|
||||
class="menu-item dropdown-item dropdown-item-icon"
|
||||
role="menu"
|
||||
:disabled="!safeToSaveDraft"
|
||||
:disabled="!safeToSaveDraft && saveable"
|
||||
:class="{ disabled: !safeToSaveDraft }"
|
||||
@click.prevent="saveDraft"
|
||||
@click="close"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
class="panel-body"
|
||||
v-bind="params"
|
||||
@posted="resetAndClose"
|
||||
@draft-done="resetAndClose"
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
|
|
|
@ -606,6 +606,7 @@
|
|||
:copy-message-scope="status.visibility"
|
||||
:subject="replySubject"
|
||||
@posted="doToggleReplying"
|
||||
@draft-done="doToggleReplying"
|
||||
@can-close="doToggleReplying"
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue