Skip to content

Commit 645e2e9

Browse files
odeimaizmrnicegyu11
authored andcommitted
🎨 [Frontend] App Team (04.03): Shop glitch and Strings (ITISFoundation#7306)
1 parent 8f5f5b6 commit 645e2e9

File tree

6 files changed

+16
-40
lines changed

6 files changed

+16
-40
lines changed

‎services/static-webserver/client/source/class/osparc/desktop/account/ProfilePage.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
225225
maxWidth: 500
226226
});
227227

228-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("For Privacy reasons, you might want to hide your Full Name and/or the email to other users"));
228+
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("For Privacy reasons, you might want to hide your First and Last Names and/or the Email to other users"));
229229
box.add(label);
230230

231231
const hideFullname = new qx.ui.form.CheckBox().set({
@@ -237,7 +237,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
237237

238238
const form = new qx.ui.form.Form();
239239
form.add(hideFullname, "Hide Full Name", null, "hideFullname");
240-
form.add(hideEmail, "Hide email", null, "hideEmail");
240+
form.add(hideEmail, "Hide Email", null, "hideEmail");
241241
box.add(new qx.ui.form.renderer.Single(form));
242242

243243
// binding to a model

‎services/static-webserver/client/source/class/osparc/desktop/preferences/pages/ConfirmationsPage.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ qx.Class.define("osparc.desktop.preferences.pages.ConfirmationsPage", {
114114
cbConfirmStopNode.addListener("changeValue", e => osparc.Preferences.patchPreferenceField("confirmStopNode", cbConfirmStopNode, e.getData()));
115115
box.add(cbConfirmStopNode);
116116

117-
const cbSnapNodeToGrid = new qx.ui.form.CheckBox(this.tr("Snap Node to grid"));
117+
const cbSnapNodeToGrid = new qx.ui.form.CheckBox(this.tr("Snap Node to Grid"));
118118
preferencesSettings.bind("snapNodeToGrid", cbSnapNodeToGrid, "value");
119119
cbSnapNodeToGrid.addListener("changeValue", e => osparc.Preferences.patchPreferenceField("snapNodeToGrid", cbSnapNodeToGrid, e.getData()));
120120
box.add(cbSnapNodeToGrid);

‎services/static-webserver/client/source/class/osparc/desktop/preferences/pages/GeneralPage.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ qx.Class.define("osparc.desktop.preferences.pages.GeneralPage", {
137137

138138
__addLowDiskSpaceSetting: function() {
139139
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("Low Disk Space Threshold"));
140-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Set the warning Threshold for low Disk Space availability."), "text-13-italic");
140+
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Set the warning Threshold for Low Disk Space availability"), "text-13-italic");
141141
box.add(label);
142142
const form = new qx.ui.form.Form();
143143
const diskUsageSpinner = new qx.ui.form.Spinner().set({

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

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ qx.Class.define("osparc.product.AboutProduct", {
4949
__buildLayout: function() {
5050
switch (osparc.product.Utils.getProductName()) {
5151
case "s4l":
52-
this.__buildS4LLayout();
53-
break;
5452
case "s4lacad":
55-
this.__buildS4LAcademicLayout();
53+
this.__buildS4LLayout();
5654
break;
5755
case "s4llite":
5856
this.__buildS4LLiteLayout();
@@ -73,11 +71,11 @@ qx.Class.define("osparc.product.AboutProduct", {
7371
__buildS4LLayout: function() {
7472
const licenseUrl = osparc.store.Support.getLicenseURL();
7573
const text = this.tr(`
76-
sim4life.io is a native implementation of the most advanced simulation platform, Sim4Life, in the cloud. \
74+
Sim4Life.web is a native implementation of the most advanced simulation platform, Sim4Life, in the cloud. \
7775
The platform empowers users to simulate, analyze, and predict complex, multifaceted, and dynamic biological interactions within the full anatomical complexity of the human body. \
7876
It provides the ability to set up and run complex simulations directly within any browser, utilizing cloud technology.
7977
<br><br>
80-
sim4life.io makes use of technologies developed by our research partner for the o<sup>2</sup>S<sup>2</sup>PARC platform, the IT’IS Foundation, and co-funded by the U.S. National Institutes of Health’s SPARC initiative.\
78+
Sim4Life.web makes use of technologies developed by our research partner for the o<sup>2</sup>S<sup>2</sup>PARC platform, the IT’IS Foundation, and co-funded by the U.S. National Institutes of Health’s SPARC initiative.\
8179
<br><br>
8280
For more information about Sim4Life, please visit ${osparc.utils.Utils.createHTMLLink("sim4life.swiss", "https://sim4life.swiss/")}.
8381
<br><br>
@@ -90,26 +88,6 @@ qx.Class.define("osparc.product.AboutProduct", {
9088
this.add(label);
9189
},
9290

93-
__buildS4LAcademicLayout: function() {
94-
const licenseUrl = osparc.store.Support.getLicenseURL();
95-
const text = this.tr(`
96-
sim4life.science is a native implementation of the most advanced simulation platform, Sim4Life, in the cloud. \
97-
The platform empowers users to simulate, analyze, and predict complex, multifaceted, and dynamic biological interactions within the full anatomical complexity of the human body. \
98-
It provides the ability to set up and run complex simulations directly within any browser, utilizing cloud technology.
99-
<br><br>
100-
sim4life.science makes use of technologies developed by our research partner for the o<sup>2</sup>S<sup>2</sup>PARC platform, the IT’IS Foundation, and co-funded by the U.S. National Institutes of Health’s SPARC initiative.\
101-
<br><br>
102-
For more information about Sim4Life, please visit ${osparc.utils.Utils.createHTMLLink("sim4life.swiss", "href='https://sim4life.swiss/")}.
103-
<br><br>
104-
To review license agreements, click ${osparc.utils.Utils.createHTMLLink("here", licenseUrl)}.
105-
<br><br>
106-
Send us an email ${this.__getMailTo()}
107-
`);
108-
109-
const label = osparc.product.quickStart.Utils.createLabel(text);
110-
this.add(label);
111-
},
112-
11391
__buildS4LLiteLayout: function() {
11492
// https://zurichmedtech.github.io/s4l-lite-manual/#/docs/what_is_s4l_lite
11593
const introText = "Sim4Life.lite is a powerful web-based simulation platform that allows you to model and analyze real-world phenomena and to design complex technical devices in a validated environment. With its intuitive interface and advanced tools, Sim4Life.lite makes it easy to develop your simulation project, wherever you are.";

‎services/static-webserver/client/source/class/osparc/store/LicensedItems.js‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ qx.Class.define("osparc.store.LicensedItems", {
2222
construct: function() {
2323
this.base(arguments);
2424

25-
this.__licensedItems = null;
26-
this.__cachedLicensedItems = {};
25+
this.__licensedItems = {};
2726
},
2827

2928
statics: {
@@ -52,23 +51,22 @@ qx.Class.define("osparc.store.LicensedItems", {
5251

5352
members: {
5453
__licensedItems: null,
55-
__cachedLicensedItems: null,
5654

5755
getLicensedItems: function() {
58-
if (this.__cachedLicensedItems.length) {
59-
return new Promise(resolve => resolve(this.__cachedLicensedItems));
56+
if (Object.keys(this.__licensedItems).length) {
57+
return new Promise(resolve => resolve(this.__licensedItems));
6058
}
6159

6260
return osparc.data.Resources.getInstance().getAllPages("licensedItems")
6361
.then(licensedItemsData => {
6462
licensedItemsData.forEach(licensedItemData => this.__addLicensedItemsToCache(licensedItemData));
65-
return this.__cachedLicensedItems;
63+
return this.__licensedItems;
6664
});
6765
},
6866

6967
__addLicensedItemsToCache: function(licensedItemData) {
7068
const licensedItem = new osparc.data.model.LicensedItem(licensedItemData);
71-
this.__cachedLicensedItems[licensedItem.getLicensedItemId()] = licensedItem;
69+
this.__licensedItems[licensedItem.getLicensedItemId()] = licensedItem;
7270
},
7371

7472
getPurchasedLicensedItems: function(walletId, urlParams, options = {}) {

‎services/static-webserver/client/source/class/osparc/vipMarket/Market.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ qx.Class.define("osparc.vipMarket.Market", {
6565
licensedItemsStore.getLicensedItems(),
6666
licensedItemsStore.getPurchasedLicensedItems(walletId),
6767
])
68-
.then(values => {
68+
.then(async values => {
6969
const licensedItems = values[0];
7070
const purchasedItems = values[1];
7171
osparc.data.model.LicensedItem.addSeatsFromPurchases(licensedItems, purchasedItems);
@@ -104,21 +104,21 @@ qx.Class.define("osparc.vipMarket.Market", {
104104
}
105105
});
106106

107+
await this.__addFreeItems();
108+
107109
categories.forEach(category => {
108110
this.__buildViPMarketPage(category, category["items"]);
109111
});
110112

111113
if (openCategory) {
112114
this.__openCategory(openCategory);
113115
}
114-
115-
this.__addFreeItems();
116116
});
117117
},
118118

119119
__addFreeItems: function() {
120120
const licensedItemsStore = osparc.store.LicensedItems.getInstance();
121-
licensedItemsStore.getLicensedItems()
121+
return licensedItemsStore.getLicensedItems()
122122
.then(async licensedItems => {
123123
this.__freeItems = [];
124124
const licensedItemsArr = Object.values(licensedItems);

0 commit comments

Comments
 (0)