File tree Expand file tree Collapse file tree 3 files changed +14
-18
lines changed
services/static-webserver/client/source Expand file tree Collapse file tree 3 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ qx.Class.define("osparc.desktop.MainPage", {
6767 }
6868 preloadPromises . push ( store . getAllClassifiers ( true ) ) ;
6969 preloadPromises . push ( osparc . store . Tags . getInstance ( ) . fetchTags ( ) ) ;
70+ preloadPromises . push ( osparc . store . Products . getInstance ( ) . fetchPlusButtonUiConfig ( ) ) ;
7071 Promise . all ( preloadPromises )
7172 . then ( ( ) => {
7273 const mainStack = this . __createMainStack ( ) ;
Original file line number Diff line number Diff line change @@ -24,25 +24,20 @@ qx.Class.define("osparc.store.Products", {
2424
2525 fetchPlusButtonUiConfig : function ( ) {
2626 return osparc . utils . Utils . fetchJSON ( "/resource/osparc/ui_config.json" )
27- . then ( newStudiesData => {
27+ . then ( uiConfig => {
2828 const product = osparc . product . Utils . getProductName ( )
29- if ( product in newStudiesData ) {
30- this . __plusButtonUiConfig = newStudiesData [ product ] ;
31- return this . __plusButtonUiConfig ;
29+ if ( product in uiConfig && "plusButton" in uiConfig [ product ] ) {
30+ this . __plusButtonUiConfig = uiConfig [ product ] [ "plusButton" ] ;
31+ } else {
32+ this . __plusButtonUiConfig = false ;
3233 }
33- return { } ;
34+ return this . __plusButtonUiConfig ;
3435 } )
3536 . catch ( console . error ) ;
3637 } ,
3738
3839 getPlusButtonUiConfig : function ( ) {
39- return new Promise ( resolve => {
40- if ( this . __plusButtonUiConfig ) {
41- resolve ( this . __plusButtonUiConfig ) ;
42- } else {
43- resolve ( this . fetchPlusButtonUiConfig ( ) )
44- }
45- } ) ;
40+ return this . __plusButtonUiConfig ;
4641 } ,
4742 }
4843} ) ;
Original file line number Diff line number Diff line change 11{
22 "tis" : {
3- "NO_plus_button " : {
3+ "NO_plusButton " : {
44 "categories" : [{
55 "id" : " precomputed" ,
66 "title" : " Precomputed"
5555 }
5656 },
5757 "tiplite" : {
58- "NO_plus_button " : {
58+ "NO_plusButton " : {
5959 "categories" : [{
6060 "id" : " precomputed" ,
6161 "title" : " Precomputed"
120120 }
121121 },
122122 "s4l" : {
123- "plus_button " : {
123+ "plusButton " : {
124124 "resources" : [{
125125 "resourceType" : " service" ,
126126 "expectedKey" : " simcore/services/dynamic/s4l-ui" ,
137137 }
138138 },
139139 "s4lacad" : {
140- "plus_button " : {
140+ "plusButton " : {
141141 "resources" : [{
142142 "resourceType" : " service" ,
143143 "expectedKey" : " simcore/services/dynamic/s4l-ui" ,
154154 }
155155 },
156156 "s4llite" : {
157- "plus_button " : {
157+ "plusButton " : {
158158 "resources" : [{
159159 "resourceType" : " service" ,
160160 "expectedKey" : " simcore/services/dynamic/s4l-ui-lite" ,
165165 }
166166 },
167167 "osparc" : {
168- "plus_button " : {
168+ "plusButton " : {
169169 "resources" : [{
170170 "resourceType" : " study" ,
171171 "icon" : " @FontAwesome5Solid/file/18" ,
You can’t perform that action at this time.
0 commit comments