diff --git a/frontend/src/html/header.html b/frontend/src/html/header.html index 5ebfe0bd89da..21716d4baa8e 100644 --- a/frontend/src/html/header.html +++ b/frontend/src/html/header.html @@ -128,7 +128,7 @@

-
diff --git a/frontend/src/ts/pages/login.ts b/frontend/src/ts/pages/login.ts index aa3c55f0d5a6..c0b776391b22 100644 --- a/frontend/src/ts/pages/login.ts +++ b/frontend/src/ts/pages/login.ts @@ -6,6 +6,7 @@ import { InputIndicator } from "../elements/input-indicator"; import * as Skeleton from "../utils/skeleton"; import * as Misc from "../utils/misc"; import TypoList from "../utils/typo-list"; +import * as ServerConfiguration from "../ape/server-configuration"; export function enableSignUpButton(): void { $(".page.pageLogin .register.side button").prop("disabled", false); @@ -353,8 +354,14 @@ export const page = new Page( }, async () => { Skeleton.append("pageLogin", "main"); - enableInputs(); - enableSignUpButton(); + if (ServerConfiguration.get()?.users.signUp) { + enableInputs(); + enableSignUpButton(); + + $(".register").removeClass("hidden"); + $(".login").removeClass("hidden"); + $(".disabledNotification").addClass("hidden"); + } }, async () => { // diff --git a/frontend/src/ts/ready.ts b/frontend/src/ts/ready.ts index 0cdc10f48f08..a2358f83ee41 100644 --- a/frontend/src/ts/ready.ts +++ b/frontend/src/ts/ready.ts @@ -89,7 +89,11 @@ $(document).ready(() => { .animate({ opacity: 1 }, 250); if (ConnectionState.get()) { void PSA.show(); - void ServerConfiguration.sync(); + void ServerConfiguration.sync().then(() => { + if (ServerConfiguration.get()?.users.signUp) { + $(".signInOut").removeClass("hidden"); + } + }); } MonkeyPower.init();