Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions resources/js/Layouts/AuthenticatedLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ const currentRoute = computed(() => {
return route().current();
});

const logoutForm = useForm({});
function logout() {
logoutForm.post(route('logout'));
}

// Main menu
const mainMenuItems = computed(() => [
{
Expand All @@ -32,6 +27,7 @@ const mainMenuItems = computed(() => [

// User menu (desktop)
const userMenu = useTemplateRef('user-menu');
const logoutForm = useForm({});
const userMenuItems = [
{
label: 'Profile',
Expand All @@ -42,7 +38,7 @@ const userMenuItems = [
label: 'Log Out',
icon: 'pi pi-fw pi-sign-out',
command: () => {
logout();
logoutForm.post(route('logout'));
},
},
];
Expand Down Expand Up @@ -111,19 +107,19 @@ if (import.meta.env.SSR === false) {
<div>
<ToggleDarkModeButton
severity="secondary"
text
rounded
text
/>
</div>
<!-- User Dropdown Menu -->
<div class="flex flex-col">
<Button
id="user-menu-btn"
text
severity="secondary"
:label="page.props.auth.user.name"
icon="pi pi-angle-down"
iconPos="right"
text
@click="toggleUserMenu($event)"
/>
<div
Expand All @@ -144,10 +140,10 @@ if (import.meta.env.SSR === false) {
<div class="flex items-center lg:hidden">
<div class="relative">
<Button
text
severity="secondary"
icon="pi pi-bars"
pt:icon:class="text-xl"
text
@click="mobileMenuOpen = true"
/>
</div>
Expand All @@ -164,8 +160,8 @@ if (import.meta.env.SSR === false) {
<template #header>
<ToggleDarkModeButton
severity="secondary"
text
rounded
text
/>
</template>
<div>
Expand All @@ -190,9 +186,9 @@ if (import.meta.env.SSR === false) {
<Button
label="Profile"
icon="pi pi-user"
fluid
severity="secondary"
outlined
fluid
></Button>
</InertiaLink>
<Button
Expand Down