2020-05-29 18:19:35 +02:00
|
|
|
'use strict';
|
|
|
|
import i18n from '@/i18n';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
namespaced: true,
|
|
|
|
strict: true,
|
|
|
|
state: {
|
2020-06-02 19:13:57 +02:00
|
|
|
locale: 'en-US',
|
|
|
|
explorebar_size: null
|
2020-05-29 18:19:35 +02:00
|
|
|
},
|
|
|
|
getters: {
|
2020-06-02 19:13:57 +02:00
|
|
|
getLocale: state => state.locale,
|
|
|
|
getExplorebarSize: state => state.explorebar_size
|
2020-05-29 18:19:35 +02:00
|
|
|
},
|
|
|
|
mutations: {
|
|
|
|
SET_LOCALE (state, locale) {
|
|
|
|
state.locale = locale;
|
|
|
|
i18n.locale = locale;
|
2020-06-02 19:13:57 +02:00
|
|
|
},
|
|
|
|
SET_EXPLOREBAR_SIZE (state, size) {
|
|
|
|
state.explorebar_size = size;
|
2020-05-29 18:19:35 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
actions: {
|
|
|
|
changeLocale ({ commit }, locale) {
|
|
|
|
commit('SET_LOCALE', locale);
|
2020-06-02 19:13:57 +02:00
|
|
|
},
|
|
|
|
changeExplorebarSize ({ commit }, size) {
|
|
|
|
commit('SET_EXPLOREBAR_SIZE', size);
|
2020-05-29 18:19:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|