From 72f45bf6a3940c8a60df48ff2d7573c422f2bc63 Mon Sep 17 00:00:00 2001 From: Lewis Date: Wed, 18 Mar 2026 07:18:08 +0200 Subject: [PATCH] refactor(frontend): extract oauth primary flow page styles --- frontend/src/routes/OAuthConsent.svelte | 400 +---------------------- frontend/src/routes/OAuthLogin.svelte | 299 +---------------- frontend/src/routes/OAuthRegister.svelte | 209 +----------- 3 files changed, 16 insertions(+), 892 deletions(-) diff --git a/frontend/src/routes/OAuthConsent.svelte b/frontend/src/routes/OAuthConsent.svelte index 82b075f..201376c 100644 --- a/frontend/src/routes/OAuthConsent.svelte +++ b/frontend/src/routes/OAuthConsent.svelte @@ -49,8 +49,6 @@ } let loading = $state(true) - let showSpinner = $state(false) - let loadingTimer: ReturnType | null = null let error = $state(null) let submitting = $state(false) let consentData = $state(null) @@ -140,11 +138,6 @@ error = $_('oauth.error.genericError') } finally { loading = false - showSpinner = false - if (loadingTimer) { - clearTimeout(loadingTimer) - loadingTimer = null - } } } @@ -252,17 +245,7 @@ } $effect(() => { - loadingTimer = setTimeout(() => { - if (loading) { - showSpinner = true - } - }, 5000) fetchConsentData() - return () => { - if (loadingTimer) { - clearTimeout(loadingTimer) - } - } }) let scopeGroups = $derived(consentData ? groupScopesByCategory(consentData.scopes) : []) @@ -297,16 +280,7 @@ {/if} - - diff --git a/frontend/src/routes/OAuthLogin.svelte b/frontend/src/routes/OAuthLogin.svelte index f0f5b91..64dad69 100644 --- a/frontend/src/routes/OAuthLogin.svelte +++ b/frontend/src/routes/OAuthLogin.svelte @@ -401,7 +401,7 @@ {/if}
-
+
{#if ssoLoading === provider.provider} - + {$_('common.loading')} {:else} {/if} @@ -445,7 +445,7 @@

{$_('oauth.login.signInWithPasskey')}

@@ -502,13 +502,13 @@
-
{:else} {#if hasPassword || !securityStatusChecked} -
+
-
{/if}
-
@@ -544,286 +544,3 @@ {$_('login.forgotPassword')} · {$_('login.lostPasskey')}

- - diff --git a/frontend/src/routes/OAuthRegister.svelte b/frontend/src/routes/OAuthRegister.svelte index 10be4e5..326e28e 100644 --- a/frontend/src/routes/OAuthRegister.svelte +++ b/frontend/src/routes/OAuthRegister.svelte @@ -308,10 +308,7 @@
{#if loadingServerInfo} -
-
-

{$_('common.loading')}

-
+
{:else if flow}