|
|
|
|
@@ -29,6 +29,7 @@ import { SvelteURLSearchParams } from "svelte/reactivity";
|
|
|
|
|
let error = $state('');
|
|
|
|
|
let loading = $state(false);
|
|
|
|
|
let adfsConfigured = $state(false);
|
|
|
|
|
let showPassword = $state(false);
|
|
|
|
|
let returnUrl: string | null = $state(null);
|
|
|
|
|
|
|
|
|
|
// Read returnUrl from query params on mount
|
|
|
|
|
@@ -111,69 +112,184 @@ import { SvelteURLSearchParams } from "svelte/reactivity";
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="max-w-md mx-auto mt-10 p-6 bg-surface-card rounded-lg shadow-md">
|
|
|
|
|
<h2 class="text-2xl font-bold mb-6 text-center">{$t.auth?.login }</h2>
|
|
|
|
|
<div class="login-scene">
|
|
|
|
|
<div class="scene-grid" aria-hidden="true"></div>
|
|
|
|
|
<div class="scene-glow scene-glow-cyan" aria-hidden="true"></div>
|
|
|
|
|
<div class="scene-glow scene-glow-violet" aria-hidden="true"></div>
|
|
|
|
|
|
|
|
|
|
{#if error}
|
|
|
|
|
<div class="mb-4 p-3 bg-destructive-light text-destructive rounded border border-destructive-light">
|
|
|
|
|
{error}
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
|
|
|
|
<div class="scene-content">
|
|
|
|
|
<section class="intro" aria-label="SS Tools">
|
|
|
|
|
<div class="brand-mark" aria-hidden="true">
|
|
|
|
|
<span class="mark-core"></span>
|
|
|
|
|
<span class="mark-orbit mark-orbit-one"></span>
|
|
|
|
|
<span class="mark-orbit mark-orbit-two"></span>
|
|
|
|
|
</div>
|
|
|
|
|
<p class="eyebrow">SS / TOOLS <span>{$t.auth?.login_page?.version}</span></p>
|
|
|
|
|
<h1>{$t.auth?.login_page?.headline_first}<br /><em>{$t.auth?.login_page?.headline_second}</em> {$t.auth?.login_page?.headline_third}</h1>
|
|
|
|
|
<p class="intro-copy">{$t.auth?.login_page?.intro}</p>
|
|
|
|
|
|
|
|
|
|
<form onsubmit={(event) => { event.preventDefault(); handleLogin(); }} class="space-y-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label for="username" class="block text-sm font-medium text-text">{$t.admin?.users?.username }</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
id="username"
|
|
|
|
|
bind:value={username}
|
|
|
|
|
class="mt-1 block w-full px-3 py-2 border border-border-strong rounded-md shadow-sm focus:outline-none focus-visible:ring-primary-ring focus:border-primary-ring"
|
|
|
|
|
required
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="signal-list" aria-hidden="true">
|
|
|
|
|
<div><span class="signal-dot signal-dot-cyan"></span><span>{$t.auth?.login_page?.workspace}</span><strong>{$t.auth?.login_page?.ready}</strong></div>
|
|
|
|
|
<div><span class="signal-dot signal-dot-amber"></span><span>{$t.auth?.login_page?.pipelines}</span><strong>{$t.auth?.login_page?.synced}</strong></div>
|
|
|
|
|
<div><span class="signal-dot signal-dot-violet"></span><span>{$t.auth?.login_page?.context}</span><strong>{$t.auth?.login_page?.online}</strong></div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label for="password" class="block text-sm font-medium text-text">{$t.admin?.users?.password }</label>
|
|
|
|
|
<input
|
|
|
|
|
type="password"
|
|
|
|
|
id="password"
|
|
|
|
|
bind:value={password}
|
|
|
|
|
class="mt-1 block w-full px-3 py-2 border border-border-strong rounded-md shadow-sm focus:outline-none focus-visible:ring-primary-ring focus:border-primary-ring"
|
|
|
|
|
required
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
type="submit"
|
|
|
|
|
disabled={loading}
|
|
|
|
|
class="w-full"
|
|
|
|
|
>
|
|
|
|
|
{loading ? ($t.auth?.logging_in ) : ($t.auth?.login )}
|
|
|
|
|
</Button>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
{#if adfsConfigured}
|
|
|
|
|
<div class="mt-6">
|
|
|
|
|
<div class="relative">
|
|
|
|
|
<div class="absolute inset-0 flex items-center">
|
|
|
|
|
<div class="w-full border-t border-border-strong"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="relative flex justify-center text-sm">
|
|
|
|
|
<span class="px-2 bg-surface-card text-text-muted">{$t.auth?.or_continue_with }</span>
|
|
|
|
|
</div>
|
|
|
|
|
<section class="login-panel" aria-labelledby="login-heading">
|
|
|
|
|
<div class="panel-topline"><span>{$t.auth?.login_page?.identity_check}</span><span class="topline-status"><i></i> {$t.auth?.login_page?.secure}</span></div>
|
|
|
|
|
<div class="panel-heading">
|
|
|
|
|
<p class="panel-kicker">{$t.auth?.login_page?.welcome_back}</p>
|
|
|
|
|
<h2 id="login-heading">{$t.auth?.login}</h2>
|
|
|
|
|
<p>{$t.auth?.login_page?.subtitle}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mt-6">
|
|
|
|
|
<Button
|
|
|
|
|
variant="secondary"
|
|
|
|
|
onclick={handleADFSLogin}
|
|
|
|
|
class="w-full"
|
|
|
|
|
>
|
|
|
|
|
{$t.auth?.corporate_sso }
|
|
|
|
|
{#if error}
|
|
|
|
|
<div class="error-message" role="alert">
|
|
|
|
|
<span class="error-icon">!</span>
|
|
|
|
|
<span>{error}</span>
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
<form onsubmit={(event) => { event.preventDefault(); handleLogin(); }} class="login-form">
|
|
|
|
|
<div class="field-group">
|
|
|
|
|
<label for="username">{$t.admin?.users?.username}</label>
|
|
|
|
|
<div class="input-shell">
|
|
|
|
|
<span class="field-icon" aria-hidden="true">@</span>
|
|
|
|
|
<input type="text" id="username" bind:value={username} autocomplete="username" placeholder={$t.auth?.login_page?.username_placeholder} required />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="field-group">
|
|
|
|
|
<label for="password">{$t.admin?.users?.password}</label>
|
|
|
|
|
<div class="input-shell">
|
|
|
|
|
<span class="field-icon lock-icon" aria-hidden="true">*</span>
|
|
|
|
|
<input type={showPassword ? 'text' : 'password'} id="password" bind:value={password} autocomplete="current-password" placeholder={$t.auth?.login_page?.password_placeholder} required />
|
|
|
|
|
<button type="button" class="reveal-button" onclick={() => showPassword = !showPassword} aria-label={showPassword ? $t.auth?.login_page?.hide_password : $t.auth?.login_page?.show_password}>{showPassword ? $t.auth?.login_page?.hide_password_short : $t.auth?.login_page?.show_password_short}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Button type="submit" disabled={loading} class="login-button">
|
|
|
|
|
<span>{loading ? ($t.auth?.logging_in) : ($t.auth?.login)}</span>
|
|
|
|
|
{#if !loading}<span class="button-arrow" aria-hidden="true">-></span>{/if}
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
{#if adfsConfigured}
|
|
|
|
|
<div class="sso-block">
|
|
|
|
|
<div class="divider"><span>{$t.auth?.or_continue_with}</span></div>
|
|
|
|
|
<Button variant="secondary" onclick={handleADFSLogin} class="sso-button">
|
|
|
|
|
<span class="sso-icon" aria-hidden="true">o</span>
|
|
|
|
|
{$t.auth?.corporate_sso}
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
<p class="panel-footer"><span class="footer-lock">*</span> {$t.auth?.login_page?.session_encrypted}</p>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="scene-footer"><span>{$t.auth?.login_page?.operations_console}</span><span>{$t.auth?.login_page?.built_for_clarity}</span></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.login-scene {
|
|
|
|
|
position: relative;
|
|
|
|
|
min-height: calc(100vh - 2rem);
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
background: #080e1d;
|
|
|
|
|
color: #e9f2ff;
|
|
|
|
|
isolation: isolate;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scene-grid {
|
|
|
|
|
position: absolute;
|
|
|
|
|
inset: 0;
|
|
|
|
|
opacity: .26;
|
|
|
|
|
background-image: linear-gradient(rgba(111, 166, 203, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(111, 166, 203, .1) 1px, transparent 1px);
|
|
|
|
|
background-size: 56px 56px;
|
|
|
|
|
mask-image: linear-gradient(to bottom, black, transparent 85%);
|
|
|
|
|
z-index: -2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scene-glow { position: absolute; border-radius: 999px; filter: blur(80px); opacity: .28; z-index: -1; pointer-events: none; }
|
|
|
|
|
.scene-glow-cyan { width: 38vw; height: 38vw; left: -16vw; top: 14%; background: #0e7490; }
|
|
|
|
|
.scene-glow-violet { width: 30vw; height: 30vw; right: -12vw; bottom: -10%; background: #5b21b6; opacity: .2; }
|
|
|
|
|
.scene-content { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(360px, 440px); gap: clamp(3rem, 10vw, 10rem); align-items: center; max-width: 1160px; min-height: calc(100vh - 7rem); margin: 0 auto; padding: 5rem clamp(1.5rem, 6vw, 5rem); }
|
|
|
|
|
|
|
|
|
|
.intro { max-width: 440px; }
|
|
|
|
|
.brand-mark { position: relative; width: 54px; height: 54px; margin-bottom: 28px; }
|
|
|
|
|
.mark-core { position: absolute; inset: 17px; border-radius: 50%; background: #56e0e0; box-shadow: 0 0 22px #56e0e0; }
|
|
|
|
|
.mark-orbit { position: absolute; inset: 3px; border: 1px solid rgba(86, 224, 224, .45); border-radius: 50%; transform: rotate(45deg) scaleY(.55); }
|
|
|
|
|
.mark-orbit-two { inset: 9px -4px; transform: rotate(-45deg) scaleY(.55); border-color: rgba(177, 132, 255, .55); }
|
|
|
|
|
.eyebrow, .panel-kicker, .panel-topline, .signal-list, .scene-footer { font-family: 'JetBrains Mono', 'Fira Code', monospace; letter-spacing: .12em; }
|
|
|
|
|
.eyebrow { margin: 0 0 22px; color: #77a4bf; font-size: 11px; }
|
|
|
|
|
.eyebrow span { margin-left: 14px; color: #d0a6ff; }
|
|
|
|
|
h1 { margin: 0; font-size: 6.5rem; line-height: .9; letter-spacing: 0; font-weight: 500; }
|
|
|
|
|
h1 em { color: #62e2df; font-style: normal; }
|
|
|
|
|
.intro-copy { max-width: 360px; margin: 30px 0 0; color: #9ab1c4; font-size: 15px; line-height: 1.7; }
|
|
|
|
|
.signal-list { display: grid; gap: 12px; max-width: 300px; margin-top: 56px; color: #68859b; font-size: 9px; }
|
|
|
|
|
.signal-list div { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; }
|
|
|
|
|
.signal-list strong { color: #a7c5d4; font-size: 9px; font-weight: 500; }
|
|
|
|
|
.signal-dot { width: 5px; height: 5px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
|
|
|
|
|
.signal-dot-cyan { color: #56e0e0; background: currentColor; }
|
|
|
|
|
.signal-dot-amber { color: #f4bd69; background: currentColor; }
|
|
|
|
|
.signal-dot-violet { color: #ba8cff; background: currentColor; }
|
|
|
|
|
|
|
|
|
|
.login-panel { width: 100%; padding: 30px; border: 1px solid rgba(151, 197, 220, .2); border-radius: 8px; background: rgba(13, 24, 43, .82); box-shadow: 0 24px 90px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05); backdrop-filter: blur(20px); }
|
|
|
|
|
.panel-topline { display: flex; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid rgba(151, 197, 220, .14); color: #64859c; font-size: 9px; }
|
|
|
|
|
.topline-status { color: #70d9bf; }
|
|
|
|
|
.topline-status i { display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: #70d9bf; box-shadow: 0 0 9px #70d9bf; }
|
|
|
|
|
.panel-heading { padding: 30px 0 26px; }
|
|
|
|
|
.panel-kicker { margin: 0 0 9px; color: #62e2df; font-size: 10px; }
|
|
|
|
|
.panel-heading h2 { margin: 0; color: #f3f8ff; font-size: 34px; font-weight: 500; letter-spacing: 0; }
|
|
|
|
|
.panel-heading p:last-child { margin: 8px 0 0; color: #7894a8; font-size: 13px; }
|
|
|
|
|
.login-form { display: grid; gap: 19px; }
|
|
|
|
|
.field-group label { display: block; margin-bottom: 8px; color: #a9c0cf; font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
|
|
|
|
|
.input-shell { display: flex; align-items: center; height: 48px; border: 1px solid #264158; border-radius: 7px; background: rgba(6, 14, 28, .72); transition: border-color .2s, box-shadow .2s; }
|
|
|
|
|
.input-shell:focus-within { border-color: #56d8d5; box-shadow: 0 0 0 3px rgba(86, 216, 213, .1); }
|
|
|
|
|
.input-shell input { min-width: 0; flex: 1; height: 100%; padding: 0 12px; border: 0; outline: 0; background: transparent; color: #ecf7ff; font-size: 14px; }
|
|
|
|
|
.input-shell input::placeholder { color: #496176; }
|
|
|
|
|
.field-icon { width: 42px; color: #56d8d5; text-align: center; font-family: monospace; font-size: 17px; }
|
|
|
|
|
.lock-icon { color: #bd94fa; font-size: 19px; }
|
|
|
|
|
.reveal-button { flex: 0 0 auto; margin-right: 12px; padding: 5px; border: 0; background: transparent; color: #68879d; cursor: pointer; font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .08em; }
|
|
|
|
|
.reveal-button:hover { color: #62e2df; }
|
|
|
|
|
:global(.login-button) { width: 100%; height: 50px; margin-top: 7px; border-radius: 7px; background: #56d8d5; color: #07141e; font-weight: 700; box-shadow: 0 8px 24px rgba(86, 216, 213, .18); }
|
|
|
|
|
:global(.login-button:hover) { background: #7be9e3; }
|
|
|
|
|
.button-arrow { margin-left: auto; font-size: 19px; line-height: 0; }
|
|
|
|
|
.error-message { display: flex; gap: 9px; align-items: center; margin-bottom: 18px; padding: 11px 12px; border: 1px solid rgba(248, 113, 113, .35); border-radius: 7px; background: rgba(127, 29, 29, .22); color: #fca5a5; font-size: 12px; line-height: 1.4; }
|
|
|
|
|
.error-icon { display: grid; width: 17px; height: 17px; flex: 0 0 auto; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: monospace; font-size: 11px; }
|
|
|
|
|
.sso-block { margin-top: 25px; }
|
|
|
|
|
.divider { display: flex; align-items: center; gap: 12px; color: #5d7890; font-family: 'JetBrains Mono', monospace; font-size: 9px; white-space: nowrap; }
|
|
|
|
|
.divider::before, .divider::after { content: ''; height: 1px; flex: 1; background: rgba(151, 197, 220, .14); }
|
|
|
|
|
:global(.sso-button) { width: 100%; height: 46px; margin-top: 18px; border: 1px solid #2c465d; background: rgba(255, 255, 255, .03); color: #b9cad7; }
|
|
|
|
|
:global(.sso-button:hover) { background: rgba(255, 255, 255, .08); }
|
|
|
|
|
.sso-icon { margin-right: 8px; color: #bd94fa; font-size: 18px; }
|
|
|
|
|
.panel-footer { margin: 25px 0 0; color: #526d82; font-size: 10px; text-align: center; }
|
|
|
|
|
.footer-lock { margin-right: 5px; color: #70d9bf; }
|
|
|
|
|
.scene-footer { display: flex; justify-content: space-between; padding: 0 clamp(1.5rem, 6vw, 5rem) 22px; color: #456076; font-size: 9px; }
|
|
|
|
|
|
|
|
|
|
@media (max-width: 1050px) {
|
|
|
|
|
h1 { font-size: 5rem; }
|
|
|
|
|
.scene-content { gap: 3rem; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 760px) {
|
|
|
|
|
.login-scene { min-height: calc(100vh - 2rem); border-radius: 8px; }
|
|
|
|
|
.scene-content { display: block; min-height: auto; padding: 3rem 1.25rem 2rem; }
|
|
|
|
|
.intro { margin-bottom: 3rem; }
|
|
|
|
|
.brand-mark { margin-bottom: 20px; }
|
|
|
|
|
h1 { font-size: 3.5rem; }
|
|
|
|
|
.intro-copy { margin-top: 22px; }
|
|
|
|
|
.signal-list { display: none; }
|
|
|
|
|
.login-panel { padding: 22px 18px; }
|
|
|
|
|
.scene-footer { padding: 0 1.25rem 16px; font-size: 8px; }
|
|
|
|
|
.scene-footer span:last-child { display: none; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
|
|
|
.input-shell { transition: none; }
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<!-- #endregion Login.Page.LoginPage -->
|
|
|
|
|
|