From 674bc4273e9a2f1a2e41ef977a80219423c7cb51 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 16 Sep 2014 00:56:43 +0200 Subject: format javascript --- web/src/js/stores/SettingsStore.es6.js | 41 +++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'web/src/js/stores/SettingsStore.es6.js') diff --git a/web/src/js/stores/SettingsStore.es6.js b/web/src/js/stores/SettingsStore.es6.js index dea4597c..2743161e 100644 --- a/web/src/js/stores/SettingsStore.es6.js +++ b/web/src/js/stores/SettingsStore.es6.js @@ -1,21 +1,26 @@ 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; - } - } + constructor() { + super(); + + //FIXME: What do we do if we haven't requested anything from the server yet? + this.settings = { + version: "0.12", + showEventLog: true + }; + } + 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)); +AppDispatcher.register(SettingsStore.handle.bind(SettingsStore)); \ No newline at end of file -- cgit v1.2.3