Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c4bf2d4

Browse files
Changes from Inertia project
1 parent c9d2e56 commit c4bf2d4

File tree

10 files changed

+65
-31
lines changed

10 files changed

+65
-31
lines changed

‎src/components/NavLogoLink.vue‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<script setup>
2+
import ApplicationLogo from '@/components/ApplicationLogo.vue';
3+
</script>
4+
5+
<template>
6+
<Button
7+
asChild
8+
v-slot="slotProps"
9+
variant="link"
10+
>
11+
<RouterLink
12+
:to="{ name: 'welcome' }"
13+
:class="slotProps.class"
14+
class="flex items-center justify-start gap-4 no-underline! p-0"
15+
>
16+
<ApplicationLogo class="block h-8 lg:h-10 w-auto fill-current text-surface-900 dark:text-surface-0" />
17+
<span class="font-bold">Laravel + PrimeVue Starter Kit</span>
18+
</RouterLink>
19+
</Button>
20+
</template>

‎src/components/primevue/menu/PanelMenu.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ defineExpose({ el: childRef });
3737
<a
3838
:href="href"
3939
:class="[
40-
'p-panelmenu-item-link flex items-center cursor-pointer no-underline px-4 py-2',
40+
'p-panelmenu-item-link flex items-center cursor-pointer no-underline p-2',
4141
{ 'font-bold! text-muted-color': item.active }
4242
]"
4343
@click="navigate"
@@ -64,7 +64,7 @@ defineExpose({ el: childRef });
6464
:href="item.url"
6565
:target="item.target"
6666
:class="[
67-
'flex items-center cursor-pointer no-underline px-4 py-2',
67+
'flex items-center cursor-pointer no-underline p-2',
6868
hasSubmenu ? 'p-panelmenu-header-link' : 'p-panelmenu-item-link',
6969
]"
7070
>

‎src/composables/useAppLayout.js‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ref, computed, onMounted, onUnmounted, watchEffect } from 'vue';
22
import { useRoute } from 'vue-router';
3-
import { LayoutGrid, House, Info, Github,Code,Settings,LogOut,BookOpen } from 'lucide-vue-next';
3+
import { LayoutGrid, House, Info, Settings,LogOut,ExternalLink,FileSearch,FolderGit2 } from 'lucide-vue-next';
44
import { useAuthStore } from '@/stores/auth';
55

