Skip to content

Commit 2d59afa

Browse files
committed
Phase out TIP.itis.swiss
1 parent 268298d commit 2d59afa

File tree

1 file changed

+23
-3
lines changed
  • services/static-webserver/client/source/class/osparc/auth/ui

1 file changed

+23
-3
lines changed

services/static-webserver/client/source/class/osparc/auth/ui/LoginView.js

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,17 @@ qx.Class.define("osparc.auth.ui.LoginView", {
9393
createAccountBtn.setLabel(this.tr("Request Account"));
9494
}
9595
createAccountBtn.addListener("execute", () => {
96-
createAccountBtn.setEnabled(false);
97-
if (createAccountAction === "REGISTER") {
96+
// "172.29.100.6.nip.io"
97+
// "tip.itis.swiss"
98+
if (window.location.hostname === "172.29.100.6.nip.io") {
99+
this.__openTIPITISSWISSPhaseOutDialog();
100+
} else if (createAccountAction === "REGISTER") {
98101
this.fireEvent("toRegister");
99102
} else if (createAccountAction === "REQUEST_ACCOUNT_FORM") {
100103
this.fireEvent("toRequestAccount");
101104
} else if (createAccountAction === "REQUEST_ACCOUNT_INSTRUCTIONS") {
102105
osparc.store.Support.openInvitationRequiredDialog();
103106
}
104-
createAccountBtn.setEnabled(true);
105107
}, this);
106108
osparc.utils.Utils.setIdToWidget(createAccountBtn, "loginCreateAccountBtn");
107109

@@ -162,6 +164,24 @@ qx.Class.define("osparc.auth.ui.LoginView", {
162164
}
163165
},
164166

167+
__openTIPITISSWISSPhaseOutDialog: function() {
168+
const createAccountWindow = new osparc.ui.window.Dialog("Create Account").set({
169+
maxWidth: 380
170+
});
171+
const vendor = osparc.store.VendorInfo.getInstance().getVendor();
172+
let message = "This version of the planning tool will be phased out soon and no longer accepts new users.";
173+
message += "<br>";
174+
const tipLiteLabel = new osparc.ui.basic.LinkLabel("TIP.lite", "https://tip-lite.science/");
175+
const tipLabel = new osparc.ui.basic.LinkLabel("TIP", "https://tip.science/");
176+
const hereLabel = new osparc.ui.basic.LinkLabel("here", "https://itis.swiss/tools-and-systems/ti-planning/overview/");
177+
message += `Please visit ${tipLiteLabel} or ${tipLabel} instead. See ${hereLabel} for more information.`;
178+
createAccountWindow.setMessage(message);
179+
const linkLabel = new osparc.ui.basic.LinkLabel(vendor["invitation_url"], vendor["invitation_url"]);
180+
createAccountWindow.addWidget(linkLabel);
181+
createAccountWindow.center();
182+
createAccountWindow.open();
183+
},
184+
165185
getEmail: function() {
166186
const email = this._form.getItems().email;
167187
return email.getValue();

0 commit comments

Comments
 (0)