mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge remote-tracking branch 'origin/master' into 801_reset_password
This commit is contained in:
commit
33c969c161
@ -15,7 +15,7 @@
|
|||||||
model="language"
|
model="language"
|
||||||
:options="form.languageOptions"
|
:options="form.languageOptions"
|
||||||
icon="globe"
|
icon="globe"
|
||||||
:placeholder="form.placeholder"
|
:placeholder="locale"
|
||||||
:label="$t('contribution.languageSelectLabel')"
|
:label="$t('contribution.languageSelectLabel')"
|
||||||
/>
|
/>
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
@ -65,7 +65,6 @@ export default {
|
|||||||
content: '',
|
content: '',
|
||||||
language: null,
|
language: null,
|
||||||
languageOptions: [],
|
languageOptions: [],
|
||||||
placeholder: '',
|
|
||||||
},
|
},
|
||||||
formSchema: {
|
formSchema: {
|
||||||
title: { required: true, min: 3, max: 64 },
|
title: { required: true, min: 3, max: 64 },
|
||||||
@ -90,13 +89,13 @@ export default {
|
|||||||
this.form.content = contribution.content
|
this.form.content = contribution.content
|
||||||
this.form.title = contribution.title
|
this.form.title = contribution.title
|
||||||
this.form.language = this.locale
|
this.form.language = this.locale
|
||||||
this.form.placeholder = this.locale
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
locale() {
|
locale() {
|
||||||
const locale = this.contribution.language
|
const locale =
|
||||||
|
this.contribution && this.contribution.language
|
||||||
? locales.find(loc => this.contribution.language === loc.code)
|
? locales.find(loc => this.contribution.language === loc.code)
|
||||||
: locales.find(loc => this.$i18n.locale() === loc.code)
|
: locales.find(loc => this.$i18n.locale() === loc.code)
|
||||||
return locale.name
|
return locale.name
|
||||||
|
|||||||
@ -323,6 +323,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
this.$root.$off('changeLanguage')
|
||||||
this.editor.destroy()
|
this.editor.destroy()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@ -54,6 +54,9 @@ export default {
|
|||||||
this.refetchPostComments()
|
this.refetchPostComments()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.$root.$off('refetchPostComments')
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refetchPostComments() {
|
refetchPostComments() {
|
||||||
if (this.$apollo.queries.Post) {
|
if (this.$apollo.queries.Post) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user