aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/FeaturesStore.js
diff options
context:
space:
mode:
authorLibravatar Abin Mn <abinmn619@gmail.com>2021-10-26 21:18:20 +0530
committerLibravatar GitHub <noreply@github.com>2021-10-26 21:18:20 +0530
commit91c69428ed0dc2dd26b00c6dd5a6684f25515a34 (patch)
tree062a9a4946aa1367263533682ee59e795ea97234 /src/stores/FeaturesStore.js
parentAdd feature to display service name under service icon when the toggle for it... (diff)
downloadferdium-app-91c69428ed0dc2dd26b00c6dd5a6684f25515a34.tar.gz
ferdium-app-91c69428ed0dc2dd26b00c6dd5a6684f25515a34.tar.zst
ferdium-app-91c69428ed0dc2dd26b00c6dd5a6684f25515a34.zip
Cleanup/remove feature toggle for todo, workspace, service proxy (#2134)
* Remove DEFAULT_FEATURES_CONFIG from config * Remove static controller Co-authored-by: Madhuri B <MadhuriBandanadam@users.noreply.github.com>
Diffstat (limited to 'src/stores/FeaturesStore.js')
-rw-r--r--src/stores/FeaturesStore.js10
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';
9import quickSwitch from '../features/quickSwitch'; 9import quickSwitch from '../features/quickSwitch';
10import nightlyBuilds from '../features/nightlyBuilds'; 10import nightlyBuilds from '../features/nightlyBuilds';
11import publishDebugInfo from '../features/publishDebugInfo'; 11import publishDebugInfo from '../features/publishDebugInfo';
12import settingsWS from '../features/settingsWS';
13import communityRecipes from '../features/communityRecipes'; 12import communityRecipes from '../features/communityRecipes';
14import todos from '../features/todos'; 13import todos from '../features/todos';
15import appearance from '../features/appearance'; 14import appearance from '../features/appearance';
16 15
17import { DEFAULT_FEATURES_CONFIG } from '../config';
18
19export default class FeaturesStore extends Store { 16export 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);