Skip to content

Commit 212a4ee

Browse files
authored
🎨 [Frontend] TIP: Rebranding (#6446)
1 parent f57b3a9 commit 212a4ee

File tree

7 files changed

+26
-14
lines changed

7 files changed

+26
-14
lines changed

services/static-webserver/client/compile.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"class": "osparc.Application",
137137
"theme": "osparc.theme.products.tis.ThemeDark",
138138
"name": "tis",
139-
"title": "TI Plan - IT'IS",
139+
"title": "TIP V3.0 - IT'IS",
140140
"include": [
141141
"iconfont.material.Load",
142142
"iconfont.fontawesome5.Load",
@@ -152,7 +152,7 @@
152152
"class": "osparc.Application",
153153
"theme": "osparc.theme.products.tis.ThemeDark",
154154
"name": "tiplite",
155-
"title": "TI Plan lite - IT'IS",
155+
"title": "TIP.lite - IT'IS",
156156
"include": [
157157
"iconfont.material.Load",
158158
"iconfont.fontawesome5.Load",

services/static-webserver/client/scripts/post-compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def update_apps_metadata():
3131
replacements = i.get("replacements")
3232
for key in replacements:
3333
replace_text = replacements[key]
34-
data = data.replace(key, replace_text)
34+
data = data.replace("${"+key+"}", replace_text)
3535
with open(filename, "w") as file:
3636
print(f"Updating app metadata: {filename}")
3737
file.write(data)

services/static-webserver/client/source/boot/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
<meta name="theme-color" content="">
4242

4343
<!-- Open Graph metadata -->
44-
<meta property="og:title" content="replace_me_og_title" />
45-
<meta property="og:description" content="replace_me_og_description" />
46-
<meta property="og:image" content="replace_me_og_image" />
44+
<meta property="og:title" content="${replace_me_og_title}" />
45+
<meta property="og:description" content="${replace_me_og_description}" />
46+
<meta property="og:image" content="${replace_me_og_image}" />
4747
<meta property="og:type" content="website" />
4848

4949
<style>
@@ -59,7 +59,7 @@
5959
</style>
6060

6161
<title>${appTitle}</title>
62-
<meta name="description" content="replace_me_og_description" />
62+
<meta name="description" content="${replace_me_og_description}" />
6363

6464
<noscript>
6565
<meta http-equiv="refresh" content="0; url=nojs.html"/>

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,14 @@ qx.Class.define("osparc.dashboard.NewStudies", {
167167
const newStudyClicked = () => this.fireDataEvent("newStudyClicked", templateInfo);
168168

169169
const title = templateInfo.title;
170-
const desc = templateInfo.description;
170+
let desc = templateInfo.description;
171+
if (desc) {
172+
desc = osparc.utils.Utils.replaceTokens(
173+
desc,
174+
"replace_me_product_name",
175+
osparc.store.StaticInfo.getInstance().getDisplayName()
176+
);
177+
}
171178
const newPlanButton = new osparc.dashboard.GridButtonNew(title, desc);
172179
newPlanButton.setCardKey(templateInfo.idToWidget);
173180
osparc.utils.Utils.setIdToWidget(newPlanButton, templateInfo.idToWidget);

services/static-webserver/client/source/class/osparc/product/quickStart/tis/S4LPostPro.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ qx.Class.define("osparc.product.quickStart.tis.S4LPostPro", {
2121
construct: function() {
2222
let title = "";
2323
if (osparc.product.Utils.isProduct("tiplite")) {
24-
title += "<i>" + this.tr("(Not available in TIP lite)") + "</i><br><br>";
24+
const notAvailableText = this.tr("Not available in");
25+
title += ` <i>(${notAvailableText} ${osparc.store.StaticInfo.getInstance().getDisplayName()})</i><br><br>`;
2526
}
2627
title += this.tr("Sim4Life Post Processing");
2728
this.base(arguments, title);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ qx.Class.define("osparc.utils.Utils", {
9191

9292
FLOATING_Z_INDEX: 110000,
9393

94+
replaceTokens: function(str, key, value) {
95+
return str.replaceAll("${"+key+"}", value);
96+
},
97+
9498
/**
9599
* @param {qx.ui.basic.Image} image
96100
*/

services/static-webserver/client/source/resource/osparc/new_studies.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,23 @@
6868
"showDisabled": true,
6969
"expectedTemplateLabel": "mcTI Planning Tool",
7070
"title": "Multichannel TI",
71-
"description": "Not available in TIP lite",
71+
"description": "Not available in ${replace_me_product_name}",
7272
"newStudyLabel": "Multichannel TI",
7373
"category": "precomputed",
7474
"idToWidget": "newMTIPlanButton"
7575
}, {
7676
"showDisabled": true,
7777
"expectedTemplateLabel": "pmTI Planning Tool",
7878
"title": "Phase-modulation TI",
79-
"description": "Not available in TIP lite",
79+
"description": "Not available in ${replace_me_product_name}",
8080
"newStudyLabel": "Phase-modulation TI",
8181
"category": "precomputed",
8282
"idToWidget": "newPMTIPlanButton"
8383
}, {
8484
"showDisabled": true,
8585
"expectedTemplateLabel": "personalized TI Planning Tool",
8686
"title": "Personalized<br>Classic TI",
87-
"description": "Not available in TIP lite",
87+
"description": "Not available in ${replace_me_product_name}",
8888
"newStudyLabel": "Personalized Classic TI",
8989
"category": "personalized",
9090
"idToWidget": "personalizationNewTIPlanButton",
@@ -93,7 +93,7 @@
9393
"showDisabled": true,
9494
"expectedTemplateLabel": "personalized mcTI Planning Tool",
9595
"title": "Personalized<br>Multichannel TI",
96-
"description": "Not available in TIP lite",
96+
"description": "Not available in ${replace_me_product_name}",
9797
"newStudyLabel": "Personalized Multichannel TI",
9898
"category": "personalized",
9999
"idToWidget": "personalizationNewMTIPlanButton",
@@ -102,7 +102,7 @@
102102
"showDisabled": true,
103103
"expectedTemplateLabel": "personalized pmTI Planning Tool",
104104
"title": "Personalized<br>Phase-modulation TI",
105-
"description": "Not available in TIP lite",
105+
"description": "Not available in ${replace_me_product_name}",
106106
"newStudyLabel": "Personalized Phase-modulation TI",
107107
"category": "personalized",
108108
"idToWidget": "personalizationNewPMTIPlanButton",

0 commit comments

Comments
 (0)