mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-02 12:01:17 +00:00
18 lines
401 B
JavaScript
18 lines
401 B
JavaScript
|
|
import flux from "flux";
|
|
|
|
const PayloadSources = {
|
|
VIEW: "view",
|
|
SERVER: "server"
|
|
};
|
|
|
|
|
|
export var AppDispatcher = new flux.Dispatcher();
|
|
AppDispatcher.dispatchViewAction = function (action) {
|
|
action.source = PayloadSources.VIEW;
|
|
this.dispatch(action);
|
|
};
|
|
AppDispatcher.dispatchServerAction = function (action) {
|
|
action.source = PayloadSources.SERVER;
|
|
this.dispatch(action);
|
|
}; |