Skip to content

Commit 8434e9b

Browse files
committed
[skip ci] guessOsparcIcon
1 parent 52ebdd8 commit 8434e9b

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

services/static-webserver/client/source/class/osparc/dashboard/CardBase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ qx.Class.define("osparc.dashboard.CardBase", {
5555
MODE_APP: "@FontAwesome5Solid/desktop/13",
5656
NEW_ICON: "@FontAwesome5Solid/plus/",
5757
LOADING_ICON: "@FontAwesome5Solid/circle-notch/",
58-
// Get the default thumbnail for each product else add the image and extension osparc.product.Utils.getProductThumbUrl(Thumbnail-01.png)
5958
PRODUCT_ICON: osparc.product.Utils.getProductIconUrl(),
59+
// Get the default thumbnail for each product else add the image and extension osparc.product.Utils.getProductThumbUrl(Thumbnail-01.png)
6060
PRODUCT_THUMBNAIL: osparc.product.Utils.getProductThumbUrl(),
6161

6262
CARD_PRIORITY: {

services/static-webserver/client/source/class/osparc/product/Utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,14 @@ qx.Class.define("osparc.product.Utils", {
261261
let url;
262262
switch (osparc.product.Utils.getProductName()) {
263263
case "osparc":
264-
url = `${base}/oSparc/${asset}`;
264+
url = `${base}/osparc/${asset}`;
265265
break;
266266
case "tis":
267267
case "tiplite":
268-
url = `${base}/TIP/${asset}`;
268+
url = `${base}/tip/${asset}`;
269269
break;
270270
default:
271-
url = `${base}/S4L/${asset}`;
271+
url = `${base}/s4l/${asset}`;
272272
break;
273273
}
274274
return url;

services/static-webserver/client/source/class/osparc/study/Utils.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@ qx.Class.define("osparc.study.Utils", {
359359
},
360360

361361
guessIcon: function(studyData) {
362+
if (osparc.product.Utils.isProduct("osparc")) {
363+
return this.__guessOsparcIcon(studyData);
364+
}
362365
if (osparc.product.Utils.isS4LProduct() || osparc.product.Utils.isProduct("s4llite")) {
363366
return this.__guessS4LIcon(studyData);
364367
}
@@ -368,6 +371,15 @@ qx.Class.define("osparc.study.Utils", {
368371
return osparc.dashboard.CardBase.PRODUCT_ICON;
369372
},
370373

374+
__guessOsparcIcon: function(studyData) {
375+
// the was to guess the TI type is to check the boot mode of the ti-postpro in the pipeline
376+
const wbServices = Object.values(studyData["workbench"]);
377+
if (wbServices.length > 1) {
378+
return "osparc/icons/diagram.png";
379+
}
380+
return osparc.dashboard.CardBase.PRODUCT_ICON;
381+
},
382+
371383
__guessS4LIcon: function(studyData) {
372384
// the was to guess the TI type is to check the boot mode of the ti-postpro in the pipeline
373385
const wbServices = Object.values(studyData["workbench"]);

0 commit comments

Comments
 (0)