forked from mirrors/akkoma-fe
post_status_form: reset all to defaults on clear
This commit is contained in:
parent
4bcc905731
commit
6669fe0cfa
1 changed files with 6 additions and 2 deletions
|
|
@ -343,6 +343,7 @@ const PostStatusForm = {
|
||||||
},
|
},
|
||||||
clearStatus () {
|
clearStatus () {
|
||||||
const config = this.$store.getters.mergedConfig
|
const config = this.$store.getters.mergedConfig
|
||||||
|
const postLanguage = config.postLanguage || interfaceToISOLanguage(config.interfaceLanguage)
|
||||||
this.newStatus = {
|
this.newStatus = {
|
||||||
status: '',
|
status: '',
|
||||||
spoilerText: '',
|
spoilerText: '',
|
||||||
|
|
@ -350,11 +351,14 @@ const PostStatusForm = {
|
||||||
nsfw: !!config.sensitiveByDefault,
|
nsfw: !!config.sensitiveByDefault,
|
||||||
visibility: this.suggestedVisibility(),
|
visibility: this.suggestedVisibility(),
|
||||||
contentType: config.postContentType,
|
contentType: config.postContentType,
|
||||||
language: this.suggestedLanguage(),
|
language: postLanguage,
|
||||||
poll: {},
|
poll: {},
|
||||||
mediaDescriptions: {}
|
mediaDescriptions: {}
|
||||||
}
|
}
|
||||||
this.$refs.scopeselector.currentScope = this.newStatus.visibility
|
const scopeselector = this.$refs.scopeselector
|
||||||
|
if (scopeselector) {
|
||||||
|
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()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue