mitmproxy/web/src/js/actions.js
Aldo Cortesi 6efe1aa6a9 We're not ready for ES6
Lets re-evaluate in June next year when it's actually released
2014-09-16 16:27:09 +12:00

18 lines
474 B
JavaScript

var ActionTypes = {
SETTINGS_UPDATE: "SETTINGS_UPDATE",
EVENTLOG_ADD: "EVENTLOG_ADD"
};
var SettingsActions = {
update:function(settings) {
settings = _.merge({}, SettingsStore.getAll(), settings);
//TODO: Update server.
//Facebook Flux: We do an optimistic update on the client already.
AppDispatcher.dispatchViewAction({
actionType: ActionTypes.SETTINGS_UPDATE,
settings: settings
});
}
};