diff --git a/services/static-webserver/client/compile.json b/services/static-webserver/client/compile.json index f6cce359eed..780532e3cf0 100644 --- a/services/static-webserver/client/compile.json +++ b/services/static-webserver/client/compile.json @@ -136,7 +136,7 @@ "class": "osparc.Application", "theme": "osparc.theme.products.tis.ThemeDark", "name": "tis", - "title": "TI Plan - IT'IS", + "title": "TIP V3.0 - IT'IS", "include": [ "iconfont.material.Load", "iconfont.fontawesome5.Load", @@ -152,7 +152,7 @@ "class": "osparc.Application", "theme": "osparc.theme.products.tis.ThemeDark", "name": "tiplite", - "title": "TI Plan lite - IT'IS", + "title": "TIP.lite - IT'IS", "include": [ "iconfont.material.Load", "iconfont.fontawesome5.Load", diff --git a/services/static-webserver/client/scripts/post-compile.py b/services/static-webserver/client/scripts/post-compile.py index 6c532c83cee..afc1cd5033a 100644 --- a/services/static-webserver/client/scripts/post-compile.py +++ b/services/static-webserver/client/scripts/post-compile.py @@ -31,7 +31,7 @@ def update_apps_metadata(): replacements = i.get("replacements") for key in replacements: replace_text = replacements[key] - data = data.replace(key, replace_text) + data = data.replace("${"+key+"}", replace_text) with open(filename, "w") as file: print(f"Updating app metadata: {filename}") file.write(data) diff --git a/services/static-webserver/client/source/boot/index.html b/services/static-webserver/client/source/boot/index.html index 11a7ed2808c..c12e128897c 100644 --- a/services/static-webserver/client/source/boot/index.html +++ b/services/static-webserver/client/source/boot/index.html @@ -24,10 +24,10 @@ <meta name="format-detection" content="telephone=no"/> <!-- Shortcut icon setup --> - <link rel="icon" type="image/png" href="replace_me_favicon_uri"> + <link rel="icon" type="image/png" href="${replace_me_favicon_uri}"> <!-- Manifest --> - <link rel="manifest" href="replace_me_manifest_uri"> + <link rel="manifest" href="${replace_me_manifest_uri}"> <!-- Safari Pinned Tab Icons --> <link rel="mask-icon" href="" color=""> @@ -35,16 +35,16 @@ <!-- Microsoft Application Icons --> <meta name="msapplication-TileColor" content=""> <meta name="msapplication-TileImage" content=""> - <meta name="msapplication-config" content="replace_me_browserconfig_uri"> + <meta name="msapplication-config" content="${replace_me_browserconfig_uri}"> <!-- Theme Color --> <meta name="theme-color" content=""> <!-- Open Graph metadata --> - <meta property="og:title" content="replace_me_og_title"> - <meta property="og:description" content="replace_me_og_description"> - <meta property="og:image" content="replace_me_og_image"> - <meta property="og:type" content="website"> + <meta property="og:title" content="${replace_me_og_title}" /> + <meta property="og:description" content="${replace_me_og_description}" /> + <meta property="og:image" content="${replace_me_og_image}" /> + <meta property="og:type" content="website" /> <style> body { @@ -59,7 +59,7 @@ </style> <title>${appTitle}</title> - <meta name="description" content="replace_me_og_description" /> + <meta name="description" content="${replace_me_og_description}" /> <noscript> <meta http-equiv="refresh" content="0; url=nojs.html"/> diff --git a/services/static-webserver/client/source/class/osparc/dashboard/NewStudies.js b/services/static-webserver/client/source/class/osparc/dashboard/NewStudies.js index 7c01ff5c74d..a129fefe8db 100644 --- a/services/static-webserver/client/source/class/osparc/dashboard/NewStudies.js +++ b/services/static-webserver/client/source/class/osparc/dashboard/NewStudies.js @@ -167,7 +167,14 @@ qx.Class.define("osparc.dashboard.NewStudies", { const newStudyClicked = () => this.fireDataEvent("newStudyClicked", templateInfo); const title = templateInfo.title; - const desc = templateInfo.description; + let desc = templateInfo.description; + if (desc) { + desc = osparc.utils.Utils.replaceTokens( + desc, + "replace_me_product_name", + osparc.store.StaticInfo.getInstance().getDisplayName() + ); + } const newPlanButton = new osparc.dashboard.GridButtonNew(title, desc); newPlanButton.setCardKey(templateInfo.idToWidget); osparc.utils.Utils.setIdToWidget(newPlanButton, templateInfo.idToWidget); diff --git a/services/static-webserver/client/source/class/osparc/product/quickStart/tis/S4LPostPro.js b/services/static-webserver/client/source/class/osparc/product/quickStart/tis/S4LPostPro.js index bfff8f37e26..a667a6b4b07 100644 --- a/services/static-webserver/client/source/class/osparc/product/quickStart/tis/S4LPostPro.js +++ b/services/static-webserver/client/source/class/osparc/product/quickStart/tis/S4LPostPro.js @@ -21,7 +21,8 @@ qx.Class.define("osparc.product.quickStart.tis.S4LPostPro", { construct: function() { let title = ""; if (osparc.product.Utils.isProduct("tiplite")) { - title += "<i>" + this.tr("(Not available in TIP lite)") + "</i><br><br>"; + const notAvailableText = this.tr("Not available in"); + title += ` <i>(${notAvailableText} ${osparc.store.StaticInfo.getInstance().getDisplayName()})</i><br><br>`; } title += this.tr("Sim4Life Post Processing"); this.base(arguments, title); diff --git a/services/static-webserver/client/source/class/osparc/utils/Utils.js b/services/static-webserver/client/source/class/osparc/utils/Utils.js index 23947464d6d..361ead0c652 100644 --- a/services/static-webserver/client/source/class/osparc/utils/Utils.js +++ b/services/static-webserver/client/source/class/osparc/utils/Utils.js @@ -91,6 +91,10 @@ qx.Class.define("osparc.utils.Utils", { FLOATING_Z_INDEX: 110000, + replaceTokens: function(str, key, value) { + return str.replaceAll("${"+key+"}", value); + }, + /** * @param {qx.ui.basic.Image} image */ diff --git a/services/static-webserver/client/source/resource/osparc/new_studies.json b/services/static-webserver/client/source/resource/osparc/new_studies.json index 9c0da6e74a4..bd56ab64a2a 100644 --- a/services/static-webserver/client/source/resource/osparc/new_studies.json +++ b/services/static-webserver/client/source/resource/osparc/new_studies.json @@ -68,7 +68,7 @@ "showDisabled": true, "expectedTemplateLabel": "mcTI Planning Tool", "title": "Multichannel TI", - "description": "Not available in TIP lite", + "description": "Not available in ${replace_me_product_name}", "newStudyLabel": "Multichannel TI", "category": "precomputed", "idToWidget": "newMTIPlanButton" @@ -76,7 +76,7 @@ "showDisabled": true, "expectedTemplateLabel": "pmTI Planning Tool", "title": "Phase-modulation TI", - "description": "Not available in TIP lite", + "description": "Not available in ${replace_me_product_name}", "newStudyLabel": "Phase-modulation TI", "category": "precomputed", "idToWidget": "newPMTIPlanButton" @@ -84,7 +84,7 @@ "showDisabled": true, "expectedTemplateLabel": "personalized TI Planning Tool", "title": "Personalized<br>Classic TI", - "description": "Not available in TIP lite", + "description": "Not available in ${replace_me_product_name}", "newStudyLabel": "Personalized Classic TI", "category": "personalized", "idToWidget": "personalizationNewTIPlanButton", @@ -93,7 +93,7 @@ "showDisabled": true, "expectedTemplateLabel": "personalized mcTI Planning Tool", "title": "Personalized<br>Multichannel TI", - "description": "Not available in TIP lite", + "description": "Not available in ${replace_me_product_name}", "newStudyLabel": "Personalized Multichannel TI", "category": "personalized", "idToWidget": "personalizationNewMTIPlanButton", @@ -102,7 +102,7 @@ "showDisabled": true, "expectedTemplateLabel": "personalized pmTI Planning Tool", "title": "Personalized<br>Phase-modulation TI", - "description": "Not available in TIP lite", + "description": "Not available in ${replace_me_product_name}", "newStudyLabel": "Personalized Phase-modulation TI", "category": "personalized", "idToWidget": "personalizationNewPMTIPlanButton",