vacation-planner/resources/js/pages/auth/confirm-password.tsx
2026-11-28 12:59:18 +08:00

52 lines
2.0 KiB
TypeScript
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Form, Head } from '@inertiajs/react';
import InputError from '@/components/input-error';
import PasswordInput from '@/components/password-input';
import { Button } from '@/components/ui/button';
import { Label } from '@/components/ui/label';
import { Spinner } from '@/components/ui/spinner';
import { store } from '@/routes/password/confirm';
export default function ConfirmPassword() {
return (
<>
<Head title="Подтверждение пароля" />
<Form {...store.form()} resetOnSuccess={['password']}>
{({ processing, errors }) => (
<div className="space-y-6">
<div className="grid gap-2">
<Label htmlFor="password">Пароль</Label>
<PasswordInput
id="password"
name="password"
placeholder="Пароль"
autoComplete="current-password"
autoFocus
/>
<InputError message={errors.password} />
</div>
<div className="flex items-center">
<Button
className="w-full"
disabled={processing}
data-test="confirm-password-button"
>
{processing && <Spinner />}
Подтвердить пароль
</Button>
</div>
</div>
)}
</Form>
</>
);
}
ConfirmPassword.layout = {
title: 'Подтверждение пароля',
description:
'Это защищённый раздел приложения. Подтвердите пароль, чтобы продолжить.',
};