Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
appearance: "filter-toggle-button"
});
editTagsButton.addListener("execute", () => {
const preferencesWindow = osparc.desktop.preferences.PreferencesWindow.openWindow();
preferencesWindow.openTags();
const myAccountWindow = osparc.desktop.account.MyAccountWindow.openWindow();
myAccountWindow.openTags();
});
layout.add(editTagsButton);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,20 @@ qx.Class.define("osparc.desktop.account.MyAccount", {

this.__profilePage = this.__addProfilePage();

if (osparc.data.Permissions.getInstance().canDo("usage.all.read")) {
this.__usagePage = this.__addUsagePage();
// show Usage in My Account if wallets are not enabled. If they are enabled it will be in the BIlling Center
if (!osparc.desktop.credits.Utils.areWalletsEnabled()) {
if (osparc.data.Permissions.getInstance().canDo("usage.all.read")) {
this.__usagePage = this.__addUsagePage();
}
}

this.__addGeneralSettings();
this.__addConfirmationSettings();
if (osparc.product.Utils.showPreferencesTokens()) {
this.__addTokensPage();
}
if (osparc.data.Permissions.getInstance().canDo("user.tag")) {
this.__addTagsPage();
}
},

Expand Down Expand Up @@ -96,6 +108,7 @@ qx.Class.define("osparc.desktop.account.MyAccount", {
members: {
__profilePage: null,
__usagePage: null,
__tagsPage: null,

__addProfilePage: function() {
const title = this.tr("Profile");
Expand All @@ -112,10 +125,39 @@ qx.Class.define("osparc.desktop.account.MyAccount", {
const page = this.addTab(title, iconSrc, usageOverview);
return page;
},
__addGeneralSettings: function() {
const title = this.tr("Settings");
const iconSrc = "@FontAwesome5Solid/cogs/22";
const generalPage = new osparc.desktop.preferences.pages.GeneralPage();
this.addTab(title, iconSrc, generalPage);
},

openProfile: function() {
this._openPage(this.__profilePage);
return true;
}
__addConfirmationSettings: function() {
const title = this.tr("Confirmations");
const iconSrc = "@FontAwesome5Solid/question-circle/22";
const confirmPage = new osparc.desktop.preferences.pages.ConfirmationsPage();
this.addTab(title, iconSrc, confirmPage);
},

__addTokensPage: function() {
const title = this.tr("API Keys/Tokens");
const iconSrc = "@FontAwesome5Solid/exchange-alt/22";
const tokensPage = new osparc.desktop.preferences.pages.TokensPage();
this.addTab(title, iconSrc, tokensPage);
},

__addTagsPage: function() {
const title = this.tr("Create/Edit Tags");
const iconSrc = "@FontAwesome5Solid/tags/22";
const tagsPage = new osparc.desktop.preferences.pages.TagsPage();
const page = this.__tagsPage = this.addTab(title, iconSrc, tagsPage);
osparc.utils.Utils.setIdToWidget(page.getChildControl("button"), "preferencesTagsTabBtn");
},

openTags: function() {
if (this.__tagsPage) {
this._openPage(this.__tagsPage);
}
},
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ qx.Class.define("osparc.desktop.account.MyAccountWindow", {
construct: function() {
this.base(arguments, "credits", this.tr("My Account"));

const width = 900;
const width = 990;
const height = 700;
const maxHeight = 700;
this.set({
Expand All @@ -46,8 +46,8 @@ qx.Class.define("osparc.desktop.account.MyAccountWindow", {
members: {
__myAccount: null,

openProfile: function() {
return this.__myAccount.openProfile();
}
openTags: function() {
this.__myAccount.openTags();
},
}
});

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ qx.Class.define("osparc.navigation.UserMenu", {
}, this);
this.add(control);
break;
case "preferences":
control = new qx.ui.menu.Button(this.tr("Preferences"));
control.addListener("execute", () => osparc.navigation.UserMenuButton.openPreferences(), this);
osparc.utils.Utils.setIdToWidget(control, "userMenuPreferencesBtn");
this.add(control);
break;
case "organizations":
control = new qx.ui.menu.Button(this.tr("Organizations")).set({
visibility: osparc.data.Permissions.getInstance().canDo("user.organizations.create") ? "visible" :"excluded"
Expand Down Expand Up @@ -162,7 +156,6 @@ qx.Class.define("osparc.navigation.UserMenu", {
if (osparc.desktop.credits.Utils.areWalletsEnabled()) {
this.getChildControl("billing-center");
}
this.getChildControl("preferences");
this.getChildControl("organizations");
}
this.addSeparator();
Expand Down Expand Up @@ -217,7 +210,6 @@ qx.Class.define("osparc.navigation.UserMenu", {
if (osparc.desktop.credits.Utils.areWalletsEnabled()) {
this.getChildControl("billing-center");
}
this.getChildControl("preferences");
this.getChildControl("organizations");
}
this.addSeparator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ qx.Class.define("osparc.navigation.UserMenuButton", {
});
},

statics: {
openPreferences: function() {
const preferencesWindow = osparc.desktop.preferences.PreferencesWindow.openWindow();
return preferencesWindow;
}
},

members: {
__forceNullColor: null,

Expand Down
Loading