Skip to content

Commit cc520d2

Browse files
committed
Merge branch 'master' of github.com:connorabbas/laravel-inertia-primevue into admin-role-dev
2 parents c09355f + ef1692c commit cc520d2

File tree

10 files changed

+60
-43
lines changed

10 files changed

+60
-43
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script setup>
2+
import ApplicationLogo from '@/components/ApplicationLogo.vue';
3+
</script>
4+
5+
<template>
6+
<Button
7+
:href="route('welcome')"
8+
pt:root:class="flex items-center justify-start gap-4 no-underline p-0"
9+
variant="link"
10+
as="InertiaLink"
11+
>
12+
<ApplicationLogo class="block h-8 lg:h-10 w-auto fill-current text-surface-900 dark:text-surface-0" />
13+
<span class="font-bold">Laravel + PrimeVue Starter Kit</span>
14+
</Button>
15+
</template>

resources/js/components/primevue/menu/PanelMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defineExpose({ el: childRef });
3232
v-if="item.route"
3333
:href="item.route"
3434
:class="[
35-
'p-panelmenu-item-link flex items-center cursor-pointer no-underline px-4 py-2',
35+
'p-panelmenu-item-link flex items-center cursor-pointer no-underline p-2',
3636
{ 'font-bold! text-muted-color': item.active },
3737
]"
3838
custom
@@ -53,7 +53,7 @@ defineExpose({ el: childRef });
5353
:href="item.url"
5454
:target="item.target"
5555
:class="[
56-
'flex items-center cursor-pointer no-underline px-4 py-2',
56+
'flex items-center cursor-pointer no-underline p-2',
5757
hasSubmenu ? 'p-panelmenu-header-link' : 'p-panelmenu-item-link',
5858
]"
5959
>

