You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vizality/renderer/src/api/settings/store/Actions.js

39 lines
824 B

import { FluxDispatcher } from '@vizality/webpack';
import { ActionTypes } from '@vizality/constants';
export default {
toggleSetting (category, setting, defaultValue) {
FluxDispatcher.dispatch({
type: ActionTypes.VIZALITY_TOGGLE_SETTING,
category,
setting,
defaultValue
});
},
updateSettings (category, settings) {
FluxDispatcher.dispatch({
type: ActionTypes.VIZALITY_UPDATE_SETTINGS,
category,
settings
});
},
updateSetting (category, setting, value) {
FluxDispatcher.dispatch({
type: ActionTypes.VIZALITY_UPDATE_SETTING,
category,
setting,
value
});
},
deleteSetting (category, setting) {
FluxDispatcher.dispatch({
type: ActionTypes.VIZALITY_DELETE_SETTING,
category,
setting
});
}
};