|
| 1 | +/* ************************************************************************ |
| 2 | +
|
| 3 | + osparc - the simcore frontend |
| 4 | +
|
| 5 | + https://osparc.io |
| 6 | +
|
| 7 | + Copyright: |
| 8 | + 2022 IT'IS Foundation, https://itis.swiss |
| 9 | +
|
| 10 | + License: |
| 11 | + MIT: https://opensource.org/licenses/MIT |
| 12 | +
|
| 13 | + Authors: |
| 14 | + * Odei Maiz (odeimaiz) |
| 15 | +
|
| 16 | +************************************************************************ */ |
| 17 | + |
| 18 | +/** |
| 19 | + * Main Authentication Page: |
| 20 | + * A multi-page view that fills all page |
| 21 | + */ |
| 22 | + |
| 23 | +qx.Class.define("osparc.auth.LoginPageTI", { |
| 24 | + extend: osparc.auth.LoginPage, |
| 25 | + |
| 26 | + /* |
| 27 | + ***************************************************************************** |
| 28 | + CONSTRUCTOR |
| 29 | + ***************************************************************************** |
| 30 | + */ |
| 31 | + construct: function() { |
| 32 | + this.base(arguments); |
| 33 | + }, |
| 34 | + |
| 35 | + events: { |
| 36 | + "done": "qx.event.type.Data" |
| 37 | + }, |
| 38 | + |
| 39 | + members: { |
| 40 | + // overridden |
| 41 | + _buildLayout: function() { |
| 42 | + const layout = new qx.ui.layout.HBox(); |
| 43 | + this._setLayout(layout); |
| 44 | + |
| 45 | + this.getContentElement().setStyles({ |
| 46 | + "background-image": "url(resource/osparc/ti_splitimage.png)", |
| 47 | + "background-repeat": "no-repeat", |
| 48 | + "background-size": "auto 100%" |
| 49 | + }); |
| 50 | + |
| 51 | + this._add(new qx.ui.core.Spacer(), { |
| 52 | + width: "50%" |
| 53 | + }); |
| 54 | + |
| 55 | + const loginLayout = new qx.ui.container.Composite(new qx.ui.layout.VBox(10)).set({ |
| 56 | + alignX: "center", |
| 57 | + alignY: "middle" |
| 58 | + }); |
| 59 | + this._add(loginLayout, { |
| 60 | + width: "50%" |
| 61 | + }); |
| 62 | + |
| 63 | + loginLayout.add(new qx.ui.core.Spacer(), { |
| 64 | + flex: 1 |
| 65 | + }); |
| 66 | + |
| 67 | + const image = this._getLogoWPlatform(); |
| 68 | + loginLayout.add(image); |
| 69 | + |
| 70 | + const pages = this._getLoginStack(); |
| 71 | + loginLayout.add(pages); |
| 72 | + |
| 73 | + const versionLink = this._getVersionLink(); |
| 74 | + loginLayout.add(versionLink); |
| 75 | + |
| 76 | + loginLayout.add(new qx.ui.core.Spacer(), { |
| 77 | + flex: 1 |
| 78 | + }); |
| 79 | + } |
| 80 | + } |
| 81 | +}); |
0 commit comments