66
export function useAppLayout() {
@@ -25,23 +25,32 @@ export function useAppLayout() {
2525
active: currentRoute.value == 'dashboard',
2626
},
2727
{
28-
label: 'Info',
28+
label: 'Resources',
2929
lucideIcon: Info,
3030
items: [
31+
{
32+
label: 'Laravel Docs',
33+
url: 'https://laravel.com/docs/master',
34+
target: '_blank',
35+
lucideIcon: ExternalLink,
36+
},
3137
{
3238
label: 'PrimeVue Docs',
3339
url: 'https://primevue.org/',
34-
lucideIcon: Code,
40+
target: '_blank',
41+
lucideIcon: ExternalLink,
3542
},
3643
{
3744
label: 'Starter Kit Docs',
3845
url: 'https://connorabbas.github.io/laravel-primevue-starter-kit-docs/',
39-
lucideIcon: BookOpen,
46+
target: '_blank',
47+
lucideIcon: FileSearch,
4048
},
4149
{
4250
label: 'Starter Kit Repo',
4351
url: 'https://github.com/connorabbas/laravel-primevue-starter-kit',
44-
lucideIcon: Github,
52+
target: '_blank',
53+
lucideIcon: FolderGit2,
4554
},
4655
],
4756
},

‎src/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+
constprops=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>

‎src/layouts/app/HeaderLayout.vue‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { useTemplateRef } from 'vue';
33
import { useAppLayout } from '@/composables/useAppLayout';
44
import { ChevronsUpDown, ChevronDown, Menu as MenuIcon } from 'lucide-vue-next';
5-
import ApplicationLogo from '@/components/ApplicationLogo.vue';
5+
import NavLogoLink from '@/components/NavLogoLink.vue';
66
import Menu from '@/components/primevue/menu/Menu.vue';
77
import MenuBar from '@/components/primevue/menu/MenuBar.vue';
88
import PanelMenu from '@/components/primevue/menu/PanelMenu.vue';
@@ -85,11 +85,7 @@ const toggleMobileUserMenu = (event) => {
8585
>
8686
<template #start>
8787
<div class="shrink-0 flex items-center mr-5">
88-
<RouterLink to="/">
89-
<ApplicationLogo
90-
class="block h-8 lg:h-10 w-auto fill-current text-surface-900 dark:text-surface-0"
91-
/>
92-
</RouterLink>
88+
<NavLogoLink />
9389
</div>
9490
</template>
9591
<template #end>

‎src/layouts/app/SidebarLayout.vue‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { useTemplateRef } from 'vue';
33
import { ChevronsUpDown, Menu as MenuIcon } from 'lucide-vue-next';
44
import { useAppLayout } from '@/composables/useAppLayout';
5-
import ApplicationLogo from '@/components/ApplicationLogo.vue';
5+
import NavLogoLink from '@/components/NavLogoLink.vue';
66
import Menu from '@/components/primevue/menu/Menu.vue';
77
import PanelMenu from '@/components/primevue/menu/PanelMenu.vue';
88
import Breadcrumb from '@/components/primevue/menu/Breadcrumb.vue';
@@ -39,7 +39,7 @@ const toggleMobileUserMenu = (event) => {
3939
<!-- Mobile drawer menu -->
4040
<Drawer
4141
v-model:visible="mobileMenuOpen"
42-
position="left"
42+
position="right"
4343
>
4444
<div>
4545
<PanelMenu
@@ -78,11 +78,7 @@ const toggleMobileUserMenu = (event) => {
7878
<Container class="grow">
7979
<div class="flex justify-between items-center py-4">
8080
<div>
81-
<RouterLink to="/">
82-
<ApplicationLogo
83-
class="block h-8 w-auto fill-current text-surface-900 dark:text-surface-0"
84-
/>
85-
</RouterLink>
81+
<NavLogoLink />
8682
</div>
8783
<div>
8884
<Button
@@ -108,11 +104,7 @@ const toggleMobileUserMenu = (event) => {
108104
<div class="w-full h-full flex flex-col justify-between p-4">
109105
<div class="space-y-6">
110106
<div class="p-2">
111-
<RouterLink to="/">
112-
<ApplicationLogo
113-
class="block h-10 w-auto fill-current text-surface-900 dark:text-surface-0"
114-
/>
115-
</RouterLink>
107+
<NavLogoLink />
116108
</div>
117109
<div>
118110
<PanelMenu

‎src/views/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
<Card>
810
<template #content>
911
<p class="m-0">

‎src/views/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: { name: 'dashboard' } },
8+
{ label: 'Appearance Settings' },
9+
];
510
</script>
611

712
<template>
8-
<AppLayout>
13+
<AppLayout:breadcrumbs>
914
<SettingsLayout>
1015
<Card
1116
pt:body:class="max-w-2xl space-y-3"

‎src/views/settings/Password.vue‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import AppLayout from '@/layouts/AppLayout.vue';
88
import SettingsLayout from '@/layouts/UserSettingsLayout.vue';
99
import InputErrors from '@/components/InputErrors.vue';
1010
11+
const breadcrumbs = [
12+
{ label: 'Dashboard', route: { name: 'dashboard' } },
13+
{ label: 'Password Settings' },
14+
];
15+
1116
const toast = useToast();
1217
const authStore = useAuthStore();
1318
@@ -61,7 +66,7 @@ const submit = () => {
6166
</script>
6267
6368
<template>
64-
<AppLayout>
69+
<AppLayout:breadcrumbs>
6570
<SettingsLayout>
6671
<Card
6772
pt:body:class="max-w-2xl space-y-3"

‎src/views/settings/Profile.vue‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import SettingsLayout from '@/layouts/UserSettingsLayout.vue';
99
import DeleteUserModal from '@/components/DeleteUserModal.vue';
1010
import InputErrors from '@/components/InputErrors.vue';
1111
12+
const breadcrumbs = [
13+
{ label: 'Dashboard', route: { name: 'dashboard' } },
14+
{ label: 'Profile Settings' },
15+
];
16+
1217
const toast = useToast();
1318
const authStore = useAuthStore();
1419
const { flashMessages } = useFlashMessage();
@@ -45,7 +50,7 @@ const resendVerifyEmail = () => {
4550
</script>
4651

4752
<template>
48-
<AppLayout>
53+
<AppLayout:breadcrumbs>
4954
<SettingsLayout>
5055
<div class="space-y-4 md:space-y-8">
5156
<Card

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /