From e54d20bcb7c5a686d53005f3c2f18dec85a3d52a Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:44:52 +0100 Subject: [PATCH] feat: migrate login page to design system styling Replace inline styles with CSS module matching the design system's LoginForm visual patterns. Uses proper DS class structure (divider, social section, form fields) while keeping username-based auth instead of the DS component's email validation. Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/src/auth/LoginPage.module.css | 85 +++++++++++++++++++++++++++ ui/src/auth/LoginPage.tsx | 99 ++++++++++++++++++++------------ 2 files changed, 146 insertions(+), 38 deletions(-) create mode 100644 ui/src/auth/LoginPage.module.css diff --git a/ui/src/auth/LoginPage.module.css b/ui/src/auth/LoginPage.module.css new file mode 100644 index 00000000..ea6b8fd3 --- /dev/null +++ b/ui/src/auth/LoginPage.module.css @@ -0,0 +1,85 @@ +.page { + display: flex; + align-items: center; + justify-content: center; + min-height: 100vh; + background: var(--bg-base); +} + +.card { + width: 100%; + max-width: 400px; + padding: 32px; +} + +.loginForm { + display: flex; + flex-direction: column; + align-items: center; + font-family: var(--font-body); + width: 100%; +} + +.logo { + margin-bottom: 8px; + font-size: 24px; + font-weight: 700; + color: var(--text-primary); +} + +.subtitle { + font-size: 13px; + color: var(--text-muted); + margin: 0 0 24px; +} + +.error { + width: 100%; + margin-bottom: 16px; +} + +.socialSection { + display: flex; + flex-direction: column; + gap: 8px; + width: 100%; + margin-bottom: 20px; +} + +.divider { + display: flex; + align-items: center; + gap: 12px; + width: 100%; + margin-bottom: 20px; +} + +.dividerLine { + flex: 1; + height: 1px; + background: var(--border); +} + +.dividerText { + color: var(--text-muted); + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.5px; + font-weight: 500; +} + +.fields { + display: flex; + flex-direction: column; + gap: 14px; + width: 100%; +} + +.submitButton { + width: 100%; +} + +.ssoButton { + width: 100%; + justify-content: center; +} diff --git a/ui/src/auth/LoginPage.tsx b/ui/src/auth/LoginPage.tsx index 92819045..02a8b226 100644 --- a/ui/src/auth/LoginPage.tsx +++ b/ui/src/auth/LoginPage.tsx @@ -3,6 +3,7 @@ import { Navigate } from 'react-router'; import { useAuthStore } from './auth-store'; import { api } from '../api/client'; import { Card, Input, Button, Alert, FormField } from '@cameleer/design-system'; +import styles from './LoginPage.module.css'; interface OidcInfo { clientId: string; @@ -50,53 +51,75 @@ export function LoginPage() { }; return ( -
- -
-
-

cameleer3

-

- Sign in to access the observability dashboard -

-
+
+ +
+
cameleer3
+

Sign in to access the observability dashboard

+ + {error && ( +
+ {error} +
+ )} {oidc && ( <> - -
-
- or -
+
+ +
+
+
+ or +
)} - - setUsername(e.target.value)} - autoFocus - autoComplete="username" - /> - + + + setUsername(e.target.value)} + placeholder="Enter your username" + autoFocus + autoComplete="username" + disabled={loading} + /> + - - setPassword(e.target.value)} - autoComplete="current-password" - /> - + + setPassword(e.target.value)} + placeholder="••••••••" + autoComplete="current-password" + disabled={loading} + /> + - - - {error &&
{error}
} - + + +
);