Skip to content

Commit 7d5f6ed

Browse files
authored
🐛 Last minute frontend fixes/updates (#5473)
On behalf of @odeimaiz
1 parent 234a581 commit 7d5f6ed

File tree

17 files changed

+235
-108
lines changed

17 files changed

+235
-108
lines changed

services/static-webserver/client/compile.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"class": "osparc.Application",
4141
"theme": "osparc.theme.products.s4l.ThemeDark",
4242
"name": "s4l",
43-
"title": "Sim4Life - ZMT",
43+
"title": "Sim4Life",
4444
"include": [
4545
"iconfont.material.Load",
4646
"iconfont.fontawesome5.Load",
@@ -56,7 +56,7 @@
5656
"class": "osparc.Application",
5757
"theme": "osparc.theme.products.s4l.ThemeDark",
5858
"name": "s4llite",
59-
"title": "Sim4Life lite",
59+
"title": "Sim4Life Lite",
6060
"include": [
6161
"iconfont.material.Load",
6262
"iconfont.fontawesome5.Load",
@@ -72,7 +72,7 @@
7272
"class": "osparc.Application",
7373
"theme": "osparc.theme.products.s4l.ThemeDark",
7474
"name": "s4lacad",
75-
"title": "Sim4Life Academic",
75+
"title": "Sim4Life Science",
7676
"include": [
7777
"iconfont.material.Load",
7878
"iconfont.fontawesome5.Load",

services/static-webserver/client/source/class/osparc/auth/LoginPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ qx.Class.define("osparc.auth.LoginPage", {
345345
textColor: "text-darker"
346346
});
347347
const vendor = osparc.store.VendorInfo.getInstance().getVendor();
348-
if (vendor) {
348+
if (vendor && "url" in vendor && "copyright" in vendor) {
349349
organizationLink.set({
350350
value: vendor.copyright,
351351
url: vendor.url

services/static-webserver/client/source/class/osparc/auth/ui/RequestAccount.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ qx.Class.define("osparc.auth.ui.RequestAccount", {
162162
label: "Social Media"
163163
}, {
164164
id: "Other",
165-
label: "Other (please specify below)"
165+
label: "Other"
166166
}].forEach(hearData => {
167167
const lItem = new qx.ui.form.ListItem(hearData.label, null, hearData.id);
168168
hear.add(lItem);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ qx.Class.define("osparc.dashboard.GridButtonItem", {
215215
},
216216

217217
createOwner: function(label) {
218-
const resourceType = this.getResourceType() === "study" ? "project" : this.getResourceType();
219218
if (label === osparc.auth.Data.getInstance().getEmail()) {
220-
return qx.locale.Manager.tr(`My ${resourceType}`);
219+
const resourceAlias = osparc.utils.Utils.resourceTypeToAlias(this.getResourceType());
220+
return qx.locale.Manager.tr(`My ${resourceAlias}`);
221221
}
222222
return osparc.utils.Utils.getNameFromEmail(label);
223223
},

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ qx.Class.define("osparc.dashboard.ListButtonItem", {
210210

211211
createOwner: function(label) {
212212
if (label === osparc.auth.Data.getInstance().getEmail()) {
213-
return qx.locale.Manager.tr("My project");
213+
const resourceAlias = osparc.utils.Utils.resourceTypeToAlias(this.getResourceType());
214+
return qx.locale.Manager.tr(`My ${resourceAlias}`);
214215
}
215216
return osparc.utils.Utils.getNameFromEmail(label);
216217
},

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ qx.Class.define("osparc.dashboard.ResourceMoreOptions", {
4646
HEIGHT: 700,
4747

4848
popUpInWindow: function(moreOpts) {
49-
const prjAlias = osparc.product.Utils.getStudyAlias({firstUpperCase: true});
5049
// eslint-disable-next-line no-underscore-dangle
51-
const title = qx.locale.Manager.tr(prjAlias + ` Details - ${moreOpts.__resourceData.name}`);
50+
const resourceAlias = osparc.utils.Utils.resourceTypeToAlias(moreOpts.__resourceData["resourceType"]);
51+
// eslint-disable-next-line no-underscore-dangle
52+
const title = `${resourceAlias} ${qx.locale.Manager.tr("Details")} - ${moreOpts.__resourceData.name}`
5253
return osparc.ui.window.Window.popUpInWindow(moreOpts, title, this.WIDTH, this.HEIGHT).set({
5354
maxHeight: 1000,
5455
layout: new qx.ui.layout.Grow(),
@@ -127,7 +128,7 @@ qx.Class.define("osparc.dashboard.ResourceMoreOptions", {
127128
__openTapped: function() {
128129
if (this.__resourceData["resourceType"] !== "study") {
129130
// Nothing to pre-check
130-
this.__openStudy();
131+
this.__openResource();
131132
return;
132133
}
133134
this.__openButton.setFetching(true);
@@ -157,7 +158,7 @@ qx.Class.define("osparc.dashboard.ResourceMoreOptions", {
157158
if (anyUpdatable) {
158159
this.__confirmUpdate();
159160
} else {
160-
this.__openStudy();
161+
this.__openResource();
161162
}
162163
})
163164
.catch(() => this.__openButton.setFetching(false));
@@ -175,12 +176,12 @@ qx.Class.define("osparc.dashboard.ResourceMoreOptions", {
175176
if (win.getConfirmed()) {
176177
this.__openPage(this.__servicesUpdatePage);
177178
} else {
178-
this.__openStudy();
179+
this.__openResource();
179180
}
180181
});
181182
},
182183

183-
__openStudy: function() {
184+
__openResource: function() {
184185
switch (this.__resourceData["resourceType"]) {
185186
case "study":
186187
this.fireDataEvent("openStudy", this.__resourceData);

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
7070
description: "New Sim4Life project",
7171
newStudyLabel: "New S4L project",
7272
idToWidget: "startS4LButton"
73-
},
74-
"simcore/services/dynamic/jupyter-smash": {
75-
title: "Start Sim4Life lab",
76-
description: "Jupyter powered by S4L",
77-
newStudyLabel: "New Sim4Life lab project",
78-
idToWidget: "startJSmashButton"
7973
}
8074
},
8175
EXPECTED_S4L_LITE_SERVICE_KEYS: {

services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ qx.Class.define("osparc.desktop.StudyEditor", {
182182

183183
study.initStudy();
184184

185-
if (osparc.product.Utils.isS4LProduct()) {
185+
if (osparc.product.Utils.isS4LProduct()|| osparc.product.Utils.isProduct("s4llite")) {
186186
this.__startIdlingTracker();
187187
}
188188

services/static-webserver/client/source/class/osparc/navigation/LogoOnOff.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,7 @@ qx.Class.define("osparc.navigation.LogoOnOff", {
6363
break;
6464
}
6565
case "off-logo": {
66-
control = new qx.ui.basic.Image("osparc/offline.svg").set({
67-
width: 92,
68-
height: 35,
69-
scale: true
70-
});
66+
control = new qx.ui.basic.Image("osparc/offline.svg");
7167
const container = this.getChildControl("off-logo-container");
7268
container.add(control, {
7369
flex: 1
@@ -76,10 +72,6 @@ qx.Class.define("osparc.navigation.LogoOnOff", {
7672
}
7773
case "on-logo": {
7874
control = new osparc.ui.basic.LogoWPlatform();
79-
control.setSize({
80-
width: 100,
81-
height: osparc.navigation.NavigationBar.HEIGHT
82-
});
8375
control.setFont("text-9");
8476
this.add(control);
8577
break;

services/static-webserver/client/source/class/osparc/navigation/NavigationBar.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,12 @@ qx.Class.define("osparc.navigation.NavigationBar", {
173173
alignY: "middle"
174174
});
175175
control.getChildControl("off-logo").set({
176-
width: 100,
177-
height: 35
178-
});
176+
width: 92,
177+
height: 35,
178+
scale: true
179+
})
179180
control.getChildControl("on-logo").setSize({
180-
width: osparc.product.Utils.getProductName() === "s4l" ? 150 : 100,
181+
width: osparc.product.Utils.isS4LProduct() ? 150 : 100,
181182
height: osparc.navigation.NavigationBar.HEIGHT
182183
});
183184
this.getChildControl("left-items").add(control);
@@ -400,7 +401,7 @@ qx.Class.define("osparc.navigation.NavigationBar", {
400401
} else {
401402
// left-items
402403
this.getChildControl("logo").getChildControl("on-logo").setSize({
403-
width: osparc.product.Utils.getProductName() === "s4l" ? 150 : 100,
404+
width: osparc.product.Utils.isS4LProduct() ? 150 : 100,
404405
height: osparc.navigation.NavigationBar.HEIGHT
405406
});
406407
if (!osparc.product.Utils.isProduct("osparc")) {

0 commit comments

Comments
 (0)