See #161: can now persist language in local storage

This commit is contained in:
Eliot Berriot 2018-06-30 12:05:52 +02:00
parent 869b6c4fe9
commit 8926d93040
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
4 changed files with 36 additions and 9 deletions

View file

@ -57,6 +57,18 @@
<translate>The funkwhale logo was kindly designed and provided by Francis Gading.</translate>
</p>
</div>
<div class="three wide column">
<h4 v-translate class="ui header">Options</h4>
<div class="ui form">
<div class="ui field">
<label>{{ $gettext('Change language') }}</label>
<select class="ui dropdown" v-model="$language.current">
<option v-for="(language, key) in $language.available" :value="key">{{ language }}</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
@ -144,6 +156,9 @@ export default {
'$store.state.instance.instanceUrl' () {
this.$store.dispatch('instance/fetchSettings')
this.fetchNodeInfo()
},
'$language.current' (newValue) {
this.$store.commit('ui/currentLanguage', newValue)
}
}
}