mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Set dropdown with language of post if exists
follow `PR` review by @Tirokk
This commit is contained in:
parent
3ab69b5fde
commit
5266de2c62
@ -87,6 +87,7 @@ export default {
|
||||
this.slug = contribution.slug
|
||||
this.form.content = contribution.content
|
||||
this.form.title = contribution.title
|
||||
this.form.language = this.locale
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -137,7 +138,10 @@ export default {
|
||||
this.$refs.contributionForm.update('content', value)
|
||||
},
|
||||
returnLocaleName(locale) {
|
||||
if (this.$i18n.locale() === locale.code) {
|
||||
if (
|
||||
this.contribution.language === locale.code ||
|
||||
(!this.contribution.language && this.$i18n.locale() === locale.code)
|
||||
) {
|
||||
return locale
|
||||
}
|
||||
},
|
||||
|
||||
@ -3,9 +3,7 @@
|
||||
<ds-flex-item :width="{ base: '100%', md: 3 }">
|
||||
<hc-contribution-form :contribution="contribution" />
|
||||
</ds-flex-item>
|
||||
<ds-flex-item :width="{ base: '100%', md: 1 }">
|
||||
|
||||
</ds-flex-item>
|
||||
<ds-flex-item :width="{ base: '100%', md: 1 }"> </ds-flex-item>
|
||||
</ds-flex>
|
||||
</template>
|
||||
|
||||
@ -49,6 +47,7 @@ export default {
|
||||
deleted
|
||||
slug
|
||||
image
|
||||
language
|
||||
author {
|
||||
id
|
||||
disabled
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user