blob: 29971fa7d2510eaeab4b9f3a6d19e4e8b43e008a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
class _SettingsStore extends EventEmitter {
constructor() {
super();
//FIXME: What do we do if we haven't requested anything from the server yet?
this.settings = {
version: "0.12",
showEventLog: true,
mode: "transparent",
};
}
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));
|