Skip to content

Commit b0d802d

Browse files
authored
✨ Frontend: Branding (ITISFoundation#3159)
1 parent 2ffa877 commit b0d802d

File tree

19 files changed

+89
-52
lines changed

19 files changed

+89
-52
lines changed

services/web/client/source/class/osparc/auth/LoginPage.js

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,12 @@ qx.Class.define("osparc.auth.LoginPage", {
4545
layout.setRowFlex(1, 1);
4646
layout.setColumnFlex(0, 1);
4747
this._setLayout(layout);
48-
osparc.utils.LibVersions.getPlatformName()
49-
.then(platformName => {
50-
let image = null;
51-
const now = new Date().getTime();
52-
const afterKZ = new Date("2022-07-01").getTime();
53-
if ((now < afterKZ) && platformName === "master") {
54-
image = this._getLogoWPlatform2();
55-
} else {
56-
image = this._getLogoWPlatform();
57-
}
58-
this._add(image, {
59-
row: 0,
60-
column: 0
61-
});
62-
});
48+
49+
const image = this._getLogoWPlatform();
50+
this._add(image, {
51+
row: 0,
52+
column: 0
53+
});
6354

6455
const pages = this._getLoginStack();
6556
this._add(pages, {

services/web/client/source/class/osparc/auth/LoginPageTI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ qx.Class.define("osparc.auth.LoginPageTI", {
4545
this.getContentElement().setStyles({
4646
"background-image": "url(resource/osparc/ti_splitimage.png)",
4747
"background-repeat": "no-repeat",
48-
"background-size": "auto 100%"
48+
"background-size": "contain"
4949
});
5050

5151
this._add(new qx.ui.core.Spacer(), {

services/web/client/source/class/osparc/component/metadata/ServicesInStudy.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ qx.Class.define("osparc.component.metadata.ServicesInStudy", {
142142
const infoButton = new qx.ui.form.Button(null, "@MaterialIcons/info_outline/14");
143143
infoButton.addListener("execute", () => {
144144
const metadata = osparc.utils.Services.getMetaData(node["key"], node["version"]);
145-
const serviceDetails = new osparc.servicecard.Large(metadata, nodeId);
145+
const serviceDetails = new osparc.servicecard.Large(metadata, {
146+
nodeId,
147+
label: node["label"]
148+
});
146149
const title = this.tr("Service information");
147150
const width = 600;
148151
const height = 700;

services/web/client/source/class/osparc/component/node/BaseNodeView.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@ qx.Class.define("osparc.component.node.BaseNodeView", {
192192

193193
__openServiceDetails: function() {
194194
const node = this.getNode();
195-
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), node.getNodeId(), node.getStudy());
195+
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), {
196+
nodeId: node.getNodeId(),
197+
label: node.getLabel(),
198+
study: node.getStudy()
199+
});
196200
const title = this.tr("Service information");
197201
const width = 600;
198202
const height = 700;

services/web/client/source/class/osparc/component/widget/NodesTree.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,11 @@ qx.Class.define("osparc.component.widget.NodesTree", {
244244
osparc.ui.window.Window.popUpInWindow(studyDetails, title, width, height);
245245
} else {
246246
const node = study.getWorkbench().getNode(nodeId);
247-
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), nodeId, study);
247+
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), {
248+
nodeId,
249+
label: node.getLabel(),
250+
study
251+
});
248252
const title = this.tr("Service information");
249253
const width = 600;
250254
const height = 700;

services/web/client/source/class/osparc/component/workbench/WorkbenchUI.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,11 @@ qx.Class.define("osparc.component.workbench.WorkbenchUI", {
14971497
__openNodeInfo: function(nodeId) {
14981498
if (nodeId) {
14991499
const node = this.getStudy().getWorkbench().getNode(nodeId);
1500-
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), nodeId, this.getStudy());
1500+
const serviceDetails = new osparc.servicecard.Large(node.getMetaData(), {
1501+
nodeId,
1502+
label: node.getLabel(),
1503+
study: this.getStudy()
1504+
});
15011505
const title = this.tr("Service information");
15021506
const width = 600;
15031507
const height = 700;

services/web/client/source/class/osparc/dashboard/ResourceMoreOptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ qx.Class.define("osparc.dashboard.ResourceMoreOptions", {
200200
const title = this.tr("Information");
201201
const icon = "@FontAwesome5Solid/info";
202202
const resourceData = this.__resourceData;
203-
const infoCard = osparc.utils.Resources.isService(resourceData) ? new osparc.servicecard.Large(resourceData, null, null, false) : new osparc.studycard.Large(resourceData, false);
203+
const infoCard = osparc.utils.Resources.isService(resourceData) ? new osparc.servicecard.Large(resourceData, null, false) : new osparc.studycard.Large(resourceData, false);
204204
infoCard.addListener("openAccessRights", () => this.openAccessRights());
205205
infoCard.addListener("openClassifiers", () => this.openClassfiers());
206206
infoCard.addListener("openQuality", () => this.openQuality());

services/web/client/source/class/osparc/servicecard/Large.js

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ qx.Class.define("osparc.servicecard.Large", {
2121

2222
/**
2323
* @param serviceData {Object} Serialized Service Object
24-
* @param instanceUuid {String} uuid of the service instance
24+
* @param instance {Object} instance related data
2525
* @param openOptions {Boolean} open edit options in new window or fire event
2626
*/
27-
construct: function(serviceData, instanceUuid = null, study = null, openOptions = true) {
27+
construct: function(serviceData, instance = null, openOptions = true) {
2828
this.base(arguments);
2929

3030
this.set({
@@ -35,24 +35,24 @@ qx.Class.define("osparc.servicecard.Large", {
3535

3636
this.setService(serviceData);
3737

38-
if (instanceUuid) {
39-
this.setInstanceUuid(instanceUuid);
40-
}
41-
42-
if (study) {
43-
this.setStudy(study);
38+
if (instance) {
39+
if ("nodeId" in instance) {
40+
this.setNodeId(instance["nodeId"]);
41+
}
42+
if ("label" in instance) {
43+
this.setInstanceLabel(instance["label"]);
44+
}
45+
if ("study" in instance) {
46+
this.setStudy(instance["study"]);
47+
}
4448
}
4549

4650
if (openOptions !== undefined) {
4751
this.setOpenOptions(openOptions);
4852
}
4953

50-
this.addListenerOnce("appear", () => {
51-
this.__rebuildLayout();
52-
}, this);
53-
this.addListener("resize", () => {
54-
this.__rebuildLayout();
55-
}, this);
54+
this.addListenerOnce("appear", () => this.__rebuildLayout(), this);
55+
this.addListener("resize", () => this.__rebuildLayout(), this);
5656
},
5757

5858
events: {
@@ -70,7 +70,13 @@ qx.Class.define("osparc.servicecard.Large", {
7070
apply: "__rebuildLayout"
7171
},
7272

73-
instanceUuid: {
73+
nodeId: {
74+
check: "String",
75+
init: null,
76+
nullable: true
77+
},
78+
79+
instanceLabel: {
7480
check: "String",
7581
init: null,
7682
nullable: true
@@ -169,7 +175,14 @@ qx.Class.define("osparc.servicecard.Large", {
169175
},
170176

171177
__createTitle: function() {
172-
const title = osparc.servicecard.Utils.createTitle(this.getService()).set({
178+
const serviceName = this.getService()["name"];
179+
let text = "";
180+
if (this.getInstanceLabel()) {
181+
text = `${this.getInstanceLabel()} [${serviceName}]`;
182+
} else {
183+
text = serviceName;
184+
}
185+
const title = osparc.servicecard.Utils.createTitle(text).set({
173186
font: "title-16"
174187
});
175188
return title;
@@ -233,13 +246,13 @@ qx.Class.define("osparc.servicecard.Large", {
233246
}
234247
});
235248

236-
if (this.getInstanceUuid()) {
249+
if (this.getNodeId()) {
237250
extraInfo.unshift({
238251
label: this.tr("UUID"),
239-
view: this.__createInstaceUuid(),
252+
view: this.__createNodeId(),
240253
action: {
241254
button: osparc.utils.Utils.getCopyButton(),
242-
callback: this.__copyUuidToClipboard,
255+
callback: this.__copyNodeIdToClipboard,
243256
ctx: this
244257
}
245258
});
@@ -257,8 +270,8 @@ qx.Class.define("osparc.servicecard.Large", {
257270
return moreInfo;
258271
},
259272

260-
__createInstaceUuid: function() {
261-
return osparc.servicecard.Utils.createInstaceUuid(this.getInstanceUuid());
273+
__createNodeId: function() {
274+
return osparc.servicecard.Utils.createNodeId(this.getNodeId());
262275
},
263276

264277
__createKey: function() {
@@ -302,11 +315,11 @@ qx.Class.define("osparc.servicecard.Large", {
302315
const resourcesLayout = osparc.servicecard.Utils.createResourcesInfo();
303316
resourcesLayout.exclude();
304317
let promise = null;
305-
if (this.getInstanceUuid()) {
318+
if (this.getNodeId()) {
306319
const params = {
307320
url: {
308321
studyId: this.getStudy().getUuid(),
309-
nodeId: this.getInstanceUuid()
322+
nodeId: this.getNodeId()
310323
}
311324
};
312325
promise = osparc.data.Resources.fetch("nodesInStudyResources", "getResources", params);
@@ -348,8 +361,8 @@ qx.Class.define("osparc.servicecard.Large", {
348361
titleEditor.open();
349362
},
350363

351-
__copyUuidToClipboard: function() {
352-
osparc.utils.Utils.copyTextToClipboard(this.getInstanceUuid());
364+
__copyNodeIdToClipboard: function() {
365+
osparc.utils.Utils.copyTextToClipboard(this.getNodeId());
353366
},
354367

355368
__copyKeyToClipboard: function() {

services/web/client/source/class/osparc/servicecard/Utils.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,21 @@ qx.Class.define("osparc.servicecard.Utils", {
2121

2222
statics: {
2323
/**
24-
* @param serviceData {Object} Serialized Service Object
24+
* @param label {String} label
2525
*/
26-
createTitle: function(serviceData) {
27-
const title = new qx.ui.basic.Label().set({
26+
createTitle: function(label) {
27+
const title = new qx.ui.basic.Label(label).set({
2828
font: "title-14",
2929
allowStretchX: true,
3030
rich: true
3131
});
32-
title.setValue(serviceData["name"]);
3332
return title;
3433
},
3534

3635
/**
3736
* @param serviceData {Object} Serialized Service Object
3837
*/
39-
createInstaceUuid: function(instaceUuid) {
38+
createNodeId: function(instaceUuid) {
4039
const label = new qx.ui.basic.Label().set({
4140
maxWidth: 220
4241
});

services/web/client/source/class/osparc/utils/Utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ qx.Class.define("osparc.utils.Utils", {
268268
const product = qx.core.Environment.get("product.name");
269269
switch (product) {
270270
case "s4l":
271-
logosPath = lightLogo ? "osparc/s4l_zmt-white.png" : "osparc/s4l_zmt-black.png";
271+
logosPath = lightLogo ? "osparc/s4l_zmt-white.svg" : "osparc/s4l_zmt-black.svg";
272272
break;
273273
case "tis": {
274274
logosPath = lightLogo ? "osparc/tip_itis-white.svg" : "osparc/tip_itis-black.svg";

0 commit comments

Comments
 (0)