Skip to content

Commit

Permalink
🎨 [Frontend] TIP: Rebranding (ITISFoundation#6446)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored and mrnicegyu11 committed Oct 2, 2024
1 parent 32bedc7 commit bd45d6b
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 14 deletions.
4 changes: 2 additions & 2 deletions services/static-webserver/client/compile.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion services/static-webserver/client/scripts/post-compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions services/static-webserver/client/source/boot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
<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: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>
Expand All @@ -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"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,23 @@
"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"
}, {
"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"
}, {
"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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit bd45d6b

Please sign in to comment.