From 06918c967b2a5a2612681134157adf940b371de8 Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Wed, 2 Aug 2023 11:37:55 -0700 Subject: [PATCH] feat: use html dialog instead --- frontend/src/pages/log-in.ts | 40 ++++++------------------------------ 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/frontend/src/pages/log-in.ts b/frontend/src/pages/log-in.ts index 90daedbe..5cf77626 100644 --- a/frontend/src/pages/log-in.ts +++ b/frontend/src/pages/log-in.ts @@ -295,41 +295,11 @@ export class LogInPage extends LiteElement { private renderBackendInitializing() { return html` -
- - + +

Please wait while the backend initializes

+
-
- - -
- ${msg("Log in")} -
`; } @@ -374,8 +344,10 @@ export class LogInPage extends LiteElement { } async checkBackendInitialized() { - const resp = await fetch("/api/healthz"); + const resp = await fetch("/api/settings"); if (resp.status === 200) { + const Dialog = document.getElementById("backend-initializing"); + Dialog.close() this.formStateService.send("BACKEND_INITIALIZED"); } else { setTimeout(this.checkBackendInitialized, 5000);