diff options
Diffstat (limited to 'src/store/modules')
-rw-r--r-- | src/store/modules/GlobalStore.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js index 1327422a..42e9e2bf 100644 --- a/src/store/modules/GlobalStore.js +++ b/src/store/modules/GlobalStore.js @@ -30,16 +30,20 @@ const GlobalStore = { namespaced: true, state: { bmcTime: null, - hostStatus: 'unreachable' + hostStatus: 'unreachable', + languagePreference: localStorage.getItem('storedLanguage') || 'en-US' }, getters: { hostStatus: state => state.hostStatus, - bmcTime: state => state.bmcTime + bmcTime: state => state.bmcTime, + languagePreference: state => state.languagePreference }, mutations: { setBmcTime: (state, bmcTime) => (state.bmcTime = bmcTime), setHostStatus: (state, hostState) => - (state.hostStatus = hostStateMapper(hostState)) + (state.hostStatus = hostStateMapper(hostState)), + setLanguagePreference: (state, language) => + (state.languagePreference = language) }, actions: { async getBmcTime({ commit }) { |