From d31b35873f357d2a58a68fef58b27c07e3e9fa4c Mon Sep 17 00:00:00 2001 From: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Date: Wed, 15 Feb 2023 18:56:54 +0100 Subject: [PATCH] feat(web): improve login screen (#1754) --- web/src/app.css | 8 + .../lib/components/forms/login-form.svelte | 146 ++++++++++-------- web/src/routes/auth/login/+page.svelte | 15 +- 3 files changed, 95 insertions(+), 74 deletions(-) diff --git a/web/src/app.css b/web/src/app.css index e2f47a1155..cec3d3d719 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -68,6 +68,14 @@ input:focus-visible { @apply bg-immich-primary dark:bg-immich-dark-primary dark:text-immich-dark-gray text-gray-100 border dark:border-immich-dark-gray rounded-xl py-2 px-4 transition-all duration-150 hover:bg-immich-primary dark:hover:bg-immich-dark-primary/90 hover:shadow-lg text-sm font-medium; } + .immich-btn-primary-big { + @apply inline-flex justify-center items-center bg-immich-primary dark:bg-immich-dark-primary dark:text-immich-dark-gray text-white enabled:dark:hover:bg-immich-dark-primary/80 enabled:hover:bg-immich-primary/75 disabled:cursor-not-allowed px-6 py-4 rounded-md shadow-md w-full font-semibold; + } + + .immich-btn-secondary-big { + @apply inline-flex justify-center items-center bg-gray-500 dark:bg-gray-200 text-white enabled:hover:bg-gray-500/75 enabled:dark:hover:bg-gray-200/80 dark:text-immich-dark-gray disabled:cursor-not-allowed px-6 py-4 rounded-md shadow-md w-full font-semibold; + } + .immich-text-button { @apply flex place-items-center place-content-center gap-2 hover:bg-immich-primary/5 p-2 rounded-lg font-medium; } diff --git a/web/src/lib/components/forms/login-form.svelte b/web/src/lib/components/forms/login-form.svelte index 8511d74722..932de9f51d 100644 --- a/web/src/lib/components/forms/login-form.svelte +++ b/web/src/lib/components/forms/login-form.svelte @@ -5,6 +5,7 @@ import { handleError } from '$lib/utils/handle-error'; import { api, oauth, OAuthConfigResponseDto } from '@api'; import { createEventDispatcher, onMount } from 'svelte'; + import { fade } from 'svelte/transition'; import ImmichLogo from '../shared-components/immich-logo.svelte'; let error: string; @@ -75,10 +76,10 @@
{oauthError}
- {/if} - - - +{oauthError}
+ {/if} + + + +Login has been disabled.
- {/if} + {#if !authConfig.enabled && !authConfig.passwordLoginEnabled} +Login has been disabled.
{/if}