Skip to content

Commit e0c345f

Browse files
authored
Merge pull request #164 from connorabbas/master
Catch up
2 parents e29d655 + 937a4f1 commit e0c345f

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

resources/js/Layouts/AuthenticatedLayout.vue

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ const currentRoute = computed(() => {
1616
return route().current();
1717
});
1818
19-
const logoutForm = useForm({});
20-
function logout() {
21-
logoutForm.post(route('logout'));
22-
}
23-
2419
// Main menu
2520
const mainMenuItems = computed(() => [
2621
{
@@ -32,6 +27,7 @@ const mainMenuItems = computed(() => [
3227
3328
// User menu (desktop)
3429
const userMenu = useTemplateRef('user-menu');
30+
const logoutForm = useForm({});
3531
const userMenuItems = [
3632
{
3733
label: 'Profile',
@@ -42,7 +38,7 @@ const userMenuItems = [
4238
label: 'Log Out',
4339
icon: 'pi pi-fw pi-sign-out',
4440
command: () => {
45-
logout();
41+
logoutForm.post(route('logout'));
4642
},
4743
},
4844
];
@@ -109,19 +105,19 @@ watchEffect(() => {
109105
<div>
110106
<ToggleDarkModeButton
111107
severity="secondary"
112-
text
113108
rounded
109+
text
114110
/>
115111
</div>
116112
<!-- User Dropdown Menu -->
117113
<div class="flex flex-col">
118114
<Button
119115
id="user-menu-btn"
120-
text
121116
severity="secondary"
122117
:label="page.props.auth.user.name"
123118
icon="pi pi-angle-down"
124119
iconPos="right"
120+
text
125121
@click="toggleUserMenu($event)"
126122
/>
127123
<div
@@ -142,10 +138,10 @@ watchEffect(() => {
142138
<div class="flex items-center lg:hidden">
143139
<div class="relative">
144140
<Button
145-
text
146141
severity="secondary"
147142
icon="pi pi-bars"
148143
pt:icon:class="text-xl"
144+
text
149145
@click="mobileMenuOpen = true"
150146
/>
151147
</div>
@@ -162,8 +158,8 @@ watchEffect(() => {
162158
<template #header>
163159
<ToggleDarkModeButton
164160
severity="secondary"
165-
text
166161
rounded
162+
text
167163
/>
168164
</template>
169165
<div>
@@ -188,9 +184,9 @@ watchEffect(() => {
188184
<Button
189185
label="Profile"
190186
icon="pi pi-user"
191-
fluid
192187
severity="secondary"
193188
outlined
189+
fluid
194190
></Button>
195191
</InertiaLink>
196192
<Button

0 commit comments

Comments
 (0)