File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ qx.Class.define("osparc.dashboard.CardBase", {
5656 NEW_ICON : "@FontAwesome5Solid/plus/" ,
5757 LOADING_ICON : "@FontAwesome5Solid/circle-notch/" ,
5858 // Get the default thumbnail for each product else add the image and extension osparc.product.Utils.getProductThumbUrl(Thumbnail-01.png)
59+ PRODUCT_ICON : osparc . product . Utils . getProductIconUrl ( ) ,
5960 PRODUCT_THUMBNAIL : osparc . product . Utils . getProductThumbUrl ( ) ,
6061
6162 CARD_PRIORITY : {
Original file line number Diff line number Diff line change @@ -256,6 +256,24 @@ qx.Class.define("osparc.product.Utils", {
256256 return this . isS4LProduct ( ) && licensesEnabled ;
257257 } ,
258258
259+ getProductIconUrl : function ( asset = "Default.png" ) {
260+ const base = "https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/main/app/icons/"
261+ let url ;
262+ switch ( osparc . product . Utils . getProductName ( ) ) {
263+ case "osparc" :
264+ url = `${ base } /oSparc/${ asset } ` ;
265+ break ;
266+ case "tis" :
267+ case "tiplite" :
268+ url = `${ base } /TIP/${ asset } ` ;
269+ break ;
270+ default :
271+ url = `${ base } /S4L/${ asset } ` ;
272+ break ;
273+ }
274+ return url ;
275+ } ,
276+
259277 getProductThumbUrl : function ( asset = "Default.png" ) {
260278 const base = "https://raw.githubusercontent.com/ZurichMedTech/s4l-assets/main/app/full/project_thumbnails"
261279 let url ;
Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ qx.Class.define("osparc.study.Utils", {
365365 if ( osparc . product . Utils . isProduct ( "tis" ) || osparc . product . Utils . isProduct ( "tiplite" ) ) {
366366 return this . __guessTIPIcon ( studyData ) ;
367367 }
368- return osparc . dashboard . CardBase . PRODUCT_THUMBNAIL ;
368+ return osparc . dashboard . CardBase . PRODUCT_ICON ;
369369 } ,
370370
371371 __guessS4LIcon : function ( studyData ) {
@@ -382,7 +382,7 @@ qx.Class.define("osparc.study.Utils", {
382382 return "osparc/icons/Sim4Life.ico" ;
383383 }
384384 }
385- return osparc . dashboard . CardBase . PRODUCT_THUMBNAIL ;
385+ return osparc . dashboard . CardBase . PRODUCT_ICON ;
386386 } ,
387387
388388 __guessTIPIcon : function ( studyData ) {
You can’t perform that action at this time.
0 commit comments