Auth: ekrany powitalne oddaja istote FitOS (istniejace funkcje zamiast zmyslonych statystyk)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Building2, Library, Users } from 'lucide-react';
|
||||
import { useAuth } from '../store/auth';
|
||||
import { Button, Card, ErrorText, Field, H1, Input, ThemeToggle } from '../components/ui';
|
||||
import { Brandmark } from '../components/Brandmark';
|
||||
@@ -54,57 +55,88 @@ export default function Login() {
|
||||
/>
|
||||
<div className="relative flex items-center gap-2.5">
|
||||
<Brandmark size={30} />
|
||||
<span className="font-display text-[1.25rem] font-bold tracking-[-0.02em]">FitOS Admin</span>
|
||||
<span className="font-display text-[1.25rem] font-bold tracking-[-0.02em]">
|
||||
FitOS Admin
|
||||
</span>
|
||||
</div>
|
||||
<div className="relative font-display text-[1.7rem] font-bold leading-[1.14] tracking-[-0.025em] md:text-[1.95rem]">
|
||||
Pełna kontrola
|
||||
<br />
|
||||
nad systemem.
|
||||
Cała platforma
|
||||
<br />w jednym panelu.
|
||||
</div>
|
||||
<p className="relative m-0 max-w-[34ch] text-[0.875rem] leading-relaxed text-dim">
|
||||
Użytkownicy, siłownie, weryfikacje i słowniki — wszystko w jednym panelu.
|
||||
Zaplecze FitOS: konta i dostęp, siłownie z członkostwami i słowniki ćwiczeń — dla
|
||||
administratora platformy.
|
||||
</p>
|
||||
<div className="relative mt-auto flex gap-6 pt-4">
|
||||
<div>
|
||||
<div className="font-display text-[1.4rem] font-bold tabular-nums">24/7</div>
|
||||
<div className="text-[10.5px] font-bold uppercase tracking-[0.13em] text-dim">monitoring</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-display text-[1.4rem] font-bold tabular-nums">100%</div>
|
||||
<div className="text-[10.5px] font-bold uppercase tracking-[0.13em] text-dim">audyt zdarzeń</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-display text-[1.4rem] font-bold tabular-nums">1</div>
|
||||
<div className="text-[10.5px] font-bold uppercase tracking-[0.13em] text-dim">panel</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul aria-label="Zakres panelu" className="relative mt-auto flex flex-col gap-3 pt-4">
|
||||
{[
|
||||
{
|
||||
icon: Users,
|
||||
title: 'Konta i dostęp',
|
||||
desc: 'Użytkownicy, role, członkostwa, kary na koncie',
|
||||
},
|
||||
{
|
||||
icon: Building2,
|
||||
title: 'Siłownie',
|
||||
desc: 'Publiczne i prywatne, właściciele, trenerzy, weryfikacje',
|
||||
},
|
||||
{
|
||||
icon: Library,
|
||||
title: 'Słowniki',
|
||||
desc: 'Pula ćwiczeń, urządzenia, obszary skupienia',
|
||||
},
|
||||
].map(({ icon: Icon, title, desc }) => (
|
||||
<li key={title} className="flex items-start gap-2.5">
|
||||
<Icon
|
||||
size={16}
|
||||
className="mt-0.5 shrink-0 text-[var(--accent)]"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div>
|
||||
<div className="text-[0.825rem] font-semibold">{title}</div>
|
||||
<div className="text-[0.75rem] leading-snug text-dim">{desc}</div>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
<Card className="m-0 rounded-none border-0 p-7 shadow-none md:p-8">
|
||||
<div className="mb-5">
|
||||
<H1 className="mb-1">FitOS Admin</H1>
|
||||
<p className="text-dim">Panel administracyjny (tylko admin)</p>
|
||||
</div>
|
||||
<form onSubmit={submit}>
|
||||
<Field label="E-mail">
|
||||
<Input type="email" value={email} onChange={(e) => setEmail(e.target.value)} required autoComplete="email" />
|
||||
</Field>
|
||||
<Field label="Hasło">
|
||||
<Input type="password" value={password} onChange={(e) => setPassword(e.target.value)} required autoComplete="current-password" />
|
||||
</Field>
|
||||
<label className="flex items-center gap-2 mb-3.5 text-[0.875rem] text-dim cursor-pointer select-none">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={remember}
|
||||
onChange={(e) => setRemember(e.target.checked)}
|
||||
className="size-4 accent-[var(--accent)]"
|
||||
/>
|
||||
Zapamiętaj mnie
|
||||
</label>
|
||||
{error && <ErrorText>{error}</ErrorText>}
|
||||
<Button type="submit" disabled={loading} className="w-full">
|
||||
{loading ? 'Logowanie…' : 'Zaloguj'}
|
||||
</Button>
|
||||
</form>
|
||||
<form onSubmit={submit}>
|
||||
<Field label="E-mail">
|
||||
<Input
|
||||
type="email"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
required
|
||||
autoComplete="email"
|
||||
/>
|
||||
</Field>
|
||||
<Field label="Hasło">
|
||||
<Input
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
required
|
||||
autoComplete="current-password"
|
||||
/>
|
||||
</Field>
|
||||
<label className="flex items-center gap-2 mb-3.5 text-[0.875rem] text-dim cursor-pointer select-none">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={remember}
|
||||
onChange={(e) => setRemember(e.target.checked)}
|
||||
className="size-4 accent-[var(--accent)]"
|
||||
/>
|
||||
Zapamiętaj mnie
|
||||
</label>
|
||||
{error && <ErrorText>{error}</ErrorText>}
|
||||
<Button type="submit" disabled={loading} className="w-full">
|
||||
{loading ? 'Logowanie…' : 'Zaloguj'}
|
||||
</Button>
|
||||
</form>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { Dumbbell, Flame, Handshake } from 'lucide-react';
|
||||
import { Card, H1, ThemeToggle } from './ui';
|
||||
import { Brandmark } from './Brandmark';
|
||||
|
||||
@@ -37,34 +38,48 @@ export default function AuthShell({
|
||||
<span className="font-display text-[1.25rem] font-bold tracking-[-0.02em]">FitOS</span>
|
||||
</div>
|
||||
<div className="relative font-display text-[1.7rem] font-bold leading-[1.14] tracking-[-0.025em] md:text-[1.95rem]">
|
||||
Plan, który
|
||||
Trening, który
|
||||
<br />
|
||||
dowozi wyniki.
|
||||
się dowozi.
|
||||
</div>
|
||||
<p className="relative m-0 max-w-[34ch] text-[0.875rem] leading-relaxed text-dim">
|
||||
Silnik planów treningowych: tygodnie, serie, normy i killstreak — wszystko w jednym
|
||||
miejscu.
|
||||
Silnik planów siłowni: plan od trenera, serie z ciężarem i RIR, killstreak za skuteczne
|
||||
treningi — od planowania po ostatnią serię.
|
||||
</p>
|
||||
<div className="relative mt-auto flex gap-6 pt-4">
|
||||
<div>
|
||||
<div className="font-display text-[1.4rem] font-bold tabular-nums">12</div>
|
||||
<div className="text-[10.5px] font-bold uppercase tracking-[0.13em] text-dim">
|
||||
killstreak
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-display text-[1.4rem] font-bold tabular-nums">87%</div>
|
||||
<div className="text-[10.5px] font-bold uppercase tracking-[0.13em] text-dim">
|
||||
postęp planu
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="font-display text-[1.4rem] font-bold tabular-nums">4×8</div>
|
||||
<div className="text-[10.5px] font-bold uppercase tracking-[0.13em] text-dim">
|
||||
normy serii
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul
|
||||
aria-label="Najważniejsze możliwości"
|
||||
className="relative mt-auto flex flex-col gap-3 pt-4"
|
||||
>
|
||||
{[
|
||||
{
|
||||
icon: Handshake,
|
||||
title: 'Plan od trenera',
|
||||
desc: 'Coach, wiadomości i udostępniane plany w jednym miejscu',
|
||||
},
|
||||
{
|
||||
icon: Dumbbell,
|
||||
title: 'Serie planowe',
|
||||
desc: 'Tydzień → dzień → sesja: powtórzenia, kg, RIR i przerwa',
|
||||
},
|
||||
{
|
||||
icon: Flame,
|
||||
title: 'Killstreak',
|
||||
desc: 'Kolejne skuteczne treningi liczone, pominięcia resetują passę',
|
||||
},
|
||||
].map(({ icon: Icon, title, desc }) => (
|
||||
<li key={title} className="flex items-start gap-2.5">
|
||||
<Icon
|
||||
size={16}
|
||||
className="mt-0.5 shrink-0 text-[var(--accent)]"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div>
|
||||
<div className="text-[0.825rem] font-semibold">{title}</div>
|
||||
<div className="text-[0.75rem] leading-snug text-dim">{desc}</div>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
<Card className="m-0 rounded-none border-0 p-7 shadow-none md:p-8">
|
||||
<div className="mb-5">
|
||||
|
||||
Reference in New Issue
Block a user