From 87d84b922fa4aee1a81d428dd9055973ba014aef Mon Sep 17 00:00:00 2001 From: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Date: Wed, 15 Mar 2023 22:38:29 +0100 Subject: [PATCH] feat(web): improve /auth pages (#1969) * feat(web): improve /auth pages * invalidate load functions after login * handle login server errors more graceful * add loading state to oauth button --- .../forms/admin-registration-form.svelte | 148 +++++++------- .../forms/change-password-form.svelte | 89 ++++---- .../lib/components/forms/login-form.svelte | 191 +++++++++--------- .../fullscreen-container.svelte | 29 +++ web/src/lib/constants.ts | 5 +- .../auth/change-password/+page.server.ts | 31 ++- .../routes/auth/change-password/+page.svelte | 25 ++- web/src/routes/auth/login/+page.server.ts | 20 +- web/src/routes/auth/login/+page.svelte | 24 ++- web/src/routes/auth/register/+page.svelte | 13 +- 10 files changed, 299 insertions(+), 276 deletions(-) create mode 100644 web/src/lib/components/shared-components/fullscreen-container.svelte diff --git a/web/src/lib/components/forms/admin-registration-form.svelte b/web/src/lib/components/forms/admin-registration-form.svelte index b4e706d5fe..526958b593 100644 --- a/web/src/lib/components/forms/admin-registration-form.svelte +++ b/web/src/lib/components/forms/admin-registration-form.svelte @@ -1,14 +1,11 @@ -
- Since you are the first user on the system, you will be assigned as the Admin and are - responsible for administrative tasks, and additional users will be created by you. -
+ -
- Hi {user.firstName}
- {user.lastName} ({user.email}),
-
-
- This is either the first time you are signing into the system or a request has been made to change
- your password. Please enter the new password below.
-
{success}
+ {/if} +- {@html loginPageMessage} -
- {/if} - - {#if authConfig.passwordLoginEnabled} - - {/if} - - {#if authConfig.enabled} - {#if authConfig.passwordLoginEnabled} -