Skip to content

Commit 0bdfb91

Browse files
authored
Merge pull request #42 from connorabbas/develop
Changes from Inertia project, fixes
2 parents c3b93c4 + f4d4fac commit 0bdfb91

File tree

16 files changed

+204
-87
lines changed

16 files changed

+204
-87
lines changed

src/components/DeleteUserModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const deleteAccount = () => {
9292
/>
9393
<Button
9494
:loading="deleting"
95-
label="Delete Account"
95+
label="Delete account"
9696
severity="danger"
9797
@click="deleteAccount"
9898
/>

src/components/primevue/menu/Breadcrumb.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import { ref, useTemplateRef } from 'vue';
33
import Breadcrumb, { type BreadcrumbPassThroughOptions, type BreadcrumbProps } from 'primevue/breadcrumb';
44
import { ChevronRight } from 'lucide-vue-next';
5-
import type { ExtendedMenuItem } from '@/types';
5+
import type { MenuItem } from '@/types';
66
import { ptViewMerge } from '@/utils';
77
88
interface ExtendedBreadcrumbProps extends Omit<BreadcrumbProps, 'model'> {
9-
model: ExtendedMenuItem[];
9+
model?: MenuItem[] | undefined;
1010
}
1111
const componentProps = defineProps<ExtendedBreadcrumbProps>();
1212

src/components/primevue/menu/Menu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script setup lang="ts">
22
import { useTemplateRef } from 'vue';
33
import Menu, { type MenuProps } from 'primevue/menu';
4-
import type { ExtendedMenuItem } from '@/types';
4+
import type { MenuItem } from '@/types';
55
import { ptViewMerge } from '@/utils';
66
77
interface ExtendedMenuProps extends Omit<MenuProps, 'model'> {
8-
model: ExtendedMenuItem[];
8+
model?: MenuItem[] | undefined;
99
}
1010
const componentProps = defineProps<ExtendedMenuProps>();
1111

src/components/primevue/menu/MenuBar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import { useTemplateRef } from 'vue';
33
import Menubar, { type MenubarProps } from 'primevue/menubar';
44
import { ChevronDown, ChevronRight } from 'lucide-vue-next';
5-
import type { ExtendedMenuItem } from '@/types';
5+
import type { MenuItem } from '@/types';
66
import { ptViewMerge } from '@/utils';
77
88
interface ExtendedMenubarProps extends Omit<MenubarProps, 'model'> {
9-
model: ExtendedMenuItem[];
9+
model?: MenuItem[] | undefined;
1010
}
1111
const componentProps = withDefaults(
1212
defineProps<ExtendedMenubarProps>(),

src/components/primevue/menu/PanelMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import { useTemplateRef } from 'vue';
33
import PanelMenu, { type PanelMenuPassThroughOptions, type PanelMenuProps } from 'primevue/panelmenu';
44
import { ChevronDown, ChevronRight } from 'lucide-vue-next';
5-
import type { ExtendedMenuItem } from '@/types';
5+
import type { MenuItem } from '@/types';
66
import { ptViewMerge } from '@/utils';
77
88
interface ExtendedPanelMenuProps extends Omit<PanelMenuProps, 'model'> {
9-
model: ExtendedMenuItem[];
9+
model?: MenuItem[] | undefined;
1010
}
1111
const componentProps = defineProps<ExtendedPanelMenuProps>();
1212

src/composables/useAppLayout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function useAppLayout() {
5858
separator: true,
5959
},
6060
{
61-
label: 'Log Out',
61+
label: 'Log out',
6262
lucideIcon: LogOut,
6363
command: () => authStore.logout(),
6464
},

src/layouts/GuestAuthLayout.vue

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,51 @@ import ApplicationLogo from '@/components/ApplicationLogo.vue';
33
</script>
44

55
<template>
6-
<Container>
7-
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0">
8-
<div>
9-
<RouterLink to="/">
10-
<ApplicationLogo class="w-15 h-15 fill-current text-surface-900 dark:text-surface-0" />
11-
</RouterLink>
12-
</div>
13-
<div
14-
v-if="$slots.message"
15-
class="w-full sm:max-w-md mt-6 px-4 sm:px-0"
6+
<Container class="min-h-svh flex flex-col justify-center items-center">
7+
<div>
8+
<RouterLink to="/">
9+
<ApplicationLogo class="w-12 h-12 fill-current text-surface-900 dark:text-surface-0" />
10+
</RouterLink>
11+
</div>
12+
<div
13+
v-if="$slots.message"
14+
class="w-full sm:max-w-lg mt-6 px-4 sm:px-0"
15+
>
16+
<slot name="message" />
17+
</div>
18+
<div class="w-full sm:max-w-lg mt-6">
19+
<Card
20+
pt:caption:class="space-y-2"
21+
pt:body:class="p-6 sm:p-8 space-y-6"
1622
>
17-
<slot name="message" />
18-
</div>
19-
<div class="w-full sm:max-w-md mt-6">
20-
<Card>
21-
<template #content>
22-
<slot />
23-
</template>
24-
</Card>
25-
</div>
23+
<template
24+
v-if="$slots.header"
25+
#header
26+
>
27+
<slot name="header" />
28+
</template>
29+
<template
30+
v-if="$slots.title"
31+
#title
32+
>
33+
<slot name="title" />
34+
</template>
35+
<template
36+
v-if="$slots.subtitle"
37+
#subtitle
38+
>
39+
<slot name="subtitle" />
40+
</template>
41+
<template #content>
42+
<slot />
43+
</template>
44+
<template
45+
v-if="$slots.footer"
46+
#footer
47+
>
48+
<slot name="footer" />
49+
</template>
50+
</Card>
2651
</div>
2752
</Container>
2853
</template>

src/types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DataTableFilterMetaData } from 'primevue';
2-
import { MenuItem } from 'primevue/menuitem';
2+
import { MenuItem as PrimeVueMenuItem } from 'primevue/menuitem';
33
import type { LucideIcon } from 'lucide-vue-next';
44

55
export interface User {
@@ -13,7 +13,7 @@ export type PrimeVueDataFilters = {
1313
[key: string]: DataTableFilterMetaData;
1414
};
1515

16-
export interface ExtendedMenuItem extends MenuItem {
16+
export interface MenuItem extends PrimeVueMenuItem {
1717
route?: string;
1818
lucideIcon?: LucideIcon;
1919
}

src/views/Welcome.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script setup>
2+
import Container from '@/components/Container.vue';
23
import { useAuthStore } from '@/stores/auth';
34
import { LayoutGrid, LogIn, Settings, UserPlus } from 'lucide-vue-next';
45
@@ -7,14 +8,14 @@ await authStore.fetchUser();
78
</script>
89

910
<template>
10-
<main>
11-
<div class="h-screen flex items-center justify-center">
11+
<Container fluid>
12+
<div class="min-h-svh flex items-center justify-center">
1213
<Card pt:body:class="p-4 py-6 sm:p-12">
1314
<template #content>
1415
<div class="text-center md:text-left">
1516
<section>
16-
<span class="block text-6xl font-bold mb-1">Laravel API</span>
17-
<div class="text-6xl text-primary font-bold mb-4">
17+
<span class="block text-6xl font-bold text-red-500 dark:text-red-400 mb-1">Laravel API</span>
18+
<div class="text-6xl text-primary font-bold text-green-500 dark:text-green-400 mb-4">
1819
+ PrimeVue
1920
</div>
2021
<p class="mt-0 mb-2 text-muted-color leading-normal">
@@ -83,5 +84,5 @@ await authStore.fetchUser();
8384
</template>
8485
</Card>
8586
</div>
86-
</main>
87+
</COntainer>
8788
</template>

src/views/auth/ForgotPassword.vue

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,24 @@ onMounted(() => {
5353
</Message>
5454
</template>
5555

56-
<div class="mb-6 text-sm text-muted-color">
57-
Forgot your password? No problem. Just let us know your email address and we will email you a password reset
58-
link that will allow you to choose a new one.
59-
</div>
56+
<template #title>
57+
<div class="text-center">
58+
Forgot password
59+
</div>
60+
</template>
61+
62+
<template #subtitle>
63+
<div class="text-center">
64+
Enter your email address to receive a password reset link
65+
</div>
66+
</template>
6067

6168
<form
62-
class="space-y-6"
69+
class="space-y-6 sm:space-y-8"
6370
@submit.prevent="submit"
6471
>
6572
<div class="flex flex-col gap-2">
66-
<label for="email">Email</label>
73+
<label for="email">Email address</label>
6774
<InputText
6875
id="email"
6976
ref="email-input"
@@ -77,13 +84,25 @@ onMounted(() => {
7784
<InputErrors :errors="validationErrors?.email" />
7885
</div>
7986

80-
<div class="flex justify-end items-center">
87+
<div>
8188
<Button
8289
type="submit"
83-
label="Email Password Reset Link"
90+
label="Email password reset link"
8491
:loading="loading"
92+
fluid
8593
/>
8694
</div>
95+
96+
<div class="text-center">
97+
<span class="text-muted-color mr-1">Or, return to</span>
98+
<RouterLink :to="{ name: 'login' }">
99+
<Button
100+
class="p-0"
101+
variant="link"
102+
label="log in"
103+
/>
104+
</RouterLink>
105+
</div>
87106
</form>
88107
</GuestAuthLayout>
89108
</template>

0 commit comments

Comments
 (0)