{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "settings-security-page", "dependencies": [ "@inertiajs/react" ], "registryDependencies": [ "@craft/app-layout", "@craft/settings-layout", "@craft/form-errors", "@craft/heading", "@craft/input-error", "@craft/password-input", "@craft/manage-passkeys", "@craft/manage-two-factor", "button", "label" ], "files": [ { "path": "registry/new-york-v4/pages/settings/security.tsx", "content": "import { Form, Head } from \"@inertiajs/react\";\nimport { useRef } from \"react\";\nimport SecurityController from \"@/actions/App/Http/Controllers/Settings/SecurityController\";\nimport Heading from \"@/components/heading\";\nimport InputError from \"@/components/input-error\";\nimport PasswordInput from \"@/components/password-input\";\nimport { Button } from \"@/components/ui/button\";\nimport { toastFirstFormError } from \"@/lib/form-errors\";\nimport { Label } from \"@/components/ui/label\";\n/* @chisel-passkeys */\nimport type { Props as ManagePasskeysProps } from \"@/components/manage-passkeys\";\nimport ManagePasskeys from \"@/components/manage-passkeys\";\n/* @end-chisel-passkeys */\n/* @chisel-2fa */\nimport type { Props as ManageTwoFactorProps } from \"@/components/manage-two-factor\";\nimport ManageTwoFactor from \"@/components/manage-two-factor\";\n/* @end-chisel-2fa */\n\ntype Props = {\n passwordRules: string;\n} /* @chisel-passkeys */ & ManagePasskeysProps /* @end-chisel-passkeys */ /* @chisel-2fa */ &\n ManageTwoFactorProps /* @end-chisel-2fa */;\n\nexport default function Security(props: Props) {\n const passwordInput = useRef(null);\n const currentPasswordInput = useRef(null);\n\n return (\n <>\n \n\n

Security settings

\n\n
\n \n\n {\n toastFirstFormError(errors);\n\n if (errors.password) {\n passwordInput.current?.focus();\n }\n\n if (errors.current_password) {\n currentPasswordInput.current?.focus();\n }\n }}\n className=\"space-y-6\"\n >\n {({ errors, processing }) => (\n <>\n
\n \n\n \n\n \n
\n\n
\n \n\n \n\n \n
\n\n
\n \n\n \n\n \n
\n\n
\n \n
\n \n )}\n \n
\n\n {/* @chisel-2fa */}\n \n {/* @end-chisel-2fa */}\n\n {/* @chisel-passkeys */}\n \n {/* @end-chisel-passkeys */}\n \n );\n}\n\nSecurity.layout = {\n breadcrumbs: [\n {\n title: \"Security settings\",\n href: SecurityController.edit(),\n },\n ],\n};\n", "type": "registry:file", "target": "resources/js/pages/settings/security.tsx" } ], "type": "registry:block" }