|
|
@ -37,7 +37,8 @@ export default {
|
|
|
|
rtcEngineInitError: null,
|
|
|
|
rtcEngineInitError: null,
|
|
|
|
sessionLocale: null,
|
|
|
|
sessionLocale: null,
|
|
|
|
changeSessionLocaleState: RequestState.initiated,
|
|
|
|
changeSessionLocaleState: RequestState.initiated,
|
|
|
|
changeSessionLocaleError: null
|
|
|
|
changeSessionLocaleError: null,
|
|
|
|
|
|
|
|
languageLabels: []
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getters: {
|
|
|
|
getters: {
|
|
|
|
isLogged(state) {
|
|
|
|
isLogged(state) {
|
|
|
@ -129,6 +130,12 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
changeSessionLocaleState(state) {
|
|
|
|
changeSessionLocaleState(state) {
|
|
|
|
return state.changeSessionLocaleState;
|
|
|
|
return state.changeSessionLocaleState;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
locale(state) {
|
|
|
|
|
|
|
|
return state.sessionLocale;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
languageLabels(state) {
|
|
|
|
|
|
|
|
return state.languageLabels;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mutations: {
|
|
|
|
mutations: {
|
|
|
@ -193,7 +200,6 @@ export default {
|
|
|
|
state.changeSessionLocaleError = null;
|
|
|
|
state.changeSessionLocaleError = null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
changeSessionLocaleSucceeded(state, locale) {
|
|
|
|
changeSessionLocaleSucceeded(state, locale) {
|
|
|
|
i18n.locale = locale;
|
|
|
|
|
|
|
|
state.sessionLocale = locale;
|
|
|
|
state.sessionLocale = locale;
|
|
|
|
state.changeSessionLocaleState = RequestState.succeeded;
|
|
|
|
state.changeSessionLocaleState = RequestState.succeeded;
|
|
|
|
state.changeSessionLocaleError = null;
|
|
|
|
state.changeSessionLocaleError = null;
|
|
|
@ -201,6 +207,9 @@ export default {
|
|
|
|
changeSessionLocaleFailed(state, error) {
|
|
|
|
changeSessionLocaleFailed(state, error) {
|
|
|
|
state.changeSessionLocaleState = RequestState.failed;
|
|
|
|
state.changeSessionLocaleState = RequestState.failed;
|
|
|
|
state.changeSessionLocaleError = error;
|
|
|
|
state.changeSessionLocaleError = error;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
setLanguageLabels(state, languageLabels) {
|
|
|
|
|
|
|
|
state.languageLabels = languageLabels;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
actions: {
|
|
|
|
actions: {
|
|
|
@ -260,13 +269,12 @@ export default {
|
|
|
|
context.commit('changeSessionLocaleRequesting');
|
|
|
|
context.commit('changeSessionLocaleRequesting');
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
SessionStorage.set('locale', locale);
|
|
|
|
SessionStorage.set('locale', locale);
|
|
|
|
|
|
|
|
i18n.locale = locale;
|
|
|
|
|
|
|
|
context.commit('changeSessionLocaleSucceeded', locale);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch(error) {
|
|
|
|
catch(error) {
|
|
|
|
context.commit('changeSessionLocaleFailed', error);
|
|
|
|
context.commit('changeSessionLocaleFailed', error);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally {
|
|
|
|
|
|
|
|
context.commit('changeSessionLocaleSucceeded', locale);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|