diff options
Diffstat (limited to 'src/stores/FeaturesStore.js')
-rw-r--r-- | src/stores/FeaturesStore.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js index 8e0134d7f..fdb502b6b 100644 --- a/src/stores/FeaturesStore.js +++ b/src/stores/FeaturesStore.js | |||
@@ -9,13 +9,10 @@ import workspaces from '../features/workspaces'; | |||
9 | import quickSwitch from '../features/quickSwitch'; | 9 | import quickSwitch from '../features/quickSwitch'; |
10 | import nightlyBuilds from '../features/nightlyBuilds'; | 10 | import nightlyBuilds from '../features/nightlyBuilds'; |
11 | import publishDebugInfo from '../features/publishDebugInfo'; | 11 | import publishDebugInfo from '../features/publishDebugInfo'; |
12 | import settingsWS from '../features/settingsWS'; | ||
13 | import communityRecipes from '../features/communityRecipes'; | 12 | import communityRecipes from '../features/communityRecipes'; |
14 | import todos from '../features/todos'; | 13 | import todos from '../features/todos'; |
15 | import appearance from '../features/appearance'; | 14 | import appearance from '../features/appearance'; |
16 | 15 | ||
17 | import { DEFAULT_FEATURES_CONFIG } from '../config'; | ||
18 | |||
19 | export default class FeaturesStore extends Store { | 16 | export default class FeaturesStore extends Store { |
20 | @observable defaultFeaturesRequest = new CachedRequest( | 17 | @observable defaultFeaturesRequest = new CachedRequest( |
21 | this.api.features, | 18 | this.api.features, |
@@ -27,7 +24,7 @@ export default class FeaturesStore extends Store { | |||
27 | 'features', | 24 | 'features', |
28 | ); | 25 | ); |
29 | 26 | ||
30 | @observable features = { ...DEFAULT_FEATURES_CONFIG }; | 27 | @observable features = { }; |
31 | 28 | ||
32 | async setup() { | 29 | async setup() { |
33 | this.registerReactions([ | 30 | this.registerReactions([ |
@@ -41,12 +38,12 @@ export default class FeaturesStore extends Store { | |||
41 | 38 | ||
42 | @computed get anonymousFeatures() { | 39 | @computed get anonymousFeatures() { |
43 | return ( | 40 | return ( |
44 | this.defaultFeaturesRequest.execute().result || DEFAULT_FEATURES_CONFIG | 41 | this.defaultFeaturesRequest.execute().result || {} |
45 | ); | 42 | ); |
46 | } | 43 | } |
47 | 44 | ||
48 | _updateFeatures = () => { | 45 | _updateFeatures = () => { |
49 | const features = { ...DEFAULT_FEATURES_CONFIG }; | 46 | const features = { }; |
50 | if (this.stores.user.isLoggedIn) { | 47 | if (this.stores.user.isLoggedIn) { |
51 | let requestResult = {}; | 48 | let requestResult = {}; |
52 | try { | 49 | try { |
@@ -77,7 +74,6 @@ export default class FeaturesStore extends Store { | |||
77 | quickSwitch(); | 74 | quickSwitch(); |
78 | nightlyBuilds(); | 75 | nightlyBuilds(); |
79 | publishDebugInfo(); | 76 | publishDebugInfo(); |
80 | settingsWS(this.stores, this.actions); | ||
81 | communityRecipes(this.stores, this.actions); | 77 | communityRecipes(this.stores, this.actions); |
82 | todos(this.stores, this.actions); | 78 | todos(this.stores, this.actions); |
83 | appearance(this.stores); | 79 | appearance(this.stores); |