aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/stores/SettingsStore.es6.js
blob: dea4597ce0fd7bb9c4f48a1bf726e0ddf665e13c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class _SettingsStore extends EventEmitter {
	constructor() {
		super();
		this.settings = { version: "0.12", showEventLog: true }; //FIXME: Need to get that from somewhere.
	}
	getAll() {
		return this.settings;
	}
	handle(action) {
		switch (action.actionType) {
			case ActionTypes.SETTINGS_UPDATE:
				this.settings = action.settings;
				this.emit("change");
				break;
			default:
				return;
		}
	}
}
var SettingsStore = new _SettingsStore();
AppDispatcher.register(SettingsStore.handle.bind(SettingsStore));