Skip to content

Commit 4d99c72

Browse files
committed
replace_me_product_name token
1 parent 5a19aad commit 4d99c72

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ qx.Class.define("osparc.dashboard.GridButtonNew", {
3737
});
3838

3939
if (title) {
40+
title = osparc.utils.Utils.replaceTokens(
41+
title,
42+
"replace_me_product_name",
43+
osparc.store.StaticInfo.getInstance().getDisplayName()
44+
);
45+
4046
const titleLabel = this.getChildControl("title");
4147
titleLabel.set({
4248
value: title,
@@ -45,6 +51,12 @@ qx.Class.define("osparc.dashboard.GridButtonNew", {
4551
}
4652

4753
if (description) {
54+
description = osparc.utils.Utils.replaceTokens(
55+
description,
56+
"replace_me_product_name",
57+
osparc.store.StaticInfo.getInstance().getDisplayName()
58+
);
59+
4860
const descLabel = this.getChildControl("subtitle-text");
4961
descLabel.setValue(description.toString());
5062
}

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

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

169169
const title = templateInfo.title;
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-
}
170+
const desc = templateInfo.description;
178171
const newPlanButton = new osparc.dashboard.GridButtonNew(title, desc);
179172
newPlanButton.setCardKey(templateInfo.idToWidget);
180173
osparc.utils.Utils.setIdToWidget(newPlanButton, templateInfo.idToWidget);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"linkedResource": "services",
141141
"resources": [{
142142
"expectedKey": "simcore/services/dynamic/sim4life-lite",
143-
"title": "Start Sim4Life.lite",
143+
"title": "Start ${replace_me_product_name}",
144144
"description": "New project",
145145
"newStudyLabel": "New project",
146146
"idToWidget": "startS4LButton"

0 commit comments

Comments
 (0)