feat: apollo upgrade to 2.0 + dev improvements + localization

This commit is contained in:
NGPixel
2018-06-24 00:20:35 -04:00
parent 99d7078c2c
commit 49834461a6
16 changed files with 1088 additions and 565 deletions

View File

@@ -189,6 +189,7 @@ export default {
const resp = _.get(respRaw, 'data.localization.updateLocale.responseResult', {})
if (resp.succeeded) {
WIKI.$i18n.i18next.changeLanguage(this.selectedLocale)
WIKI.$moment.locale(this.selectedLocale)
this.$store.commit('showNotification', {
message: 'Locale settings updated successfully.',
style: 'success',
@@ -207,6 +208,7 @@ export default {
apollo: {
locales: {
query: localesQuery,
fetchPolicy: 'network-only',
update: (data) => data.localization.locales.map(lc => ({ ...lc, isDownloading: false })),
watchLoading (isLoading) {
this.$store.commit(`loading${isLoading ? 'Start' : 'Stop'}`, 'admin-locale-refresh')