From 97798e5382832d2093a2bf7b3058dfa4bfd02252 Mon Sep 17 00:00:00 2001 From: Till JS Date: Tue, 31 Mar 2026 13:16:14 +0200 Subject: [PATCH] refactor(auth-ui): rewrite LoginPage + RegisterPage to use Tailwind CSS Replace ~700 lines of scoped CSS with Tailwind utility classes for consistency with the rest of the monorepo. Both pages now use identical patterns: Tailwind for layout/sizing/spacing, style: bindings for dynamic dark/light colors, minimal diff --git a/packages/shared-auth-ui/src/pages/RegisterPage.svelte b/packages/shared-auth-ui/src/pages/RegisterPage.svelte index 41fb8e6d8..d5e670fae 100644 --- a/packages/shared-auth-ui/src/pages/RegisterPage.svelte +++ b/packages/shared-auth-ui/src/pages/RegisterPage.svelte @@ -156,31 +156,6 @@ } } - // Password validation - let passwordRequirements = $derived.by(() => { - if (!password) { - return { - length: false, - lowercase: false, - uppercase: false, - digit: false, - special: false, - }; - } - - return { - length: password.length >= 8, - lowercase: /[a-z]/.test(password), - uppercase: /[A-Z]/.test(password), - digit: /[0-9]/.test(password), - special: /[^a-zA-Z0-9]/.test(password), - }; - }); - - function getPageBackground() { - return isDark ? darkBackground : lightBackground; - } - async function handleRegister() { loading = true; error = null; @@ -266,23 +241,22 @@ Create Account - {appName} + +
- + {#if headerControls} -
+
{@render headerControls()}
{/if} - -
-
- -
-

- {appName} -

-
- - -
-
- -

+ +
+
- {t.title} -

+ +
+

{appName}

+
- - {#if error} -
-

{error}

+ +
+
+ +
+

+ {t.title} +

- {/if} - - {#if verificationEmailSent} -
-

- {t.verificationEmailSent} -

-
- {/if} + + {#if error} + + {/if} - - {#if success && needsVerification} -
+ {#if verificationEmailSent} +
+ {t.verificationEmailSent} +
+ {/if} + + + {#if success && needsVerification} +
+
+
+ + + +
+
+

+ {t.checkYourEmail || 'Check your email'} +

+

+ {t.accountCreated} +

+
+
+ + {#if onResendVerification} +
+

+ Didn't receive the email? +

+ +
+ {/if} +
+ {/if} + + +
{ + e.preventDefault(); + handleRegister(); + }} > -
-
- - - -
-
-

- {t.checkYourEmail || 'Check your email'} -

-

- {t.accountCreated} -

-
+ +
+
- {#if onResendVerification} -
-

- Didn't receive the email? -

+ +
+
+
- {/if} -
- {/if} - - - { - e.preventDefault(); - handleRegister(); - }} - class="space-y-4" - > -
- -
- -
-
- -
-
- + -
-
- - + +
+
+ + +
+ + +

+ {t.passwordRequirements} +

+ + + + + + +
+
- - -

- {t.passwordRequirements} -

- - - - - -
-
-
+ {#if appSlider} -
+
{@render appSlider()} -
- {:else} - -
+ {/if}
+ +