mitmproxy/web/src/js/actions.es6.js

17 lines
421 B
JavaScript
Raw Normal View History

2014-09-15 16:08:26 +00:00
var ActionTypes = {
SETTINGS_UPDATE: "SETTINGS_UPDATE",
2014-09-15 22:05:06 +00:00
EVENTLOG_ADD: "EVENTLOG_ADD"
2014-09-15 16:08:26 +00:00
};
var SettingsActions = {
update(settings) {
2014-09-15 22:05:06 +00:00
settings = _.merge({}, SettingsStore.getAll(), settings);
//TODO: Update server.
//Facebook Flux: We do an optimistic update on the client already.
2014-09-15 16:08:26 +00:00
AppDispatcher.dispatchViewAction({
actionType: ActionTypes.SETTINGS_UPDATE,
settings: settings
});
}
};