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