Skip to content

Modern Docker Management, Designed for Everyone

refactor: login screen styling (#780)

Chase Baucomb6071bf8fcdb
diff --git a/backend/internal/models/settings.go b/backend/internal/models/settings.go
index d5c74363a..551abf235 100644
--- a/backend/internal/models/settings.go
+++ b/backend/internal/models/settings.go
@@ -104,7 +104,7 @@ func (s *Settings) ToSettingVariableSlice(showAll bool, redactSensitiveValues bo
continue
}
- if !showAll && attrs != "public" {
+ if !showAll && !strings.Contains(attrs, "public") {
continue
}
@@ -168,7 +168,7 @@ func (s *Settings) UpdateField(key string, value string, noSensitive bool) error
}
// If the field is sensitive and noSensitive is true, we skip that
- if noSensitive && attrs == "sensitive" {
+ if noSensitive && strings.Contains(attrs, "sensitive") {
return SettingSensitiveForbiddenError{field: key}
}
@@ -186,7 +186,7 @@ func (s *Settings) UpdateField(key string, value string, noSensitive bool) error
// helper keeps redaction logic in one place; behavior unchanged
func redactSettingValue(key, value, attrs string, redact bool) string {
- if value == "" || !redact || attrs != "sensitive" {
+ if value == "" || !redact || !strings.Contains(attrs, "sensitive") {
return value
}
diff --git a/frontend/src/routes/auth/login/+page.svelte b/frontend/src/routes/auth/login/+page.svelte
index 00db2f481..3b6782c5c 100644
--- a/frontend/src/routes/auth/login/+page.svelte
+++ b/frontend/src/routes/auth/login/+page.svelte
@@ -11,9 +11,7 @@
import type { PageData } from './$types';
import { goto } from '$app/navigation';
import userStore from '$lib/stores/user-store';
- import settingsStore from '$lib/stores/config-store';
import { m } from '$lib/paraglide/messages';
- import { settingsService } from '$lib/services/settings-service';
import { authService } from '$lib/services/auth-service';
import { getApplicationLogo } from '$lib/utils/image.util';
@@ -62,170 +60,224 @@
}
const showDivider = $derived(showOidcLoginButton && showLocalLoginForm);
+
+ // Generate random starting positions for each orb
+ const orb1X = Math.random() * 80 - 40;
+ const orb1Y = Math.random() * 80 - 40;
+ const orb2X = Math.random() * 80 - 40;
+ const orb2Y = Math.random() * 80 - 40;
+ const orb3X = Math.random() * 80 - 40;
+ const orb3Y = Math.random() * 80 - 40;
+ const orb4X = Math.random() * 80 - 40;
+ const orb4Y = Math.random() * 80 - 40;
+
+ // Add random delay for each orb to create natural animation
+ const orb1Delay = Math.random() * 2;
+ const orb2Delay = Math.random() * 2;
+ const orb3Delay = Math.random() * 2;
+ const orb4Delay = Math.random() * 2;
</script>
-<div class="bg-muted flex min-h-screen flex-col items-center justify-center p-6 md:p-10">
- <div class="w-full max-w-sm md:max-w-3xl">
- <div class="flex flex-col gap-6">
- <Card.Root class="flex flex-col gap-6 overflow-hidden p-0">
- <Card.Content class="grid p-0 md:grid-cols-2">
- <div class={showOidcLoginButton && !showLocalLoginForm ? 'flex items-center justify-center p-6 md:p-8' : 'p-6 md:p-8'}>
- <div class="flex flex-col gap-6">
- <div class="flex flex-col items-center text-center">
- <h1 class="text-2xl font-bold">{m.auth_welcome_back_title()}</h1>
- <p class="text-muted-foreground text-balance">{m.auth_login_subtitle()}</p>
- </div>
+<div class="fixed inset-0 overflow-hidden">
+ <div
+ class="absolute rounded-full opacity-30 blur-[57px] md:blur-[85px] bg-primary w-[330px] h-[330px] md:w-[500px] md:h-[500px] left-[10%] top-[-150px] orb"
+ style="--start-x: {orb1X}; --start-y: {orb1Y}; --orb-delay: {orb1Delay}s; --orb-duration: 18s;"
+ ></div>
+ <div
+ class="absolute rounded-full opacity-30 blur-[57px] md:blur-[85px] bg-primary w-[280px] h-[280px] md:w-[420px] md:h-[420px] right-[15%] bottom-[-150px] orb"
+ style="--start-x: {orb2X}; --start-y: {orb2Y}; --orb-delay: {orb2Delay}s; --orb-duration: 22s;"
+ ></div>
+ <div
+ class="absolute rounded-full opacity-30 blur-[57px] md:blur-[85px] bg-primary w-[250px] h-[250px] md:w-[380px] md:h-[380px] right-[-120px] top-[20%] orb"
+ style="--start-x: {orb3X}; --start-y: {orb3Y}; --orb-delay: {orb3Delay}s; --orb-duration: 20s;"
+ ></div>
+ <div
+ class="absolute rounded-full opacity-30 blur-[57px] md:blur-[85px] bg-primary w-[210px] h-[210px] md:w-[320px] md:h-[320px] left-[-100px] bottom-[30%] orb"
+ style="--start-x: {orb4X}; --start-y: {orb4Y}; --orb-delay: {orb4Delay}s; --orb-duration: 16s;"
+ ></div>
+</div>
- {#if data.error}
- <Alert.Root variant="destructive">
- <CircleAlertIcon class="size-4" />
- <Alert.Title>{m.auth_login_problem_title()}</Alert.Title>
- <Alert.Description>
- {#if data.error === 'oidc_invalid_response'}
- {m.auth_oidc_invalid_response()}
- {:else if data.error === 'oidc_misconfigured'}
- {m.auth_oidc_misconfigured()}
- {:else if data.error === 'oidc_userinfo_failed'}
- {m.auth_oidc_userinfo_failed()}
- {:else if data.error === 'oidc_missing_sub'}
- {m.auth_oidc_missing_sub()}
- {:else if data.error === 'oidc_email_collision'}
- {m.auth_oidc_email_collision()}
- {:else if data.error === 'oidc_token_error'}
- {m.auth_oidc_token_error()}
- {:else if data.error === 'user_processing_failed'}
- {m.auth_user_processing_failed()}
- {:else}
- {m.auth_unexpected_error()}
- {/if}
- </Alert.Description>
- </Alert.Root>
- {/if}
-
- {#if error}
- <Alert.Root variant="destructive">
- <CircleAlertIcon class="size-4" />
- <Alert.Title>{m.auth_failed_title()}</Alert.Title>
- <Alert.Description>{error}</Alert.Description>
- </Alert.Root>
- {/if}
-
- {#if !showLocalLoginForm && !showOidcLoginButton}
- <Alert.Root variant="destructive">
- <CircleAlertIcon class="size-4" />
- <Alert.Title>{m.auth_no_login_methods_title()}</Alert.Title>
- <Alert.Description>{m.auth_no_login_methods_description()}</Alert.Description>
- </Alert.Root>
- {/if}
-
- {#if showOidcLoginButton && !showLocalLoginForm}
- <Button onclick={handleOidcLogin} class="w-full">
- <LogInIcon class="mr-2 size-4" />
- {m.auth_oidc_signin()}
- </Button>
- {/if}
-
- {#if showLocalLoginForm}
- <form onsubmit={handleLogin} class="contents">
- <div class="grid gap-3">
- <Label for="username">{m.common_username()}</Label>
- <div class="relative">
- <div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
- <UserIcon class="text-muted-foreground size-4" />
- </div>
- <Input
- id="username"
- name="username"
- type="text"
- autocomplete="username"
- required
- bind:value={username}
- class="pl-9"
- placeholder={m.auth_username_placeholder()}
- disabled={loading}
- />
- </div>
- </div>
- <div class="grid gap-3">
- <Label for="password">{m.common_password()}</Label>
- <div class="relative">
- <div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
- <LockIcon class="text-muted-foreground size-4" />
- </div>
- <Input
- id="password"
- name="password"
- type="password"
- autocomplete="current-password"
- required
- bind:value={password}
- class="pl-9"
- placeholder={m.auth_password_placeholder()}
- disabled={loading}
- />
- </div>
+<div class="relative flex min-h-screen flex-col items-center justify-center p-6 md:p-10">
+ <div class="w-full max-w-md">
+ <div class="mb-8 flex justify-center">
+ <div class="glass-light bubble bubble-shadow-lg flex items-center justify-center rounded-2xl p-6">
+ <img class="h-24 w-auto" src={logoUrl} alt={m.layout_title()} />
+ </div>
+ </div>
+
+ <Card.Root class="bubble bubble-shadow-lg flex flex-col gap-6 overflow-hidden">
+ <Card.Content class="p-8">
+ <div class="mb-8 flex flex-col items-center text-center">
+ <h1 class="text-3xl font-bold tracking-tight">{m.auth_welcome_back_title()}</h1>
+ <p class="text-muted-foreground mt-2 text-sm text-balance">{m.auth_login_subtitle()}</p>
+ </div>
+
+ <div class="space-y-4">
+ {#if data.error}
+ <Alert.Root variant="destructive" class="glass-light">
+ <CircleAlertIcon class="size-4" />
+ <Alert.Title>{m.auth_login_problem_title()}</Alert.Title>
+ <Alert.Description>
+ {#if data.error === 'oidc_invalid_response'}
+ {m.auth_oidc_invalid_response()}
+ {:else if data.error === 'oidc_misconfigured'}
+ {m.auth_oidc_misconfigured()}
+ {:else if data.error === 'oidc_userinfo_failed'}
+ {m.auth_oidc_userinfo_failed()}
+ {:else if data.error === 'oidc_missing_sub'}
+ {m.auth_oidc_missing_sub()}
+ {:else if data.error === 'oidc_email_collision'}
+ {m.auth_oidc_email_collision()}
+ {:else if data.error === 'oidc_token_error'}
+ {m.auth_oidc_token_error()}
+ {:else if data.error === 'user_processing_failed'}
+ {m.auth_user_processing_failed()}
+ {:else}
+ {m.auth_unexpected_error()}
+ {/if}
+ </Alert.Description>
+ </Alert.Root>
+ {/if}
+
+ {#if error}
+ <Alert.Root variant="destructive" class="glass-light">
+ <CircleAlertIcon class="size-4" />
+ <Alert.Title>{m.auth_failed_title()}</Alert.Title>
+ <Alert.Description>{error}</Alert.Description>
+ </Alert.Root>
+ {/if}
+
+ {#if !showLocalLoginForm && !showOidcLoginButton}
+ <Alert.Root variant="destructive" class="glass-light">
+ <CircleAlertIcon class="size-4" />
+ <Alert.Title>{m.auth_no_login_methods_title()}</Alert.Title>
+ <Alert.Description>{m.auth_no_login_methods_description()}</Alert.Description>
+ </Alert.Root>
+ {/if}
+
+ {#if showOidcLoginButton && !showLocalLoginForm}
+ <Button onclick={handleOidcLogin} class="hover-lift w-full" size="lg">
+ <LogInIcon class="mr-2 size-4" />
+ {m.auth_oidc_signin()}
+ </Button>
+ {/if}
+
+ {#if showLocalLoginForm}
+ <form onsubmit={handleLogin} class="space-y-4">
+ <div class="space-y-2">
+ <Label for="username" class="text-xs">{m.common_username()}</Label>
+ <div class="relative">
+ <div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
+ <UserIcon class="text-muted-foreground size-4" />
</div>
- <Button type="submit" class="w-full" disabled={loading} aria-busy={loading}>
- {#if loading}
- <div class="mr-2 size-4 animate-spin rounded-full border-2 border-white/30 border-t-white"></div>
- {m.auth_signing_in()}
- {:else}
- <LogInIcon class="mr-2 size-4" />
- {m.auth_signin_button()}
- {/if}
- </Button>
- </form>
-
- {#if showDivider}
- <div
- class="after:border-border/60 relative my-2 text-center text-sm after:absolute after:inset-0 after:top-1/2 after:z-0 after:flex after:items-center after:border-t"
- >
- <span
- class="bg-card/70 text-muted-foreground supports-[backdrop-filter]:bg-card/50 relative z-10 inline-flex items-center rounded-full px-3 py-0.5 text-xs backdrop-blur"
- >
- {m.auth_or_continue()}
- </span>
+ <Input
+ id="username"
+ name="username"
+ type="text"
+ autocomplete="username"
+ required
+ bind:value={username}
+ class="glass-light pl-9"
+ placeholder={m.auth_username_placeholder()}
+ disabled={loading}
+ />
+ </div>
+ </div>
+ <div class="space-y-2">
+ <Label for="password" class="text-xs">{m.common_password()}</Label>
+ <div class="relative">
+ <div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
+ <LockIcon class="text-muted-foreground size-4" />
</div>
+ <Input
+ id="password"
+ name="password"
+ type="password"
+ autocomplete="current-password"
+ required
+ bind:value={password}
+ class="glass-light pl-9"
+ placeholder={m.auth_password_placeholder()}
+ disabled={loading}
+ />
+ </div>
+ </div>
+ <Button type="submit" class="hover-lift w-full" size="lg" disabled={loading} aria-busy={loading}>
+ {#if loading}
+ <div class="mr-2 size-4 animate-spin rounded-full border-2 border-white/30 border-t-white"></div>
+ {m.auth_signing_in()}
+ {:else}
+ <LogInIcon class="mr-2 size-4" />
+ {m.auth_signin_button()}
{/if}
+ </Button>
+ </form>
- {#if showOidcLoginButton && showDivider}
- <Button onclick={handleOidcLogin} variant="outline" class="w-full">
- <LogInIcon class="mr-2 size-4" />
- {m.auth_oidc_signin()}
- </Button>
- {/if}
- {/if}
- </div>
- </div>
-
- <div
- class="hidden h-full w-full bg-gradient-to-br from-blue-600/10 via-indigo-600/10 to-purple-600/10 md:flex md:items-center md:justify-center"
- >
- <div class="space-y-4 p-8 text-center">
- <div class="mb-8">
- <img class="mx-auto h-32 w-auto opacity-60" src={logoUrl} alt={m.layout_title()} />
+ {#if showDivider}
+ <div class="relative my-4">
+ <div class="absolute inset-0 flex items-center">
+ <div class="border-border/60 w-full border-t"></div>
+ </div>
+ <div class="relative flex justify-center text-xs">
+ <span class="glass-light bubble-pill text-muted-foreground px-3 py-1">
+ {m.auth_or_continue()}
+ </span>
+ </div>
</div>
- <h2 class="text-foreground/80 text-2xl font-bold">{m.layout_title()}</h2>
- <p class="text-muted-foreground max-w-xs text-balance">{m.auth_tagline()}</p>
- </div>
- </div>
- </Card.Content>
- </Card.Root>
- </div>
+ {/if}
+
+ {#if showOidcLoginButton && showDivider}
+ <Button onclick={handleOidcLogin} variant="outline" class="hover-lift w-full" size="lg">
+ <LogInIcon class="mr-2 size-4" />
+ {m.auth_oidc_signin()}
+ </Button>
+ {/if}
+ {/if}
+ </div>
+ </Card.Content>
+ </Card.Root>
</div>
</div>
-<div class="fixed right-0 bottom-0 left-0 p-4">
- <div class="text-muted-foreground text-center text-xs text-balance">
- <div class="flex items-center justify-center gap-4">
- <a
- href="https://github.com/ofkm/arcane"
- target="_blank"
- rel="noopener noreferrer"
- class="bg-card/70 text-muted-foreground supports-[backdrop-filter]:bg-card/50 hover:text-primary relative inline-flex items-center rounded-full px-3 py-0.5 text-xs backdrop-blur transition-colors"
- >
- {m.common_view_on_github()}
- </a>
- </div>
+<div class="fixed right-0 bottom-4 left-0 p-4">
+ <div class="text-muted-foreground flex items-center justify-center">
+ <a
+ href="https://github.com/ofkm/arcane"
+ target="_blank"
+ rel="noopener noreferrer"
+ class="glass-light bubble-pill hover:text-primary text-xs transition-colors"
+ >
+ {m.common_view_on_github()}
+ </a>
</div>
</div>
+
+<style>
+ .orb {
+ transform: translate(calc(-20px + var(--start-x) * 4px), calc(-20px + var(--start-y) * 4px)) scale(1);
+ animation: orb-float var(--orb-duration, 18s) ease-in-out infinite;
+ animation-delay: var(--orb-delay, 0s);
+ }
+
+ @keyframes orb-float {
+ 0%,
+ 100% {
+ transform: translate(calc(-20px + var(--start-x) * 4px), calc(-20px + var(--start-y) * 4px)) scale(1);
+ }
+ 25% {
+ transform: translate(calc(60px + var(--start-x) * 4px), calc(-80px + var(--start-y) * 4px)) scale(1.15);
+ }
+ 50% {
+ transform: translate(calc(20px + var(--start-x) * 4px), calc(20px + var(--start-y) * 4px)) scale(0.95);
+ }
+ 75% {
+ transform: translate(calc(-80px + var(--start-x) * 4px), calc(60px + var(--start-y) * 4px)) scale(1.1);
+ }
+ }
+
+ @media (prefers-reduced-motion: reduce) {
+ .orb {
+ animation: none;
+ }
+ }
+</style>