Skip to content

Commit fcc7b78

Browse files
odeimaizmrnicegyu11
authored andcommitted
🎨 [Frontend] Access Full TIP (ITISFoundation#6423)
1 parent a876819 commit fcc7b78

File tree

4 files changed

+27
-21
lines changed

4 files changed

+27
-21
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
794794
if (product in newStudiesData) {
795795
const mode = this._resourcesContainer.getMode();
796796
const title = this.tr("New Plan");
797-
const desc = this.tr("Choose Plan in pop-up");
798-
const newStudyBtn = (mode === "grid") ? new osparc.dashboard.GridButtonNew(title, desc) : new osparc.dashboard.ListButtonNew(title, desc);
797+
const newStudyBtn = (mode === "grid") ? new osparc.dashboard.GridButtonNew(title) : new osparc.dashboard.ListButtonNew(title);
799798
newStudyBtn.setCardKey("new-study");
800799
newStudyBtn.subscribeToFilterGroup("searchBarFilter");
801800
osparc.utils.Utils.setIdToWidget(newStudyBtn, "newStudyBtn");

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

Lines changed: 7 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");
@@ -186,6 +183,13 @@ qx.Class.define("osparc.navigation.NavigationBar", {
186183
width: osparc.product.Utils.isS4LProduct() ? 150 : 100,
187184
height: osparc.navigation.NavigationBar.HEIGHT
188185
});
186+
if (osparc.product.Utils.isProduct("tiplite")) {
187+
control.set({
188+
cursor: "pointer",
189+
toolTipText: this.tr("This is TIP.lite, a light version of TIP.<br>Request access to TIP.")
190+
});
191+
control.addListener("tap", () => osparc.product.TIPTeaser.getInstance().open());
192+
}
189193
this.getChildControl("left-items").add(control);
190194
break;
191195
case "logo-powered":
@@ -231,15 +235,6 @@ qx.Class.define("osparc.navigation.NavigationBar", {
231235
this.getChildControl("center-items").add(control);
232236
break;
233237
}
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;
243238
case "credits-button":
244239
control = new osparc.desktop.credits.CreditsIndicatorButton();
245240
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.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

‎services/static-webserver/client/source/class/osparc/product/TIPTeaser.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ qx.Class.define("osparc.product.TIPTeaser", {
2020
type: "singleton",
2121

2222
construct: function() {
23-
this.base(arguments, this.tr("Access TIP"));
23+
this.base(arguments, this.tr("Access Full TIP"));
2424

2525
this.set({
2626
layout: new qx.ui.layout.VBox(10),

0 commit comments

Comments
 (0)