design upgrade

This commit is contained in:
Nermin Karic
2026-11-23 00:59:47 +01:00
parent 9e84140474
commit ada6fd857c
198 changed files with 6626 additions and 2539 deletions

View File

@@ -13,36 +13,37 @@ const Login = ({ setCurrentView }: Props) => {
const [message, formAction] = useActionState(login, null)
return (
<div
className="max-w-sm w-full flex flex-col items-center"
data-testid="login-page"
>
<h1 className="text-large-semi uppercase mb-6">Welcome back</h1>
<p className="text-center text-base-regular text-ui-fg-base mb-8">
Sign in to access an enhanced shopping experience.
</p>
<div className="flex w-full max-w-sm flex-col" data-testid="login-page">
<header className="text-center">
<p className="eyebrow">Moj račun</p>
<h1 className="display-heading mt-5 text-4xl sm:text-5xl text-foreground">Prijava</h1>
<p className="mt-4 text-sm text-muted-foreground">
Pratite narudžbe, sačuvajte adrese i naručujte brže.
</p>
</header>
{message?.state === "verification_required" && (
<div
className="w-full mb-6 text-center text-base-regular text-ui-fg-base bg-ui-bg-subtle border border-ui-border-base rounded-rounded p-4"
className="mt-8 rounded-lg bg-muted p-4 text-center text-sm text-foreground"
data-testid="login-verification-message"
>
We sent a verification link to <strong>{message.email}</strong>.
Please verify your email, then sign in.
Poslali smo link za potvrdu na <strong>{message.email}</strong>. Potvrdite email, pa se prijavite.
</div>
)}
<form className="w-full" action={formAction}>
<div className="flex flex-col w-full gap-y-2">
<form className="mt-10 w-full" action={formAction}>
<div className="flex w-full flex-col gap-y-3">
<Input
label="Email"
name="email"
type="email"
title="Enter a valid email address."
title="Unesite ispravnu email adresu."
autoComplete="email"
required
data-testid="email-input"
/>
<Input
label="Password"
label="Lozinka"
name="password"
type="password"
autoComplete="current-password"
@@ -54,21 +55,21 @@ const Login = ({ setCurrentView }: Props) => {
error={message?.state === "error" ? message.error : null}
data-testid="login-error-message"
/>
<SubmitButton data-testid="sign-in-button" className="w-full mt-6">
Sign in
<SubmitButton data-testid="sign-in-button" className="mt-6 h-12 w-full">
Prijava
</SubmitButton>
</form>
<span className="text-center text-ui-fg-base text-small-regular mt-6">
Not a member?{" "}
<p className="mt-8 border-t border-border/70 pt-6 text-center text-sm text-muted-foreground">
Nemate račun?{" "}
<button
onClick={() => setCurrentView(LOGIN_VIEW.REGISTER)}
className="underline"
className="text-primary underline underline-offset-4 hover:opacity-80"
data-testid="register-button"
>
Join us
Registrujte se
</button>
.
</span>
</p>
</div>
)
}