fix: match page current locale for UI

pull/901/head
Nick 6 years ago
parent 1dfb55e803
commit abfba4b47e

@ -6,11 +6,11 @@
img.animated.fadeInUp(src='/svg/icon-customer.svg', alt='Users', style='width: 80px;')
.admin-header-title
.headline.blue--text.text--darken-2.animated.fadeInLeft Users
.subheading.grey--text.animated.fadeInLeft.wait-p2s Manage users
.subheading.grey--text.animated.fadeInLeft.wait-p2s Manage users #[v-chip(label, color='primary', small).white--text coming soon]
v-spacer
v-btn.animated.fadeInDown.wait-p2s(outline, color='grey', large, @click='refresh')
v-icon refresh
v-btn.animated.fadeInDown(color='primary', large, depressed, @click='createUser')
v-btn.animated.fadeInDown(color='primary', large, depressed, @click='createUser', disabled)
v-icon(left) add
span New User
v-card.wiki-form.mt-3.animated.fadeInUp

@ -141,7 +141,7 @@
v-tooltip(bottom, slot='activator')
v-btn(icon, slot='activator')
v-icon(color='grey') language
span Language
span {{$t('common:header.language')}}
v-list.py-0
template(v-for='(lc, idx) of locales')
v-list-tile(@click='changeLocale(lc)')

@ -141,6 +141,8 @@ import Prism from '@/libs/prism/prism.js'
import { get } from 'vuex-pathify'
import _ from 'lodash'
/* global siteLangs */
export default {
components: {
StatusIndicator
@ -259,6 +261,10 @@ export default {
this.$store.commit('page/SET_UPDATED_AT', this.updatedAt)
this.$store.commit('page/SET_MODE', 'view')
if (siteLangs.length > 0) {
this.$i18n.i18next.changeLanguage(this.locale)
}
},
mounted () {
Prism.highlightAllUnder(this.$refs.container)

Loading…
Cancel
Save