forked from mirrors/akkoma-fe
post_status_form: reset all to defaults on clear
This commit is contained in:
parent
afbba1276f
commit
d12c4d5a4e
2 changed files with 8 additions and 4 deletions
|
|
@ -342,17 +342,20 @@ const PostStatusForm = {
|
||||||
this.saveDraft()
|
this.saveDraft()
|
||||||
},
|
},
|
||||||
clearStatus () {
|
clearStatus () {
|
||||||
const newStatus = this.newStatus
|
const config = this.$store.getters.mergedConfig
|
||||||
|
const postLanguage = config.postLanguage || interfaceToISOLanguage(config.interfaceLanguage)
|
||||||
this.newStatus = {
|
this.newStatus = {
|
||||||
status: '',
|
status: '',
|
||||||
spoilerText: '',
|
spoilerText: '',
|
||||||
files: [],
|
files: [],
|
||||||
visibility: newStatus.visibility,
|
nsfw: !!config.sensitiveByDefault,
|
||||||
contentType: newStatus.contentType,
|
visibility: this.suggestedVisibility(),
|
||||||
language: newStatus.language,
|
contentType: config.postContentType,
|
||||||
|
language: postLanguage,
|
||||||
poll: {},
|
poll: {},
|
||||||
mediaDescriptions: {}
|
mediaDescriptions: {}
|
||||||
}
|
}
|
||||||
|
this.$refs.scopeselector.currentScope = this.newStatus.visibility
|
||||||
this.pollFormVisible = false
|
this.pollFormVisible = false
|
||||||
this.$refs.mediaUpload && this.$refs.mediaUpload.clearFile()
|
this.$refs.mediaUpload && this.$refs.mediaUpload.clearFile()
|
||||||
this.clearPollForm()
|
this.clearPollForm()
|
||||||
|
|
|
||||||
|
|
@ -195,6 +195,7 @@
|
||||||
:class="{ 'visibility-tray-edit': isEdit }"
|
:class="{ 'visibility-tray-edit': isEdit }"
|
||||||
>
|
>
|
||||||
<scope-selector
|
<scope-selector
|
||||||
|
ref="scopeselector"
|
||||||
v-if="!disableVisibilitySelector"
|
v-if="!disableVisibilitySelector"
|
||||||
:user-default="userDefaultScope"
|
:user-default="userDefaultScope"
|
||||||
:original-scope="copyMessageScope"
|
:original-scope="copyMessageScope"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue