feat: add operator landing and login
This commit is contained in:
+3
-1
@@ -1,9 +1,11 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="nl">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" type="image/svg+xml" href="/geointel-icon.svg" />
|
||||
<meta name="theme-color" content="#087266" />
|
||||
<meta name="description" content="GeoIntel Atlas is de operationele GeoAI-workbench voor België en de Belgische Noordzee." />
|
||||
<title>GeoIntel</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 287 KiB |
+49
-1
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { LogOut, UserRound } from 'lucide-react'
|
||||
import '@fontsource/manrope/latin-500.css'
|
||||
import '@fontsource/manrope/latin-600.css'
|
||||
import '@fontsource/manrope/latin-700.css'
|
||||
@@ -8,6 +9,7 @@ import '@fontsource/public-sans/latin-600.css'
|
||||
import './styles/app.css'
|
||||
import './styles/premium.css'
|
||||
import './styles/atlas-workbench.css'
|
||||
import { LandingPage } from './components/auth/LandingPage'
|
||||
import { ChangeDetectionPanel } from './components/analysis/ChangeDetectionPanel'
|
||||
import { GeoAssistantPanel } from './components/assistant/GeoAssistantPanel'
|
||||
import { DatasetPanel } from './components/datasets/DatasetPanel'
|
||||
@@ -38,6 +40,7 @@ import { useExportWorkflow } from './hooks/useExportWorkflow'
|
||||
import { useMapSelectionDataset } from './hooks/useMapSelectionDataset'
|
||||
import { useMapSelectionQa } from './hooks/useMapSelectionQa'
|
||||
import { useMapWorkspaceState } from './hooks/useMapWorkspaceState'
|
||||
import { useOperatorSession } from './hooks/useOperatorSession'
|
||||
import { useMapSelectionExtract } from './hooks/useMapSelectionExtract'
|
||||
import { useMapOrthophotoAnalysis } from './hooks/useMapOrthophotoAnalysis'
|
||||
import { isDetectionImageryDataset, isMapRasterDataset } from './lib/datasetCapabilities'
|
||||
@@ -81,7 +84,13 @@ const workspaceNavGroups: WorkspaceNavigationGroup[] = [
|
||||
{ label: 'Beheer', keys: ['overview', 'system'] },
|
||||
]
|
||||
|
||||
function App(): JSX.Element {
|
||||
interface WorkbenchAppProps {
|
||||
username: string | null
|
||||
loggingOut: boolean
|
||||
onLogout: () => void
|
||||
}
|
||||
|
||||
function WorkbenchApp({ username, loggingOut, onLogout }: WorkbenchAppProps): JSX.Element {
|
||||
const [activeWorkspace, setActiveWorkspace] = useState<WorkspaceKey>('map')
|
||||
const [inspectorOpen, setInspectorOpen] = useState(false)
|
||||
const [mapContentMode, setMapContentMode] = useState<'dataset' | 'analysis'>('dataset')
|
||||
@@ -818,6 +827,16 @@ function App(): JSX.Element {
|
||||
<span aria-hidden="true" />
|
||||
<strong>{workspaceDataLoading ? 'Laden' : errorMessage ? 'Aandacht' : 'Gereed'}</strong>
|
||||
</div>
|
||||
{username ? (
|
||||
<div className="context-account" aria-label="Aangemelde gebruiker">
|
||||
<UserRound aria-hidden="true" />
|
||||
<span title={username}>{username}</span>
|
||||
<button type="button" onClick={onLogout} disabled={loggingOut}>
|
||||
<LogOut aria-hidden="true" />
|
||||
<span>{loggingOut ? 'Uitloggen…' : 'Uitloggen'}</span>
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
</header>
|
||||
|
||||
<div className="workbench-content">
|
||||
@@ -1300,4 +1319,33 @@ function App(): JSX.Element {
|
||||
)
|
||||
}
|
||||
|
||||
function App(): JSX.Element {
|
||||
const { session, sessionError, loggingOut, handleAuthenticated, handleLogout } = useOperatorSession()
|
||||
|
||||
if (session === null) {
|
||||
return (
|
||||
<div className="landing-auth-loading" role="status" aria-live="polite">
|
||||
<div><span aria-hidden="true" /><strong>GeoIntel wordt voorbereid…</strong></div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (!session.authenticated) {
|
||||
return (
|
||||
<LandingPage
|
||||
serviceError={sessionError}
|
||||
onAuthenticated={handleAuthenticated}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<WorkbenchApp
|
||||
username={session.authentication_required ? session.username : null}
|
||||
loggingOut={loggingOut}
|
||||
onLogout={handleLogout}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default App
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { LandingPage } from './LandingPage'
|
||||
import { login } from '../../services/api/auth'
|
||||
|
||||
|
||||
vi.mock('../../services/api/auth', () => ({
|
||||
login: vi.fn(),
|
||||
}))
|
||||
|
||||
|
||||
describe('LandingPage', () => {
|
||||
beforeEach(() => {
|
||||
vi.mocked(login).mockReset()
|
||||
})
|
||||
|
||||
afterEach(() => cleanup())
|
||||
|
||||
it('shows the Stitch-derived landing content and submits the real login flow', async () => {
|
||||
const onAuthenticated = vi.fn()
|
||||
vi.mocked(login).mockResolvedValue({
|
||||
authentication_required: true,
|
||||
authenticated: true,
|
||||
username: 'operator',
|
||||
expires_at: '2026-07-22T20:00:00Z',
|
||||
})
|
||||
render(<LandingPage onAuthenticated={onAuthenticated} />)
|
||||
|
||||
expect(screen.getByRole('heading', { name: /Operationele GIS-analyse/i })).toBeTruthy()
|
||||
fireEvent.change(screen.getByLabelText('Gebruikersnaam'), { target: { value: 'operator' } })
|
||||
fireEvent.change(screen.getByLabelText('Wachtwoord'), { target: { value: 'correct' } })
|
||||
fireEvent.click(screen.getAllByRole('button', { name: 'Inloggen' })[1])
|
||||
|
||||
await waitFor(() => expect(login).toHaveBeenCalledWith('operator', 'correct'))
|
||||
expect(onAuthenticated).toHaveBeenCalledWith(expect.objectContaining({ authenticated: true }))
|
||||
})
|
||||
|
||||
it('surfaces an authentication error without entering the workbench', async () => {
|
||||
vi.mocked(login).mockRejectedValue(new Error('Gebruikersnaam of wachtwoord is onjuist.'))
|
||||
render(<LandingPage onAuthenticated={vi.fn()} />)
|
||||
|
||||
fireEvent.change(screen.getByLabelText('Gebruikersnaam'), { target: { value: 'operator' } })
|
||||
fireEvent.change(screen.getByLabelText('Wachtwoord'), { target: { value: 'wrong' } })
|
||||
fireEvent.click(screen.getAllByRole('button', { name: 'Inloggen' })[1])
|
||||
|
||||
expect((await screen.findByRole('alert')).textContent).toContain('Gebruikersnaam of wachtwoord is onjuist.')
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,229 @@
|
||||
import { useEffect, useRef, useState, type FormEvent } from 'react'
|
||||
import {
|
||||
ArrowRight,
|
||||
BrainCircuit,
|
||||
CheckCircle2,
|
||||
Database,
|
||||
Layers3,
|
||||
LockKeyhole,
|
||||
LogIn,
|
||||
MapPinned,
|
||||
Menu,
|
||||
ShieldCheck,
|
||||
X,
|
||||
} from 'lucide-react'
|
||||
import { login } from '../../services/api/auth'
|
||||
import type { AuthSession } from '../../services/api/auth'
|
||||
import { formatError } from '../../lib/formatError'
|
||||
import '../../styles/landing.css'
|
||||
|
||||
interface LandingPageProps {
|
||||
onAuthenticated: (session: AuthSession) => void
|
||||
serviceError?: string | null
|
||||
}
|
||||
|
||||
const capabilityItems = [
|
||||
{
|
||||
icon: MapPinned,
|
||||
title: 'Heel België in beeld',
|
||||
description:
|
||||
'Werk met officiële bronnen voor Vlaanderen, Wallonië, Brussel en de Belgische Noordzee, zonder regionale semantiek te vermengen.',
|
||||
tags: ['NGI', 'SPW', 'Digitaal Vlaanderen'],
|
||||
tone: 'primary',
|
||||
},
|
||||
{
|
||||
icon: BrainCircuit,
|
||||
title: 'AI met bewijsgrenzen',
|
||||
description:
|
||||
'Voer objectdetectie uit op geschikte luchtbeelden en beoordeel resultaten tegen referentiedata met zichtbare model- en validatiegrenzen.',
|
||||
tags: ['Objectdetectie', 'Lokale assistent'],
|
||||
tone: 'secondary',
|
||||
},
|
||||
{
|
||||
icon: ShieldCheck,
|
||||
title: 'Operationele kwaliteit',
|
||||
description:
|
||||
'Elke analyse bewaart bron, meetmoment, CRS, eenheid en beperkingen. Resultaten blijven inspecteerbaar vóór export of besluitvorming.',
|
||||
tags: ['QA/QC', 'Herleidbaar'],
|
||||
tone: 'attention',
|
||||
},
|
||||
]
|
||||
|
||||
export function LandingPage({ onAuthenticated, serviceError = null }: LandingPageProps): JSX.Element {
|
||||
const [username, setUsername] = useState('')
|
||||
const [password, setPassword] = useState('')
|
||||
const [submitting, setSubmitting] = useState(false)
|
||||
const [loginError, setLoginError] = useState<string | null>(null)
|
||||
const [menuOpen, setMenuOpen] = useState(false)
|
||||
const usernameRef = useRef<HTMLInputElement | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
document.body.classList.add('landing-body')
|
||||
return () => document.body.classList.remove('landing-body')
|
||||
}, [])
|
||||
|
||||
const submitLogin = async (event: FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault()
|
||||
setSubmitting(true)
|
||||
setLoginError(null)
|
||||
try {
|
||||
const session = await login(username.trim(), password)
|
||||
onAuthenticated(session)
|
||||
} catch (error) {
|
||||
setLoginError(formatError(error, 'Aanmelden is niet gelukt. Probeer het opnieuw.'))
|
||||
} finally {
|
||||
setSubmitting(false)
|
||||
}
|
||||
}
|
||||
|
||||
const focusLogin = () => {
|
||||
setMenuOpen(false)
|
||||
window.requestAnimationFrame(() => usernameRef.current?.focus())
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="landing-page">
|
||||
<a className="landing-skip-link" href="#login-panel">Ga naar aanmelden</a>
|
||||
<header className="landing-header">
|
||||
<a className="landing-brand" href="#top" aria-label="GeoIntel Atlas startpagina">
|
||||
<span className="landing-brand-mark" aria-hidden="true">GI</span>
|
||||
<span>GeoIntel Atlas</span>
|
||||
</a>
|
||||
<button
|
||||
className="landing-menu-toggle"
|
||||
type="button"
|
||||
aria-label={menuOpen ? 'Navigatie sluiten' : 'Navigatie openen'}
|
||||
aria-expanded={menuOpen}
|
||||
onClick={() => setMenuOpen((current) => !current)}
|
||||
>
|
||||
{menuOpen ? <X aria-hidden="true" /> : <Menu aria-hidden="true" />}
|
||||
</button>
|
||||
<nav className={menuOpen ? 'landing-nav landing-nav-open' : 'landing-nav'} aria-label="Landingspagina">
|
||||
<a href="#mogelijkheden" onClick={() => setMenuOpen(false)}>Verkennen</a>
|
||||
<a href="#werkproces" onClick={() => setMenuOpen(false)}>Analyseren</a>
|
||||
<a href="#kwaliteit" onClick={() => setMenuOpen(false)}>Kwaliteit</a>
|
||||
</nav>
|
||||
<button className="landing-header-login" type="button" onClick={focusLogin}>
|
||||
Inloggen
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<main id="top">
|
||||
<section className="landing-hero" aria-labelledby="landing-title">
|
||||
<div className="landing-hero-background" aria-hidden="true" />
|
||||
<div className="landing-hero-content">
|
||||
<div className="landing-hero-copy">
|
||||
<p className="landing-kicker"><CheckCircle2 aria-hidden="true" /> Operationele GeoAI-workbench</p>
|
||||
<h1 id="landing-title">Operationele GIS-analyse <span>op topniveau.</span></h1>
|
||||
<p className="landing-lead">
|
||||
De kaartgerichte workbench voor professionals die werken met gegevens van België en de Belgische Noordzee. Selecteer een gebied, meet officiële bronnen en controleer ieder resultaat.
|
||||
</p>
|
||||
<div className="landing-hero-actions">
|
||||
<a className="landing-primary-action" href="#mogelijkheden">
|
||||
<MapPinned aria-hidden="true" /> Bekijk mogelijkheden
|
||||
</a>
|
||||
<button className="landing-secondary-action" type="button" onClick={focusLogin}>
|
||||
Naar inloggen <ArrowRight aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
<dl className="landing-trust-strip" aria-label="Platformbereik">
|
||||
<div><dt>Geografie</dt><dd>België + Noordzee</dd></div>
|
||||
<div><dt>Bronnen</dt><dd>Officieel per regio</dd></div>
|
||||
<div><dt>Uitvoer</dt><dd>GIS-herleidbaar</dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div className="landing-login-card" id="login-panel">
|
||||
<div className="landing-login-heading">
|
||||
<span className="landing-login-icon" aria-hidden="true"><LockKeyhole /></span>
|
||||
<div>
|
||||
<h2>Toegang Workbench</h2>
|
||||
<p>Log in met uw GeoIntel-account.</p>
|
||||
</div>
|
||||
</div>
|
||||
<form onSubmit={submitLogin} aria-busy={submitting}>
|
||||
<label htmlFor="login-username">Gebruikersnaam</label>
|
||||
<input
|
||||
ref={usernameRef}
|
||||
id="login-username"
|
||||
name="username"
|
||||
type="text"
|
||||
autoComplete="username"
|
||||
value={username}
|
||||
onChange={(event) => setUsername(event.target.value)}
|
||||
disabled={submitting}
|
||||
required
|
||||
/>
|
||||
<label htmlFor="login-password">Wachtwoord</label>
|
||||
<input
|
||||
id="login-password"
|
||||
name="password"
|
||||
type="password"
|
||||
autoComplete="current-password"
|
||||
value={password}
|
||||
onChange={(event) => setPassword(event.target.value)}
|
||||
disabled={submitting}
|
||||
required
|
||||
/>
|
||||
{loginError || serviceError ? (
|
||||
<p className="landing-login-error" role="alert">{loginError ?? serviceError}</p>
|
||||
) : null}
|
||||
<button type="submit" disabled={submitting || !username.trim() || !password}>
|
||||
<LogIn aria-hidden="true" /> {submitting ? 'Aanmelden…' : 'Inloggen'}
|
||||
</button>
|
||||
</form>
|
||||
<p className="landing-session-note"><ShieldCheck aria-hidden="true" /> Beveiligde, tijdelijke operatorsessie</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="landing-capabilities" id="mogelijkheden" aria-labelledby="capabilities-title">
|
||||
<div className="landing-section-heading">
|
||||
<p>Van bron tot besluit</p>
|
||||
<h2 id="capabilities-title">Eén werkbank, controle over de hele keten</h2>
|
||||
</div>
|
||||
<div className="landing-capability-grid">
|
||||
{capabilityItems.map(({ icon: Icon, title, description, tags, tone }) => (
|
||||
<article key={title} className={`landing-capability landing-capability-${tone}`}>
|
||||
<span className="landing-capability-icon" aria-hidden="true"><Icon /></span>
|
||||
<h3>{title}</h3>
|
||||
<p>{description}</p>
|
||||
<div>{tags.map((tag) => <span key={tag}>{tag}</span>)}</div>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="landing-workflow" id="werkproces" aria-labelledby="workflow-title">
|
||||
<div className="landing-workflow-map">
|
||||
<div className="landing-workflow-map-image" aria-hidden="true" />
|
||||
<div>
|
||||
<p>Kaart als werkomgeving</p>
|
||||
<h2 id="workflow-title">Van selectie naar aantoonbaar inzicht</h2>
|
||||
<span>Kies thema → teken gebied → controleer bron → analyseer → exporteer</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="landing-workflow-details">
|
||||
<article>
|
||||
<Database aria-hidden="true" />
|
||||
<div><h3>Bronnen per rechtsgebied</h3><p>Vlaamse, Waalse, Brusselse en maritieme bronnen blijven herkenbaar gescheiden.</p></div>
|
||||
</article>
|
||||
<article>
|
||||
<Layers3 aria-hidden="true" />
|
||||
<div><h3>Toestand en evolutie</h3><p>Vergelijk alleen meetmomenten die inhoudelijk en ruimtelijk verenigbaar zijn.</p></div>
|
||||
</article>
|
||||
<article id="kwaliteit">
|
||||
<ShieldCheck aria-hidden="true" />
|
||||
<div><h3>Kwaliteit vóór export</h3><p>CRS, eenheid, dekking, herkomst en beperkingen blijven naast het resultaat zichtbaar.</p></div>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer className="landing-footer">
|
||||
<div><strong>GeoIntel Atlas Workbench</strong><p>Operationele GIS-analyse voor België en de Belgische Noordzee.</p></div>
|
||||
<p>© {new Date().getFullYear()} GeoIntel · Interne operatoromgeving</p>
|
||||
</footer>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { formatError } from '../lib/formatError'
|
||||
import { getAuthSession, logout, type AuthSession } from '../services/api/auth'
|
||||
|
||||
const signedOutSession: AuthSession = {
|
||||
authentication_required: true,
|
||||
authenticated: false,
|
||||
username: null,
|
||||
expires_at: null,
|
||||
}
|
||||
|
||||
export function useOperatorSession() {
|
||||
const [session, setSession] = useState<AuthSession | null>(null)
|
||||
const [sessionError, setSessionError] = useState<string | null>(null)
|
||||
const [loggingOut, setLoggingOut] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
let active = true
|
||||
getAuthSession()
|
||||
.then((value) => {
|
||||
if (active) {
|
||||
setSession(value)
|
||||
setSessionError(null)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
if (active) {
|
||||
setSession(signedOutSession)
|
||||
setSessionError(formatError(error, 'De aanmeldservice is tijdelijk niet bereikbaar.'))
|
||||
}
|
||||
})
|
||||
return () => {
|
||||
active = false
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
const expireSession = () => {
|
||||
setSession(signedOutSession)
|
||||
setSessionError('Uw sessie is verlopen. Meld u opnieuw aan.')
|
||||
}
|
||||
window.addEventListener('geointel:session-expired', expireSession)
|
||||
return () => window.removeEventListener('geointel:session-expired', expireSession)
|
||||
}, [])
|
||||
|
||||
const handleLogout = async () => {
|
||||
setLoggingOut(true)
|
||||
try {
|
||||
setSession(await logout())
|
||||
setSessionError(null)
|
||||
} catch (error) {
|
||||
setSessionError(formatError(error, 'Uitloggen is niet gelukt.'))
|
||||
} finally {
|
||||
setLoggingOut(false)
|
||||
}
|
||||
}
|
||||
|
||||
const handleAuthenticated = (authenticatedSession: AuthSession) => {
|
||||
setSession(authenticatedSession)
|
||||
setSessionError(null)
|
||||
}
|
||||
|
||||
return { session, sessionError, loggingOut, handleAuthenticated, handleLogout }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { apiGet, apiPost } from './client'
|
||||
|
||||
export interface AuthSession {
|
||||
authentication_required: boolean
|
||||
authenticated: boolean
|
||||
username: string | null
|
||||
expires_at: string | null
|
||||
}
|
||||
|
||||
export function getAuthSession(): Promise<AuthSession> {
|
||||
return apiGet<AuthSession>('/api/v1/auth/session')
|
||||
}
|
||||
|
||||
export function login(username: string, password: string): Promise<AuthSession> {
|
||||
return apiPost<AuthSession>('/api/v1/auth/login', { username, password })
|
||||
}
|
||||
|
||||
export function logout(): Promise<AuthSession> {
|
||||
return apiPost<AuthSession>('/api/v1/auth/logout')
|
||||
}
|
||||
@@ -23,19 +23,23 @@ async function parseResponse<T>(response: Response): Promise<T> {
|
||||
const code = typeof payload?.error === "string" ? payload.error : legacyError?.code ?? "REQUEST_ERROR";
|
||||
const message = payload?.message ?? legacyError?.message ?? `Request failed (${response.status})`;
|
||||
const details = payload?.details ?? legacyError?.details;
|
||||
if (response.status === 401 && code === "AUTHENTICATION_REQUIRED") {
|
||||
window.dispatchEvent(new CustomEvent("geointel:session-expired"));
|
||||
}
|
||||
throw new ApiHttpError(message, code, details);
|
||||
}
|
||||
return payload.data as T;
|
||||
}
|
||||
|
||||
export async function apiGet<T>(path: string): Promise<T> {
|
||||
const response = await fetch(apiUrl(path));
|
||||
const response = await fetch(apiUrl(path), { credentials: "same-origin" });
|
||||
return parseResponse<T>(response);
|
||||
}
|
||||
|
||||
export async function apiPost<T>(path: string, body?: object): Promise<T> {
|
||||
const response = await fetch(apiUrl(path), {
|
||||
method: "POST",
|
||||
credentials: "same-origin",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: body ? JSON.stringify(body) : undefined,
|
||||
});
|
||||
@@ -45,6 +49,7 @@ export async function apiPost<T>(path: string, body?: object): Promise<T> {
|
||||
export async function apiPatch<T>(path: string, body?: object): Promise<T> {
|
||||
const response = await fetch(apiUrl(path), {
|
||||
method: "PATCH",
|
||||
credentials: "same-origin",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: body ? JSON.stringify(body) : undefined,
|
||||
});
|
||||
@@ -54,6 +59,7 @@ export async function apiPatch<T>(path: string, body?: object): Promise<T> {
|
||||
export async function apiDelete<T>(path: string): Promise<T> {
|
||||
const response = await fetch(apiUrl(path), {
|
||||
method: "DELETE",
|
||||
credentials: "same-origin",
|
||||
});
|
||||
return parseResponse<T>(response);
|
||||
}
|
||||
@@ -61,6 +67,7 @@ export async function apiDelete<T>(path: string): Promise<T> {
|
||||
export async function apiMultipart<T>(path: string, form: FormData): Promise<T> {
|
||||
const response = await fetch(apiUrl(path), {
|
||||
method: "POST",
|
||||
credentials: "same-origin",
|
||||
body: form,
|
||||
});
|
||||
return parseResponse<T>(response);
|
||||
|
||||
@@ -217,7 +217,7 @@ textarea {
|
||||
position: relative;
|
||||
z-index: 30;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||
min-width: 0;
|
||||
min-height: var(--atlas-topbar-height);
|
||||
align-items: stretch;
|
||||
@@ -225,6 +225,34 @@ textarea {
|
||||
background: #eefdf9;
|
||||
}
|
||||
|
||||
.context-account {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
gap: 0.45rem;
|
||||
align-items: center;
|
||||
border-left: 1px solid var(--atlas-line);
|
||||
padding: 0 0.65rem;
|
||||
color: var(--atlas-ink-soft);
|
||||
font-size: 0.62rem;
|
||||
}
|
||||
|
||||
.context-account > svg { width: 0.95rem; height: 0.95rem; color: var(--atlas-primary); }
|
||||
.context-account > span { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.context-account button {
|
||||
display: inline-flex;
|
||||
min-height: 1.85rem;
|
||||
gap: 0.35rem;
|
||||
align-items: center;
|
||||
border: 1px solid var(--atlas-line-strong);
|
||||
border-radius: var(--atlas-radius);
|
||||
padding: 0.3rem 0.48rem;
|
||||
background: var(--atlas-surface);
|
||||
color: var(--atlas-ink-soft);
|
||||
font-size: 0.59rem;
|
||||
}
|
||||
.context-account button svg { width: 0.8rem; height: 0.8rem; }
|
||||
.context-account button:disabled { opacity: 0.55; }
|
||||
|
||||
.mobile-brand {
|
||||
display: none;
|
||||
}
|
||||
@@ -1739,6 +1767,15 @@ textarea {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.context-account {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.context-account > span,
|
||||
.context-account button > span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.workbench-content {
|
||||
display: block;
|
||||
overflow: visible;
|
||||
|
||||
@@ -0,0 +1,372 @@
|
||||
:root {
|
||||
--landing-canvas: #f5f7f6;
|
||||
--landing-surface: #ffffff;
|
||||
--landing-ink: #102f2a;
|
||||
--landing-muted: #56706a;
|
||||
--landing-primary: #087266;
|
||||
--landing-primary-strong: #05574f;
|
||||
--landing-mint: #dff7f2;
|
||||
--landing-blue: #315d73;
|
||||
--landing-amber: #b46432;
|
||||
--landing-line: #b9d0ca;
|
||||
}
|
||||
|
||||
body.landing-body {
|
||||
overflow: auto;
|
||||
background: var(--landing-canvas);
|
||||
}
|
||||
|
||||
.landing-page {
|
||||
min-width: 20rem;
|
||||
min-height: 100dvh;
|
||||
overflow-x: hidden;
|
||||
background: var(--landing-canvas);
|
||||
color: var(--landing-ink);
|
||||
font-family: "Public Sans", "Segoe UI", sans-serif;
|
||||
}
|
||||
|
||||
.landing-page *,
|
||||
.landing-page *::before,
|
||||
.landing-page *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.landing-skip-link {
|
||||
position: fixed;
|
||||
z-index: 120;
|
||||
top: -4rem;
|
||||
left: 1rem;
|
||||
padding: 0.7rem 1rem;
|
||||
background: var(--landing-primary-strong);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.landing-skip-link:focus { top: 0.75rem; }
|
||||
|
||||
.landing-header {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
display: grid;
|
||||
min-height: 3.65rem;
|
||||
grid-template-columns: auto minmax(0, 1fr) auto;
|
||||
gap: 2rem;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid rgba(70, 105, 97, 0.26);
|
||||
padding: 0.55rem clamp(1rem, 4vw, 4.5rem);
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
backdrop-filter: blur(14px);
|
||||
}
|
||||
|
||||
.landing-brand {
|
||||
display: inline-flex;
|
||||
gap: 0.65rem;
|
||||
align-items: center;
|
||||
color: var(--landing-primary-strong);
|
||||
font-family: "Manrope", "Segoe UI", sans-serif;
|
||||
font-weight: 800;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.landing-brand-mark {
|
||||
display: grid;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
place-items: center;
|
||||
border: 1px solid #8ec7bc;
|
||||
border-radius: 4px;
|
||||
background: #e7faf6;
|
||||
font-size: 0.76rem;
|
||||
}
|
||||
|
||||
.landing-nav {
|
||||
display: flex;
|
||||
gap: 1.75rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.landing-nav a {
|
||||
border-bottom: 2px solid transparent;
|
||||
padding: 0.35rem 0;
|
||||
color: #34534d;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.landing-nav a:hover,
|
||||
.landing-nav a:focus-visible { border-bottom-color: var(--landing-primary); color: var(--landing-primary); }
|
||||
|
||||
.landing-header-login,
|
||||
.landing-primary-action,
|
||||
.landing-login-card form button {
|
||||
border: 1px solid var(--landing-primary);
|
||||
border-radius: 4px;
|
||||
background: var(--landing-primary);
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.landing-header-login { min-height: 2.35rem; padding: 0.45rem 1.1rem; }
|
||||
.landing-menu-toggle { display: none; }
|
||||
|
||||
.landing-hero {
|
||||
position: relative;
|
||||
display: grid;
|
||||
min-height: min(58rem, 100dvh);
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
padding: 6.8rem clamp(1.25rem, 6vw, 6rem) 4rem;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
.landing-hero-background,
|
||||
.landing-workflow-map-image {
|
||||
background-image: url('/landing-hero-belgium.webp');
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.landing-hero-background {
|
||||
position: absolute;
|
||||
z-index: -2;
|
||||
inset: 0;
|
||||
filter: saturate(0.58) contrast(0.82) brightness(1.13);
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.landing-hero::before {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
inset: 0;
|
||||
background:
|
||||
linear-gradient(90deg, rgba(245, 250, 248, 0.98) 0%, rgba(245, 250, 248, 0.88) 43%, rgba(239, 248, 245, 0.62) 68%, rgba(238, 247, 244, 0.76) 100%),
|
||||
linear-gradient(0deg, var(--landing-canvas) 0%, transparent 22%);
|
||||
content: '';
|
||||
}
|
||||
|
||||
.landing-hero-content {
|
||||
display: grid;
|
||||
width: min(90rem, 100%);
|
||||
grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 27rem);
|
||||
gap: clamp(3rem, 7vw, 8rem);
|
||||
align-items: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.landing-hero-copy { max-width: 47rem; }
|
||||
.landing-kicker,
|
||||
.landing-section-heading > p {
|
||||
display: inline-flex;
|
||||
gap: 0.45rem;
|
||||
align-items: center;
|
||||
margin: 0 0 1.25rem;
|
||||
color: var(--landing-primary-strong);
|
||||
font-size: 0.68rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.09em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.landing-kicker {
|
||||
border: 1px solid #a4d8cf;
|
||||
border-radius: 999px;
|
||||
padding: 0.42rem 0.7rem;
|
||||
background: rgba(216, 250, 243, 0.82);
|
||||
}
|
||||
|
||||
.landing-kicker svg { width: 0.9rem; height: 0.9rem; }
|
||||
.landing-hero h1 {
|
||||
max-width: 44rem;
|
||||
margin: 0;
|
||||
color: #112f2a;
|
||||
font-family: "Manrope", "Segoe UI", sans-serif;
|
||||
font-size: clamp(3rem, 5.8vw, 6rem);
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.055em;
|
||||
line-height: 0.98;
|
||||
}
|
||||
|
||||
.landing-hero h1 span { color: var(--landing-primary); }
|
||||
.landing-lead {
|
||||
max-width: 40rem;
|
||||
margin: 1.6rem 0 0;
|
||||
color: #365a53;
|
||||
font-size: clamp(1rem, 1.35vw, 1.2rem);
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.landing-hero-actions { display: flex; gap: 0.75rem; margin-top: 2rem; }
|
||||
.landing-primary-action,
|
||||
.landing-secondary-action {
|
||||
display: inline-flex;
|
||||
min-height: 3rem;
|
||||
gap: 0.55rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 4px;
|
||||
padding: 0.72rem 1.15rem;
|
||||
font-size: 0.84rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.landing-primary-action svg,
|
||||
.landing-secondary-action svg { width: 1.05rem; height: 1.05rem; }
|
||||
.landing-secondary-action {
|
||||
border: 1px solid #9bbab4;
|
||||
background: rgba(255, 255, 255, 0.86);
|
||||
color: var(--landing-ink);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.landing-trust-strip {
|
||||
display: flex;
|
||||
gap: 0;
|
||||
margin: 2.5rem 0 0;
|
||||
}
|
||||
|
||||
.landing-trust-strip > div { border-left: 1px solid #9db8b2; padding: 0 1.25rem; }
|
||||
.landing-trust-strip > div:first-child { padding-left: 0; border-left: 0; }
|
||||
.landing-trust-strip dt { color: var(--landing-muted); font-size: 0.62rem; text-transform: uppercase; }
|
||||
.landing-trust-strip dd { margin: 0.25rem 0 0; color: var(--landing-ink); font-size: 0.78rem; font-weight: 700; }
|
||||
|
||||
.landing-login-card {
|
||||
border: 1px solid rgba(111, 153, 144, 0.64);
|
||||
border-radius: 6px;
|
||||
padding: clamp(1.4rem, 3vw, 2rem);
|
||||
background: rgba(255, 255, 255, 0.94);
|
||||
box-shadow: 0 24px 60px rgba(25, 57, 50, 0.16);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.landing-login-heading { display: flex; gap: 0.85rem; align-items: flex-start; }
|
||||
.landing-login-icon {
|
||||
display: grid;
|
||||
width: 2.45rem;
|
||||
height: 2.45rem;
|
||||
flex: 0 0 2.45rem;
|
||||
place-items: center;
|
||||
border-radius: 4px;
|
||||
background: var(--landing-mint);
|
||||
color: var(--landing-primary);
|
||||
}
|
||||
|
||||
.landing-login-icon svg { width: 1.15rem; }
|
||||
.landing-login-heading h2 { margin: 0; font-family: "Manrope", sans-serif; font-size: 1.35rem; }
|
||||
.landing-login-heading p { margin: 0.3rem 0 0; color: var(--landing-muted); font-size: 0.78rem; }
|
||||
.landing-login-card form { display: grid; gap: 0.5rem; margin-top: 1.8rem; }
|
||||
.landing-login-card label { margin-top: 0.55rem; color: #4b6862; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.045em; text-transform: uppercase; }
|
||||
.landing-login-card input {
|
||||
width: 100%;
|
||||
min-height: 2.9rem;
|
||||
border: 1px solid #aac9c2;
|
||||
border-radius: 4px;
|
||||
padding: 0.7rem 0.8rem;
|
||||
background: #edf9f6;
|
||||
color: var(--landing-ink);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.landing-login-card input:focus { border-color: var(--landing-primary); box-shadow: 0 0 0 3px rgba(8, 114, 102, 0.14); }
|
||||
.landing-login-card form button {
|
||||
display: inline-flex;
|
||||
min-height: 3rem;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
.landing-login-card form button svg { width: 1rem; }
|
||||
.landing-login-card form button:disabled { cursor: not-allowed; opacity: 0.55; }
|
||||
.landing-login-error { margin: 0.45rem 0 0; border-left: 3px solid #a33c39; padding: 0.55rem 0.7rem; background: #fff0ef; color: #7b2825; font-size: 0.72rem; }
|
||||
.landing-session-note { display: flex; gap: 0.45rem; align-items: center; justify-content: center; margin: 1.45rem 0 0; border-top: 1px solid #c5d6d2; padding-top: 1rem; color: var(--landing-muted); font-size: 0.68rem; }
|
||||
.landing-session-note svg { width: 0.9rem; }
|
||||
|
||||
.landing-capabilities,
|
||||
.landing-workflow { padding: clamp(4rem, 8vw, 7.5rem) clamp(1.25rem, 6vw, 6rem); }
|
||||
.landing-capabilities { background: #fff; }
|
||||
.landing-section-heading { max-width: 50rem; margin: 0 auto 3rem; text-align: center; }
|
||||
.landing-section-heading > p { display: block; margin-bottom: 0.7rem; }
|
||||
.landing-section-heading h2 { margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(2rem, 3.2vw, 3.2rem); letter-spacing: -0.035em; }
|
||||
.landing-capability-grid { display: grid; width: min(80rem, 100%); grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 4rem); margin: 0 auto; }
|
||||
.landing-capability { border-top: 2px solid #aed4cc; padding-top: 1.6rem; }
|
||||
.landing-capability-icon { display: grid; width: 2.9rem; height: 2.9rem; place-items: center; border-radius: 4px; background: var(--landing-mint); color: var(--landing-primary); }
|
||||
.landing-capability-secondary { border-top-color: #b8d4e3; }
|
||||
.landing-capability-secondary .landing-capability-icon { background: #e7f2f8; color: var(--landing-blue); }
|
||||
.landing-capability-attention { border-top-color: #e4c1aa; }
|
||||
.landing-capability-attention .landing-capability-icon { background: #fff0e6; color: var(--landing-amber); }
|
||||
.landing-capability-icon svg { width: 1.35rem; }
|
||||
.landing-capability h3 { margin: 1.2rem 0 0.7rem; font-family: "Manrope", sans-serif; font-size: 1.1rem; }
|
||||
.landing-capability p { min-height: 6.5rem; margin: 0; color: var(--landing-muted); font-size: 0.85rem; line-height: 1.7; }
|
||||
.landing-capability > div { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
|
||||
.landing-capability > div span { border-radius: 2px; padding: 0.3rem 0.42rem; background: #eaf7f4; color: #315b54; font-size: 0.58rem; font-weight: 800; text-transform: uppercase; }
|
||||
|
||||
.landing-workflow { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.85fr); gap: 1rem; background: #f0f5f3; }
|
||||
.landing-workflow-map { position: relative; display: grid; min-height: 36rem; align-items: end; overflow: hidden; border-radius: 6px; background: #09201d; color: #fff; }
|
||||
.landing-workflow-map-image { position: absolute; inset: 0; filter: brightness(0.48) saturate(0.78) hue-rotate(2deg); }
|
||||
.landing-workflow-map::after { position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(3, 17, 15, 0.94)); content: ''; }
|
||||
.landing-workflow-map > div:last-child { position: relative; z-index: 2; padding: clamp(1.5rem, 4vw, 3rem); }
|
||||
.landing-workflow-map p { margin: 0 0 0.6rem; color: #9ce5d8; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; }
|
||||
.landing-workflow-map h2 { max-width: 34rem; margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(1.8rem, 3.5vw, 3.3rem); line-height: 1.05; }
|
||||
.landing-workflow-map span { display: block; margin-top: 1rem; color: rgba(255, 255, 255, 0.74); font-size: 0.75rem; }
|
||||
.landing-workflow-details { display: grid; border: 1px solid var(--landing-line); border-radius: 6px; background: #fff; }
|
||||
.landing-workflow-details article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; border-bottom: 1px solid #d7e2df; padding: clamp(1.4rem, 3vw, 2rem); }
|
||||
.landing-workflow-details article:last-child { border-bottom: 0; }
|
||||
.landing-workflow-details article > svg { width: 1.35rem; color: var(--landing-primary); }
|
||||
.landing-workflow-details h3 { margin: 0; font-family: "Manrope", sans-serif; font-size: 1rem; }
|
||||
.landing-workflow-details p { margin: 0.55rem 0 0; color: var(--landing-muted); font-size: 0.8rem; line-height: 1.6; }
|
||||
.landing-footer { display: flex; gap: 2rem; align-items: center; justify-content: space-between; padding: 2rem clamp(1.25rem, 4vw, 4.5rem); background: #061815; color: #fff; }
|
||||
.landing-footer strong { font-family: "Manrope", sans-serif; }
|
||||
.landing-footer p { margin: 0.35rem 0 0; color: rgba(255, 255, 255, 0.58); font-size: 0.7rem; }
|
||||
|
||||
.landing-auth-loading {
|
||||
display: grid;
|
||||
min-height: 100dvh;
|
||||
place-items: center;
|
||||
background: #eef8f5;
|
||||
color: var(--landing-primary-strong);
|
||||
font-family: "Manrope", sans-serif;
|
||||
}
|
||||
|
||||
.landing-auth-loading > div { display: grid; gap: 0.75rem; justify-items: center; }
|
||||
.landing-auth-loading span { width: 2rem; height: 2rem; border: 3px solid #b8dcd5; border-top-color: var(--landing-primary); border-radius: 50%; animation: landing-spin 0.8s linear infinite; }
|
||||
@keyframes landing-spin { to { transform: rotate(360deg); } }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.landing-header { grid-template-columns: auto auto auto; gap: 0.7rem; }
|
||||
.landing-menu-toggle { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid var(--landing-line); border-radius: 4px; background: #fff; color: var(--landing-ink); }
|
||||
.landing-menu-toggle svg { width: 1.15rem; }
|
||||
.landing-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; border-bottom: 1px solid var(--landing-line); padding: 0.75rem 1rem; background: #fff; }
|
||||
.landing-nav-open { display: flex; }
|
||||
.landing-hero { min-height: auto; }
|
||||
.landing-hero-content { grid-template-columns: 1fr; gap: 3rem; }
|
||||
.landing-hero-copy { max-width: 44rem; }
|
||||
.landing-login-card { width: min(32rem, 100%); }
|
||||
.landing-capability-grid { grid-template-columns: 1fr; }
|
||||
.landing-capability p { min-height: 0; }
|
||||
.landing-workflow { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.landing-header { padding-inline: 0.75rem; }
|
||||
.landing-brand span:last-child { display: none; }
|
||||
.landing-hero { padding: 6.3rem 1rem 3rem; }
|
||||
.landing-hero h1 { font-size: clamp(2.8rem, 16vw, 4.2rem); }
|
||||
.landing-hero-actions { align-items: stretch; flex-direction: column; }
|
||||
.landing-trust-strip { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
|
||||
.landing-trust-strip > div,
|
||||
.landing-trust-strip > div:first-child { border-left: 2px solid #9db8b2; padding: 0 0 0 0.75rem; }
|
||||
.landing-capabilities,
|
||||
.landing-workflow { padding: 3.5rem 1rem; }
|
||||
.landing-workflow-map { min-height: 28rem; }
|
||||
.landing-footer { align-items: flex-start; flex-direction: column; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.landing-page *,
|
||||
.landing-page *::before,
|
||||
.landing-page *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
|
||||
}
|
||||
Reference in New Issue
Block a user