Skip to content

Commit 9af39fd

Browse files
authored
Merge branch 'master' into is347/collaboration-not-dev-feature
2 parents 25fe724 + bc3996b commit 9af39fd

33 files changed

+780
-232
lines changed

services/static-webserver/client/source/class/osparc/NewRelease.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ qx.Class.define("osparc.NewRelease", {
7373
const releaseTag = osparc.utils.Utils.getReleaseTag();
7474
const releaseLink = osparc.utils.Utils.getReleaseLink();
7575
const linkLabel = new osparc.ui.basic.LinkLabel().set({
76-
value: this.tr("What's new in ") + releaseTag,
76+
value: this.tr("What's New in ") + releaseTag,
7777
url: releaseLink,
7878
font: "link-label-14"
7979
});

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,12 @@ qx.Class.define("osparc.dashboard.Dashboard", {
5454
osparc.wrapper.JsonTreeViewer.getInstance().init();
5555
osparc.wrapper.JsonFormatter.getInstance().init();
5656
osparc.wrapper.DOMPurify.getInstance().init();
57-
osparc.wrapper.RadialMenu.getInstance().init()
58-
.then(loaded => {
59-
if (loaded) {
60-
// hack to trigger fonts loading
61-
const menu = osparc.wrapper.RadialMenu.getInstance().createMenu();
62-
menu.show();
63-
menu.hide();
64-
}
65-
});
57+
osparc.wrapper.RadialMenu.getInstance().init();
58+
6659
this.__createMainViewLayout();
60+
61+
62+
qx.event.message.Bus.getInstance().subscribe("showTab", msg => this.showTab(msg.getData()), this);
6763
},
6864

6965
properties: {
@@ -99,6 +95,13 @@ qx.Class.define("osparc.dashboard.Dashboard", {
9995
return this.__appBrowser;
10096
},
10197

98+
showTab: function(tabId) {
99+
const tabFound = this.getSelectables().find(s => s.id === tabId);
100+
if (tabFound) {
101+
this.setSelection([tabFound]);
102+
}
103+
},
104+
102105
__createMainViewLayout: function() {
103106
const permissions = osparc.data.Permissions.getInstance();
104107
const tabIconSize = 20;

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

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -356,20 +356,24 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
356356
}
357357
}
358358

359-
// Show Quick Start if there are no studies in the root folder of the personal workspace
360-
const quickStartInfo = osparc.product.quickStart.Utils.getQuickStart();
361-
if (quickStartInfo) {
362-
const dontShowQuickStart = osparc.utils.Utils.localCache.getLocalStorageItem(quickStartInfo.localStorageStr);
363-
if (dontShowQuickStart === "true" || this.__dontQuickStart) {
364-
return;
365-
}
366-
const nStudies = "_meta" in resp ? resp["_meta"]["total"] : 0;
367-
if (
368-
nStudies === 0 &&
369-
this.getCurrentContext() === osparc.dashboard.StudyBrowser.CONTEXT.PROJECTS &&
370-
this.getCurrentWorkspaceId() === null &&
371-
this.getCurrentFolderId() === null
372-
) {
359+
// Check if this is the first time the user logged in
360+
const nStudies = "_meta" in resp ? resp["_meta"]["total"] : 0;
361+
if (
362+
nStudies === 0 &&
363+
this.getCurrentContext() === osparc.dashboard.StudyBrowser.CONTEXT.PROJECTS &&
364+
this.getCurrentWorkspaceId() === null &&
365+
this.getCurrentFolderId() === null
366+
) {
367+
// It is!
368+
// Open Support Center
369+
osparc.support.SupportCenter.openWindow();
370+
// and open the Introductory Quick Start if any
371+
const quickStartInfo = osparc.product.quickStart.Utils.getQuickStart();
372+
if (quickStartInfo) {
373+
const dontShowQuickStart = osparc.utils.Utils.localCache.getLocalStorageItem(quickStartInfo.localStorageStr);
374+
if (dontShowQuickStart === "true" || this.__dontQuickStart) {
375+
return;
376+
}
373377
const quickStartWindow = quickStartInfo.tutorial();
374378
quickStartWindow.center();
375379
quickStartWindow.open();

services/static-webserver/client/source/class/osparc/data/model/IframeHandler.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ qx.Class.define("osparc.data.model.IframeHandler", {
116116

117117
__initIFrame: function() {
118118
const iframe = new osparc.widget.PersistentIframe();
119+
if (this.getNode().getKey().includes("s4l-ui")) {
120+
iframe.getIframe().setAppearance("iframe-no-border");
121+
}
119122
osparc.utils.Utils.setIdToWidget(iframe.getIframe(), "iframe_"+this.getNode().getNodeId());
120123
this.self().evalShowToolbar(iframe, this.getStudy());
121124
iframe.addListener("restart", () => this.restartIFrame(), this);

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
5858
},
5959

6060
createSectionBox: function(title) {
61-
const box = osparc.ui.window.TabbedView.createSectionBox(title).set({
61+
const box = new osparc.widget.SectionBox(title).set({
6262
alignX: "left",
6363
maxWidth: 500
6464
});
@@ -337,9 +337,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
337337
const privacyModel = this.__userPrivacyModel = qx.data.marshal.Json.createModel(defaultModel, true);
338338

339339
const box = this.self().createSectionBox(this.tr("Privacy"));
340-
341-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Choose what others see."));
342-
box.add(label);
340+
box.addHelper(this.tr("Choose what others see."));
343341

344342
const hideUserName = new qx.ui.form.CheckBox().set({
345343
value: defaultModel.hideUserName
@@ -453,9 +451,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
453451

454452
__create2FASection: function() {
455453
const box = this.self().createSectionBox(this.tr("Two-Factor Authentication"));
456-
457-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Set your preferred method to use for two-factor authentication when signing in:"));
458-
box.add(label);
454+
box.addHelper(this.tr("Set your preferred method to use for two-factor authentication when signing in:"));
459455

460456
const form = new qx.ui.form.Form();
461457

@@ -659,9 +655,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
659655
__createDeleteAccount: function() {
660656
// layout
661657
const box = this.self().createSectionBox(this.tr("Delete Account"));
662-
663-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Request the deletion of your account."));
664-
box.add(label);
658+
box.addHelper(this.tr("Request the deletion of your account."));
665659

666660
const deleteBtn = new qx.ui.form.Button(this.tr("Delete Account")).set({
667661
appearance: "danger-button",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ qx.Class.define("osparc.desktop.credits.BuyCreditsStepper", {
6868
const { paymentId, paymentFormUrl } = data;
6969
this.setPaymentId(paymentId)
7070
this.__iframe = new qx.ui.embed.Iframe(paymentFormUrl).set({
71-
decorator: "no-border-2"
71+
decorator: "no-border-0"
7272
});
7373
this.add(this.__iframe);
7474
this.setSelection([this.__iframe])

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ qx.Class.define("osparc.desktop.credits.PaymentGatewayWindow", {
2121
statics: {
2222
popUp: function(url, title, options) {
2323
const iframe = new qx.ui.embed.Iframe(url).set({
24-
decorator: "no-border-2"
24+
decorator: "no-border-0"
2525
})
2626
return osparc.ui.window.Window.popUpInWindow(iframe, title, options.width, options.height).set({
2727
clickAwayClose: false

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ qx.Class.define("osparc.desktop.preferences.pages.ConfirmationsPage", {
3939
members: {
4040
__createConfirmationsSettings: function() {
4141
// layout
42-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Ask for confirmation for the following actions:"));
42+
const label = new qx.ui.basic.Label(this.tr("Ask for confirmation for the following actions:")).set({
43+
font: "text-13",
44+
});
4345
this._add(label);
4446

4547
this._add(new qx.ui.core.Spacer(null, 10));
@@ -125,12 +127,8 @@ qx.Class.define("osparc.desktop.preferences.pages.ConfirmationsPage", {
125127

126128
__createExperimentalSettings: function() {
127129
// layout
128-
const box = osparc.ui.window.TabbedView.createSectionBox("Experimental preferences");
129-
130-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr(
131-
"This is a list of experimental preferences"
132-
));
133-
box.add(label);
130+
const box = new osparc.widget.SectionBox("Experimental preferences");
131+
box.addHelper(this.tr("This is a list of experimental preferences"));
134132

135133
const preferencesSettings = osparc.Preferences.getInstance();
136134

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

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ qx.Class.define("osparc.desktop.preferences.pages.GeneralPage", {
4646

4747
members: {
4848
__addCreditsIndicatorSettings: function() {
49-
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("Credits Indicator"));
49+
const box = new osparc.widget.SectionBox(this.tr("Credits Indicator"));
5050

5151
const form = new qx.ui.form.Form();
5252

@@ -93,10 +93,9 @@ qx.Class.define("osparc.desktop.preferences.pages.GeneralPage", {
9393
},
9494

9595
__addInactivitySetting: function() {
96-
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("Automatic Shutdown of Idle Instances"));
96+
const box = new osparc.widget.SectionBox(this.tr("Automatic Shutdown of Idle Instances"));
9797

98-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Enter 0 to disable this function"), "text-13-italic");
99-
box.add(label);
98+
box.addHelper(this.tr("Enter 0 to disable this function"));
10099

101100
const form = new qx.ui.form.Form();
102101
const inactivitySpinner = new qx.ui.form.Spinner().set({
@@ -118,7 +117,7 @@ qx.Class.define("osparc.desktop.preferences.pages.GeneralPage", {
118117
},
119118

120119
__addJobConcurrencySetting: function() {
121-
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("Job Concurrency"));
120+
const box = new osparc.widget.SectionBox(this.tr("Job Concurrency"));
122121
const form = new qx.ui.form.Form();
123122
const jobConcurrencySpinner = new qx.ui.form.Spinner().set({
124123
minimum: 1,
@@ -136,9 +135,9 @@ qx.Class.define("osparc.desktop.preferences.pages.GeneralPage", {
136135
},
137136

138137
__addLowDiskSpaceSetting: function() {
139-
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");
141-
box.add(label);
138+
const box = new osparc.widget.SectionBox(this.tr("Low Disk Space Threshold"));
139+
box.addHelper(this.tr("Set the warning Threshold for Low Disk Space availability"));
140+
142141
const form = new qx.ui.form.Form();
143142
const diskUsageSpinner = new qx.ui.form.Spinner().set({
144143
minimum: 1,
@@ -157,10 +156,8 @@ qx.Class.define("osparc.desktop.preferences.pages.GeneralPage", {
157156
},
158157

159158
__addS4LUserPrivacySettings: function() {
160-
const box = osparc.ui.window.TabbedView.createSectionBox("Privacy Settings");
161-
162-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Help us improve Sim4Life user experience"), "text-13-italic");
163-
box.add(label);
159+
const box = new osparc.widget.SectionBox("Privacy Settings");
160+
box.addHelper(this.tr("Help us improve Sim4Life user experience"));
164161

165162
const preferencesSettings = osparc.Preferences.getInstance();
166163

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ qx.Class.define("osparc.desktop.preferences.pages.TagsPage", {
2121
const msg = this.tr("\
2222
Tags help you organize the ") + studiesLabel + this.tr(" in the Dashboard by categorizing topics, making it easier to search and filter. \
2323
Once the tags are created, they can be assigned to the ") + studyLabel + this.tr(" via 'More options...' on the ") + studyLabel + this.tr(" cards.");
24-
const intro = osparc.ui.window.TabbedView.createHelpLabel(msg);
24+
const intro = new qx.ui.basic.Label(msg).set({
25+
font: "text-13",
26+
});
2527
this._add(intro);
2628

2729
this.__renderLayout();

0 commit comments

Comments
 (0)