Merge pull request 'allow instance language to take precedence over EN' (#137) from default-language into develop
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Reviewed-on: AkkomaGang/pleroma-fe#137
This commit is contained in:
commit
05d052212a
1 changed files with 5 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import Cookies from 'js-cookie'
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHistory } from 'vue-router'
|
||||||
import vClickOutside from 'click-outside-vue3'
|
import vClickOutside from 'click-outside-vue3'
|
||||||
|
@ -58,6 +59,10 @@ const getInstanceConfig = async ({ store }) => {
|
||||||
|
|
||||||
store.dispatch('setInstanceOption', { name: 'textlimit', value: textlimit })
|
store.dispatch('setInstanceOption', { name: 'textlimit', value: textlimit })
|
||||||
store.dispatch('setInstanceOption', { name: 'accountApprovalRequired', value: data.approval_required })
|
store.dispatch('setInstanceOption', { name: 'accountApprovalRequired', value: data.approval_required })
|
||||||
|
// don't override cookie if set
|
||||||
|
if (!Cookies.get('userLanguage')) {
|
||||||
|
store.dispatch('setOption', { name: 'interfaceLanguage', value: data.languages[0] })
|
||||||
|
}
|
||||||
|
|
||||||
if (vapidPublicKey) {
|
if (vapidPublicKey) {
|
||||||
store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey })
|
store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey })
|
||||||
|
|
Loading…
Reference in a new issue