2019-11-15 01:37:17 +00:00
|
|
|
function initUiActions(_store, _router) {
|
2020-05-14 02:26:05 +00:00
|
|
|
function setFilter({ commit }, filter) {
|
|
|
|
commit('setFilter', filter);
|
|
|
|
localStorage.setItem('filter', filter);
|
|
|
|
}
|
2019-11-15 01:37:17 +00:00
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
function setRange({ commit }, range) {
|
|
|
|
commit('setRange', range);
|
|
|
|
}
|
2019-11-15 01:37:17 +00:00
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
function setBatch({ commit }, batch) {
|
|
|
|
commit('setBatch', batch);
|
|
|
|
localStorage.setItem('batch', batch);
|
|
|
|
}
|
2020-03-02 02:41:41 +00:00
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
function setTheme({ commit }, theme) {
|
|
|
|
commit('setTheme', theme);
|
|
|
|
localStorage.setItem('theme', theme);
|
|
|
|
}
|
2020-03-23 00:43:49 +00:00
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
async function setSfw({ commit }, sfw) {
|
|
|
|
commit('setSfw', sfw);
|
|
|
|
localStorage.setItem('sfw', sfw);
|
|
|
|
}
|
2020-03-23 00:43:49 +00:00
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
return {
|
|
|
|
setFilter,
|
|
|
|
setRange,
|
|
|
|
setBatch,
|
|
|
|
setSfw,
|
|
|
|
setTheme,
|
|
|
|
};
|
2019-11-15 01:37:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default initUiActions;
|