feat: implement user profile settings page with layout and custom app base view

This commit is contained in:
IlhamIslamy 2026-05-30 20:08:07 +07:00
parent c9eacaee46
commit c2cb69924c
3 changed files with 4 additions and 11 deletions

View File

@ -7,7 +7,6 @@ import { useCurrentUrl } from '@/hooks/use-current-url';
import { cn, toUrl } from '@/lib/utils'; import { cn, toUrl } from '@/lib/utils';
import { edit as editAppearance } from '@/routes/appearance'; import { edit as editAppearance } from '@/routes/appearance';
import { edit } from '@/routes/profile'; import { edit } from '@/routes/profile';
import { show } from '@/routes/two-factor';
import { edit as editPassword } from '@/routes/user-password'; import { edit as editPassword } from '@/routes/user-password';
import type { NavItem } from '@/types'; import type { NavItem } from '@/types';
@ -22,11 +21,7 @@ const sidebarNavItems: NavItem[] = [
href: editPassword(), href: editPassword(),
icon: null, icon: null,
}, },
{ // Two-Factor Auth nav item is intentionally hidden
title: 'Two-Factor Auth',
href: show(),
icon: null,
},
{ {
title: 'Appearance', title: 'Appearance',
href: editAppearance(), href: editAppearance(),

View File

@ -1,7 +1,6 @@
import { Transition } from '@headlessui/react'; import { Transition } from '@headlessui/react';
import { Form, Head, Link, usePage } from '@inertiajs/react'; import { Form, Head, Link, usePage } from '@inertiajs/react';
import ProfileController from '@/actions/App/Http/Controllers/Settings/ProfileController'; import ProfileController from '@/actions/App/Http/Controllers/Settings/ProfileController';
import DeleteUser from '@/components/delete-user';
import Heading from '@/components/heading'; import Heading from '@/components/heading';
import InputError from '@/components/input-error'; import InputError from '@/components/input-error';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
@ -143,7 +142,7 @@ export default function Profile({
</Form> </Form>
</div> </div>
<DeleteUser /> {/* Delete account section hidden intentionally */}
</SettingsLayout> </SettingsLayout>
</AppLayout> </AppLayout>
); );

View File

@ -32,9 +32,8 @@
<title inertia>{{ config('app.name', 'Laravel') }}</title> <title inertia>{{ config('app.name', 'Laravel') }}</title>
<link rel="icon" href="/favicon.ico" sizes="any"> <link rel="icon" href="/assets/logo-clear.png" type="image/png">
<link rel="icon" href="/favicon.svg" type="image/svg+xml"> <link rel="apple-touch-icon" href="/assets/logo-clear.png">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="preconnect" href="https://fonts.bunny.net"> <link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600" rel="stylesheet" /> <link href="https://fonts.bunny.net/css?family=instrument-sans:400,500,600" rel="stylesheet" />