Messages: Load languages asynchronously.

Reduces the size of the initial app bundle by about half.
This commit is contained in:
lain 2020-06-08 17:22:07 +02:00
parent acbef1ebdc
commit 99eaec8547
5 changed files with 80 additions and 32 deletions

View file

@ -32,7 +32,7 @@ import _ from 'lodash'
export default {
computed: {
languageCodes () {
return Object.keys(languagesObject)
return languagesObject.languages
},
languageNames () {
@ -43,7 +43,6 @@ export default {
get: function () { return this.$store.getters.mergedConfig.interfaceLanguage },
set: function (val) {
this.$store.dispatch('setOption', { name: 'interfaceLanguage', value: val })
this.$i18n.locale = val
}
}
},