Skip to content

Commit 88e5a7a

Browse files
authored
🎨 [Frontend] Prettify Project card (#7830)
1 parent b43e721 commit 88e5a7a

File tree

6 files changed

+128
-161
lines changed

6 files changed

+128
-161
lines changed

services/static-webserver/client/compile.json

Lines changed: 1 addition & 1 deletion
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": "TIP V3.0 - IT'IS",
139+
"title": "TIP V4.0 - IT'IS",
140140
"include": [
141141
"iconfont.material.Load",
142142
"iconfont.fontawesome5.Load",

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ qx.Class.define("osparc.desktop.MainPage", {
115115
const preferencesSettings = osparc.Preferences.getInstance();
116116
if (!isReadOnly && preferencesSettings.getConfirmBackToDashboard()) {
117117
const studyName = this.__studyEditor.getStudy().getName();
118-
const win = new osparc.ui.window.Confirmation();
118+
const win = new osparc.ui.window.Confirmation().set({
119+
confirmAction: "warning",
120+
});
119121
if (osparc.product.Utils.getProductName().includes("s4l")) {
120122
let msg = this.tr("Do you want to close ") + "<b>" + studyName + "</b>?";
121123
msg += "<br><br>";

services/static-webserver/client/source/class/osparc/info/ServiceLarge.js

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ qx.Class.define("osparc.info.ServiceLarge", {
262262
}
263263

264264
extraInfo.push({
265-
label: this.tr("KEY"),
265+
label: this.tr("Key"),
266266
view: this.__createKey(),
267267
action: {
268268
button: osparc.utils.Utils.getCopyButton(),
@@ -273,34 +273,34 @@ qx.Class.define("osparc.info.ServiceLarge", {
273273

274274
if (osparc.data.Permissions.getInstance().isTester() || osparc.service.Utils.canIWrite(this.getService()["accessRights"])) {
275275
extraInfo.push({
276-
label: this.tr("INTEGRATION VERSION"),
276+
label: this.tr("Integration Version"),
277277
view: this.__createIntegrationVersion(),
278278
action: null
279279
});
280280
}
281281

282282
extraInfo.push({
283-
label: this.tr("VERSION"),
283+
label: this.tr("Version"),
284284
view: this.__createDisplayVersion(),
285285
action: {
286286
button: osparc.service.Utils.canIWrite(this.getService()["accessRights"]) ? osparc.utils.Utils.getEditButton() : null,
287287
callback: this.__openVersionDisplayEditor,
288288
ctx: this
289289
}
290290
}, {
291-
label: this.tr("RELEASE DATE"),
291+
label: this.tr("Released Date"),
292292
view: this.__createReleasedDate(),
293293
action: null
294294
}, {
295-
label: this.tr("CONTACT"),
295+
label: this.tr("Contact"),
296296
view: this.__createContact(),
297297
action: null
298298
}, {
299-
label: this.tr("AUTHORS"),
299+
label: this.tr("Authors"),
300300
view: this.__createAuthors(),
301301
action: null
302302
}, {
303-
label: this.tr("ACCESS RIGHTS"),
303+
label: this.tr("Access"),
304304
view: this.__createAccessRights(),
305305
action: {
306306
button: osparc.service.Utils.canIWrite(this.getService()["accessRights"]) ? osparc.utils.Utils.getEditButton() : null,
@@ -309,37 +309,6 @@ qx.Class.define("osparc.info.ServiceLarge", {
309309
}
310310
});
311311

312-
if (
313-
osparc.product.Utils.showClassifiers() &&
314-
this.getService()["classifiers"]
315-
) {
316-
extraInfo.push({
317-
label: this.tr("CLASSIFIERS"),
318-
view: this.__createClassifiers(),
319-
action: {
320-
button: osparc.service.Utils.canIWrite(this.getService()["accessRights"]) ? osparc.utils.Utils.getEditButton() : null,
321-
callback: this.isOpenOptions() ? this.__openClassifiers : "openClassifiers",
322-
ctx: this
323-
}
324-
});
325-
}
326-
327-
if (
328-
osparc.product.Utils.showQuality() &&
329-
this.getService()["quality"] &&
330-
osparc.metadata.Quality.isEnabled(this.getService()["quality"])
331-
) {
332-
extraInfo.push({
333-
label: this.tr("QUALITY"),
334-
view: this.__createQuality(),
335-
action: {
336-
button: osparc.service.Utils.canIWrite(this.getService()["accessRights"]) ? osparc.utils.Utils.getEditButton() : null,
337-
callback: this.isOpenOptions() ? this.__openQuality : "openQuality",
338-
ctx: this
339-
}
340-
});
341-
}
342-
343312
return extraInfo;
344313
},
345314

services/static-webserver/client/source/class/osparc/info/ServiceUtils.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,16 @@ qx.Class.define("osparc.info.ServiceUtils", {
9595
*/
9696
createAuthors: function(serviceData) {
9797
const authors = new qx.ui.basic.Label().set({
98-
rich: true
98+
rich: true,
99+
wrap: true,
100+
maxWidth: 220,
101+
});
102+
authors.set({
103+
value: serviceData["authors"].map(author => author["name"]).join(", "),
99104
});
100105
serviceData["authors"].forEach(author => {
101-
const oldVal = authors.getValue();
102106
const oldTTT = authors.getToolTipText();
103107
authors.set({
104-
value: (oldVal ? oldVal : "") + `${author["name"]} <br>`,
105108
toolTipText: (oldTTT ? oldTTT : "") + `${author["email"]} - ${author["affiliation"]}<br>`
106109
});
107110
});
@@ -168,7 +171,7 @@ qx.Class.define("osparc.info.ServiceUtils", {
168171
* @param maxHeight {Number} description's maxHeight
169172
*/
170173
createDescription: function(serviceData) {
171-
const descriptionLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(5).set({
174+
const descriptionLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox().set({
172175
alignY: "middle"
173176
}));
174177

services/static-webserver/client/source/class/osparc/info/StudyLarge.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ qx.Class.define("osparc.info.StudyLarge", {
130130
__infoElements: function() {
131131
const infoLayout = {
132132
"TITLE": {
133-
label: this.tr("Title:"),
134133
view: osparc.info.StudyUtils.createTitle(this.getStudy()),
135134
action: {
136135
button: osparc.utils.Utils.getEditButton(this.__canIWrite()),
@@ -139,7 +138,6 @@ qx.Class.define("osparc.info.StudyLarge", {
139138
}
140139
},
141140
"THUMBNAIL": {
142-
label: this.tr("Thumbnail:"),
143141
view: this.__createThumbnail(),
144142
action: {
145143
button: osparc.utils.Utils.getEditButton(this.__canIWrite()),
@@ -148,7 +146,6 @@ qx.Class.define("osparc.info.StudyLarge", {
148146
}
149147
},
150148
"DESCRIPTION": {
151-
label: this.tr("Description:"),
152149
view: osparc.info.StudyUtils.createDescriptionMD(this.getStudy(), 150),
153150
action: {
154151
button: osparc.utils.Utils.getEditButton(this.__canIWrite()),
@@ -157,12 +154,12 @@ qx.Class.define("osparc.info.StudyLarge", {
157154
}
158155
},
159156
"AUTHOR": {
160-
label: this.tr("Author:"),
157+
label: this.tr("Author"),
161158
view: osparc.info.StudyUtils.createOwner(this.getStudy()),
162159
action: null
163160
},
164161
"ACCESS_RIGHTS": {
165-
label: this.tr("Access:"),
162+
label: this.tr("Access"),
166163
view: osparc.info.StudyUtils.createAccessRights(this.getStudy()),
167164
action: {
168165
button: osparc.utils.Utils.getLinkButton(this.__canIWrite()),
@@ -171,17 +168,17 @@ qx.Class.define("osparc.info.StudyLarge", {
171168
}
172169
},
173170
"CREATED": {
174-
label: this.tr("Created:"),
171+
label: this.tr("Created"),
175172
view: osparc.info.StudyUtils.createCreationDate(this.getStudy()),
176173
action: null
177174
},
178175
"MODIFIED": {
179-
label: this.tr("Modified:"),
176+
label: this.tr("Modified"),
180177
view: osparc.info.StudyUtils.createLastChangeDate(this.getStudy()),
181178
action: null
182179
},
183180
"TAGS": {
184-
label: this.tr("Tags:"),
181+
label: this.tr("Tags"),
185182
view: osparc.info.StudyUtils.createTags(this.getStudy()),
186183
action: {
187184
button: osparc.utils.Utils.getLinkButton(this.__canIWrite()),

0 commit comments

Comments
 (0)