import { Form, Head } from '@inertiajs/react'; import { useRef } from 'react'; import SecurityController from '@/actions/App/Http/Controllers/Settings/SecurityController'; import Heading from '@/components/heading'; 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 { edit } from '@/routes/security'; /* @chisel-passkeys */ import type { Props as ManagePasskeysProps } from '@/components/manage-passkeys'; import ManagePasskeys from '@/components/manage-passkeys'; /* @end-chisel-passkeys */ /* @chisel-2fa */ import type { Props as ManageTwoFactorProps } from '@/components/manage-two-factor'; import ManageTwoFactor from '@/components/manage-two-factor'; /* @end-chisel-2fa */ // oxfmt-ignore type Props = { passwordRules: string; } /* @chisel-passkeys */ & ManagePasskeysProps /* @end-chisel-passkeys */ /* @chisel-2fa */ & ManageTwoFactorProps /* @end-chisel-2fa */; export default function Security(props: Props) { const passwordInput = useRef(null); const currentPasswordInput = useRef(null); return ( <>

Definições de segurança

{ if (errors.password) { passwordInput.current?.focus(); } if (errors.current_password) { currentPasswordInput.current?.focus(); } }} className="space-y-6" > {({ errors, processing }) => ( <>
)}
{/* @chisel-2fa */} {/* @end-chisel-2fa */} {/* @chisel-passkeys */} {/* @end-chisel-passkeys */} ); } Security.layout = { breadcrumbs: [ { title: 'Definições de segurança', href: edit(), }, ], };