Add delete & redraft button to posts

This commit is contained in:
Sol Fisher Romanoff 2022-09-25 20:50:03 +03:00
parent 468eb12573
commit ca646822f6
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62
7 changed files with 9196 additions and 8707 deletions

View file

@ -86,7 +86,8 @@ const PostStatusForm = {
'fileLimit',
'submitOnEnter',
'emojiPickerPlacement',
'optimisticPosting'
'optimisticPosting',
'isRedraft'
],
emits: [
'posted',
@ -141,7 +142,7 @@ const PostStatusForm = {
contentType
}
if (this.statusId) {
if (this.statusId || this.isRedraft) {
const statusContentType = this.statusContentType || contentType
statusParams = {
spoilerText: this.subject || '',
@ -259,7 +260,7 @@ const PostStatusForm = {
return this.newStatus.files.length >= this.fileLimit
},
isEdit () {
return typeof this.statusId !== 'undefined' && this.statusId.trim() !== ''
return typeof this.statusId !== 'undefined' && this.statusId.trim() !== '' && !this.isRedraft
},
...mapGetters(['mergedConfig']),
...mapState({