Skip to content

Commit 8af62fb

Browse files
committed
move button to user menu
1 parent 50ada4b commit 8af62fb

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ qx.Class.define("osparc.navigation.NavigationBar", {
133133
this.getChildControl("read-only-info");
134134

135135
// right-items
136-
if (osparc.product.Utils.isProduct("tiplite")) {
137-
this.getChildControl("tip-lite-button");
138-
}
139136
this.getChildControl("tasks-button");
140137
this.getChildControl("notifications-button");
141138
this.getChildControl("expiration-icon");
@@ -231,15 +228,6 @@ qx.Class.define("osparc.navigation.NavigationBar", {
231228
this.getChildControl("center-items").add(control);
232229
break;
233230
}
234-
case "tip-lite-button":
235-
control = new qx.ui.form.Button(this.tr("Access TIP")).set({
236-
marginRight: 30,
237-
...this.self().BUTTON_OPTIONS,
238-
});
239-
osparc.utils.Utils.setIdToWidget(control, "accessTIPBtn");
240-
control.addListener("execute", () => osparc.product.TIPTeaser.getInstance().open());
241-
this.getChildControl("right-items").add(control);
242-
break;
243231
case "credits-button":
244232
control = new osparc.desktop.credits.CreditsIndicatorButton();
245233
this.getChildControl("right-items").add(control);

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

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ qx.Class.define("osparc.navigation.UserMenu", {
9595
control.addListener("execute", () => osparc.cluster.Utils.popUpClustersDetails(), this);
9696
this.add(control);
9797
break;
98-
case "license":
99-
control = new qx.ui.menu.Button(this.tr("License"));
100-
osparc.store.Support.getLicenseURL()
101-
.then(licenseURL => control.addListener("execute", () => window.open(licenseURL)));
102-
this.add(control);
103-
break;
10498
case "about":
10599
control = new qx.ui.menu.Button(this.tr("About oSPARC"));
106100
control.addListener("execute", () => osparc.About.getInstance().open());
@@ -116,6 +110,18 @@ qx.Class.define("osparc.navigation.UserMenu", {
116110
this.add(control);
117111
break;
118112
}
113+
case "license":
114+
control = new qx.ui.menu.Button(this.tr("License"));
115+
osparc.store.Support.getLicenseURL()
116+
.then(licenseURL => control.addListener("execute", () => window.open(licenseURL)));
117+
this.add(control);
118+
break;
119+
case "tip-lite-button":
120+
control = new qx.ui.menu.Button(this.tr("Access full TIP"));
121+
osparc.utils.Utils.setIdToWidget(control, "userMenuAccessTIPBtn");
122+
control.addListener("execute", () => osparc.product.TIPTeaser.getInstance().open());
123+
this.getChildControl("right-items").add(control);
124+
break;
119125
case "log-out": {
120126
const authData = osparc.auth.Data.getInstance();
121127
control = new qx.ui.menu.Button(authData.isGuest() ? this.tr("Exit") : this.tr("Log out"));
@@ -167,6 +173,9 @@ qx.Class.define("osparc.navigation.UserMenu", {
167173
this.getChildControl("about-product");
168174
}
169175
this.getChildControl("license");
176+
if (osparc.product.Utils.isProduct("tiplite")) {
177+
this.getChildControl("tip-lite-button");
178+
}
170179
this.addSeparator();
171180

172181
this.getChildControl("log-out");
@@ -220,6 +229,9 @@ qx.Class.define("osparc.navigation.UserMenu", {
220229
this.getChildControl("about-product");
221230
}
222231
this.getChildControl("license");
232+
if (osparc.product.Utils.isProduct("tiplite")) {
233+
this.getChildControl("tip-lite-button");
234+
}
223235
this.addSeparator();
224236
this.getChildControl("log-out");
225237

0 commit comments

Comments
 (0)