forked from ITISFoundation/osparc-simcore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ New apps/prodcuts: sim4life desktop and sim4life desktop academia (I…
- Loading branch information
Showing
25 changed files
with
248 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
services/static-webserver/client/source/class/osparc/desktop/MainPageDesktop.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* ************************************************************************ | ||
osparc - the simcore frontend | ||
https://osparc.io | ||
Copyright: | ||
2023 IT'IS Foundation, https://itis.swiss | ||
License: | ||
MIT: https://opensource.org/licenses/MIT | ||
Authors: | ||
* Odei Maiz (odeimaiz) | ||
************************************************************************ */ | ||
|
||
qx.Class.define("osparc.desktop.MainPageDesktop", { | ||
extend: qx.ui.core.Widget, | ||
|
||
construct: function() { | ||
this.base(arguments); | ||
|
||
this._setLayout(new qx.ui.layout.VBox(null, null, "separator-vertical")); | ||
|
||
this._add(osparc.notification.RibbonNotifications.getInstance()); | ||
|
||
const navBar = new osparc.navigation.NavigationBar(); | ||
navBar.populateLayout() | ||
.then(() => { | ||
// exclude some items from the navigation bar | ||
navBar.getChildControl("dashboard-label").exclude(); | ||
navBar.getChildControl("dashboard-button").exclude(); | ||
navBar.getChildControl("notifications-button").exclude(); | ||
navBar.getChildControl("help").exclude(); | ||
|
||
// exclude all the menu entries except "log-out" from user menu | ||
const userMenuButton = navBar.getChildControl("user-menu"); | ||
const userMenu = userMenuButton.getMenu(); | ||
// eslint-disable-next-line no-underscore-dangle | ||
const userMenuEntries = userMenu._getCreatedChildControls(); | ||
Object.entries(userMenuEntries).forEach(([id, userMenuEntry]) => { | ||
if (!["mini-profile-view", "log-out"].includes(id)) { | ||
userMenuEntry.exclude(); | ||
} | ||
}); | ||
// exclude also the separators | ||
userMenu.getChildren().forEach(child => { | ||
if (child.classname === "qx.ui.menu.Separator") { | ||
child.exclude(); | ||
} | ||
}); | ||
}); | ||
this._add(navBar); | ||
|
||
osparc.MaintenanceTracker.getInstance().startTracker(); | ||
|
||
const store = osparc.store.Store.getInstance(); | ||
const preloadPromises = []; | ||
const walletsEnabled = osparc.desktop.credits.Utils.areWalletsEnabled(); | ||
if (walletsEnabled) { | ||
preloadPromises.push(store.reloadCreditPrice()); | ||
preloadPromises.push(store.reloadWallets()); | ||
} | ||
preloadPromises.push(store.getAllClassifiers(true)); | ||
preloadPromises.push(store.getTags()); | ||
Promise.all(preloadPromises) | ||
.then(() => { | ||
const desktopCenter = new osparc.desktop.credits.DesktopCenter(); | ||
this._add(desktopCenter, { | ||
flex: 1 | ||
}); | ||
}); | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
services/static-webserver/client/source/class/osparc/desktop/credits/DesktopCenter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* ************************************************************************ | ||
osparc - the simcore frontend | ||
https://osparc.io | ||
Copyright: | ||
2023 IT'IS Foundation, https://itis.swiss | ||
License: | ||
MIT: https://opensource.org/licenses/MIT | ||
Authors: | ||
* Odei Maiz (odeimaiz) | ||
************************************************************************ */ | ||
|
||
/** | ||
* A mix between the Billing Center and My Account | ||
*/ | ||
|
||
qx.Class.define("osparc.desktop.credits.DesktopCenter", { | ||
extend: osparc.desktop.credits.BillingCenter, | ||
|
||
construct: function() { | ||
this.base(arguments); | ||
|
||
this.set({ | ||
backgroundColor: "background-main-2" | ||
}); | ||
|
||
const page = new osparc.desktop.credits.ProfilePage(); | ||
page.showLabelOnTab(); | ||
const profilePos = 2; // 0: Miniview, 1: Summary | ||
this._tabsView.addAt(page, profilePos); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.