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

17 lines
464 B
JavaScript
Raw Normal View History

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