resources/js/composables/useAppLayout.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,31 @@ export function useAppLayout() {
3131
active: currentRoute.value == 'dashboard',
3232
},
3333
{
34-
label: 'Info',
34+
label: 'Resources',
3535
lucideIcon: Info,
3636
items: [
37+
{
38+
label: 'Laravel Docs',
39+
url: 'https://laravel.com/docs/master',
40+
target: '_blank',
41+
lucideIcon: ExternalLink,
42+
},
3743
{
3844
label: 'PrimeVue Docs',
3945
url: 'https://primevue.org/',
46+
target: '_blank',
4047
lucideIcon: ExternalLink,
4148
},
4249
{
4350
label: 'Starter Kit Docs',
4451
url: 'https://connorabbas.github.io/laravel-primevue-starter-kit-docs/',
52+
target: '_blank',
4553
lucideIcon: FileSearch,
4654
},
4755
{
4856
label: 'Starter Kit Repo',
4957
url: 'https://github.com/connorabbas/laravel-primevue-starter-kit',
58+
target: '_blank',
5059
lucideIcon: FolderGit2,
5160
},
5261
],

resources/js/layouts/AppLayout.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup>
22
import AppLayout from '@/layouts/app/HeaderLayout.vue';
33
4-
defineProps({
4+
const props = defineProps({
55
breadcrumbs: {
66
type: Array,
77
default: () => [],
@@ -10,7 +10,7 @@ defineProps({
1010
</script>
1111

1212
<template>
13-
<AppLayout :breadcrumbs="breadcrumbs">
13+
<AppLayout :breadcrumbs="props.breadcrumbs">
1414
<slot />
1515
</AppLayout>
1616
</template>

resources/js/layouts/app/HeaderLayout.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { useTemplateRef } from 'vue';
33
import { usePage } from '@inertiajs/vue3';
44
import { useAppLayout } from '@/composables/useAppLayout';
55
import { ChevronsUpDown, ChevronDown, Menu as MenuIcon } from 'lucide-vue-next';
6-
import ApplicationLogo from '@/components/ApplicationLogo.vue';
76
import ClientOnly from '@/components/ClientOnly.vue';
7+
import NavLogoLink from '@/components/NavLogoLink.vue';
88
import FlashMessages from '@/components/FlashMessages.vue';
99
import Menu from '@/components/primevue/menu/Menu.vue';
1010
import Menubar from '@/components/primevue/menu/Menubar.vue';
@@ -90,16 +90,8 @@ const toggleMobileUserMenu = (event) => {
9090
pt:button:class="hidden"
9191
>
9292
<template #start>
93-
<div class="shrink-0 flex gap-4 items-center mr-5">
94-
<InertiaLink :href="route('welcome')">
95-
<ApplicationLogo
96-
class="block h-8 lg:h-10 w-auto fill-current text-surface-900 dark:text-surface-0"
97-
/>
98-
</InertiaLink>
99-
<Tag
100-
v-if="page.props.auth.isAdmin"
101-
value="ADMIN"
102-
/>
93+
<div class="shrink-0 flex items-center mr-5">
94+
<NavLogoLink />
10395
</div>
10496
</template>
10597
<template #end>

resources/js/layouts/app/SidebarLayout.vue

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { useTemplateRef } from 'vue';
33
import { usePage } from '@inertiajs/vue3';
44
import { ChevronsUpDown, Menu as MenuIcon } from 'lucide-vue-next';
55
import { useAppLayout } from '@/composables/useAppLayout';
6-
import ApplicationLogo from '@/components/ApplicationLogo.vue';
76
import ClientOnly from '@/components/ClientOnly.vue';
87
import FlashMessages from '@/components/FlashMessages.vue';
8+
import NavLogoLink from '@/components/NavLogoLink.vue';
99
import Menu from '@/components/primevue/menu/Menu.vue';
1010
import PanelMenu from '@/components/primevue/menu/PanelMenu.vue';
1111
import Breadcrumb from '@/components/primevue/menu/Breadcrumb.vue';
@@ -43,7 +43,7 @@ const toggleMobileUserMenu = (event) => {
4343
<!-- Mobile drawer menu -->
4444
<Drawer
4545
v-model:visible="mobileMenuOpen"
46-
position="left"
46+
position="right"
4747
>
4848
<div>
4949
<PanelMenu
@@ -82,17 +82,9 @@ const toggleMobileUserMenu = (event) => {
8282
<header class="block lg:fixed top-0 left-0 right-0 z-50">
8383
<nav class="dynamic-bg shadow-sm flex justify-between items-center lg:hidden">
8484
<Container class="grow">
85-
<div class="flex justify-between items-center py-4">
86-
<div class="flex gap-4">
87-
<InertiaLink :href="route('welcome')">
88-
<ApplicationLogo
89-
class="block h-8 w-auto fill-current text-surface-900 dark:text-surface-0"
90-
/>
91-
</InertiaLink>
92-
<Tag
93-
v-if="page.props.auth.isAdmin"
94-
value="ADMIN"
95-
/>
85+
<div class="flex justify-between items-center gap-4 py-4">
86+
<div>
87+
<NavLogoLink />
9688
</div>
9789
<div>
9890
<Button
@@ -118,16 +110,8 @@ const toggleMobileUserMenu = (event) => {
118110
>
119111
<div class="w-full h-full flex flex-col justify-between p-4">
120112
<div class="space-y-6">
121-
<div class="flex gap-4 items-center">
122-
<InertiaLink :href="route('welcome')">
123-
<ApplicationLogo
124-
class="block h-10 w-auto fill-current text-surface-900 dark:text-surface-0"
125-
/>
126-
</InertiaLink>
127-
<Tag
128-
v-if="page.props.auth.isAdmin"
129-
value="ADMIN"
130-
/>
113+
<div class="p-2">
114+
<NavLogoLink />
131115
</div>
132116
<div>
133117
<PanelMenu

resources/js/pages/Dashboard.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<script setup>
22
import AppLayout from '@/layouts/AppLayout.vue';
3+
4+
const breadcrumbs = [{ label: 'Dashboard' }];
35
</script>
46

57
<template>
6-
<AppLayout>
8+
<AppLayout :breadcrumbs>
79
<InertiaHead title="Dashboard" />
810

911
<Card>

resources/js/pages/settings/Appearance.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
import AppLayout from '@/layouts/AppLayout.vue';
33
import SettingsLayout from '@/layouts/UserSettingsLayout.vue';
44
import SelectColorModeButton from '@/components/SelectColorModeButton.vue';
5+
6+
const breadcrumbs = [
7+
{ label: 'Dashboard', route: route('dashboard') },
8+
{ label: 'Appearance Settings' },
9+
];
510
</script>
611

712
<template>
8-
<AppLayout>
13+
<AppLayout :breadcrumbs>
914
<InertiaHead title="Appearance Settings" />
1015

1116
<SettingsLayout>

resources/js/pages/settings/Password.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ defineProps({
1515
},
1616
});
1717
18+
const breadcrumbs = [
19+
{ label: 'Dashboard', route: route('dashboard') },
20+
{ label: 'Password Settings' },
21+
];
22+
1823
const currentPasswordInput = useTemplateRef('current-password-input');
1924
const newPasswordInput = useTemplateRef('new-password-input');
2025
@@ -61,7 +66,7 @@ const updatePassword = () => {
6166
</script>
6267
6368
<template>
64-
<AppLayout>
69+
<AppLayout :breadcrumbs>
6570
<InertiaHead title="Password Settings" />
6671
6772
<SettingsLayout>

resources/js/pages/settings/Profile.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ defineProps({
1515
},
1616
});
1717
18+
const breadcrumbs = [
19+
{ label: 'Dashboard', route: route('dashboard') },
20+
{ label: 'Profile Settings' },
21+
];
22+
1823
const deleteUserModalOpen = ref(false);
1924
2025
const user = usePage().props.auth.user;
@@ -48,7 +53,7 @@ const updateProfileInformation = () => {
4853
</script>
4954

5055
<template>
51-
<AppLayout>
56+
<AppLayout :breadcrumbs>
5257
<InertiaHead title="Profile Settings" />
5358

5459
<SettingsLayout>

0 commit comments

Comments
 (0)