Skip to content

Commit 160f06d

Browse files
authored
Merge pull request #16 from connorabbas/develop
Vue 3.5, component rename
2 parents 447ee9c + 01128d6 commit 160f06d

13 files changed

+161
-119
lines changed

package-lock.json

Lines changed: 124 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
"tailwindcss": "^3.4.4",
1919
"tailwindcss-primeui": "^0.3.2",
2020
"vite": "^5.0",
21-
"vue": "^3.4.0"
21+
"vue": "^3.5.0"
2222
}
2323
}

resources/js/Components/LinksMenu.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
<script setup>
2-
import { ref } from 'vue';
2+
import { useTemplateRef } from 'vue';
33
import Menu from 'primevue/menu';
44
5-
const childRef = ref(null);
6-
5+
const childRef = useTemplateRef('child-ref');
76
defineExpose({
87
childRef,
98
});
109
</script>
1110

1211
<template>
13-
<Menu ref="childRef">
12+
<Menu ref="child-ref">
1413
<template #item="{ item, props }">
1514
<Link
1615
v-if="item.route"

resources/js/Components/LinksMenuBar.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
<script setup>
2-
import { ref } from 'vue';
2+
import { useTemplateRef } from 'vue';
33
import Menubar from 'primevue/menubar';
44
5-
const childRef = ref(null);
6-
5+
const childRef = useTemplateRef('child-ref');
76
defineExpose({
87
childRef,
98
});
109
</script>
1110

1211
<template>
13-
<Menubar ref="childRef">
12+
<Menubar ref="child-ref">
1413
<template v-if="$slots.start" #start>
1514
<slot name="start"></slot>
1615
</template>

resources/js/Layouts/AuthenticatedLayout.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<script setup>
2-
import { ref, onMounted, onUnmounted, watchEffect } from 'vue';
2+
import { ref, useTemplateRef, onMounted, onUnmounted, watchEffect } from 'vue';
33
import { useForm } from '@inertiajs/vue3';
44
import Drawer from 'primevue/drawer';
55
import Toast from 'primevue/toast';
66
import ApplicationLogo from '@/Components/ApplicationLogo.vue';
77
import Container from '@/Components/Container.vue';
88
import LinksMenu from '@/Components/LinksMenu.vue';
99
import LinksMenuBar from '@/Components/LinksMenuBar.vue';
10-
import NestedLinksMenu from '@/Components/NestedLinksMenu.vue';
10+
import LinksPanelMenu from '@/Components/LinksPanelMenu.vue';
1111
import ToggleThemeButton from '@/Components/ToggleThemeButton.vue';
1212
1313
const currentRoute = route().current();
14+
const logoutForm = useForm({});
1415
function logout() {
1516
logoutForm.post(route('logout'));
1617
}
@@ -25,8 +26,7 @@ const mainMenuItems = [
2526
];
2627
2728
// User menu (desktop)
28-
const logoutForm = useForm({});
29-
const userMenu = ref(null);
29+
const userMenu = useTemplateRef('user-menu');
3030
const userMenuItems = [
3131
{
3232
label: 'Profile',
@@ -124,7 +124,7 @@ watchEffect(() => {
124124
<LinksMenu
125125
:model="userMenuItems"
126126
popup
127-
ref="userMenu"
127+
ref="user-menu"
128128
class="shadow"
129129
/>
130130
<Button
@@ -170,7 +170,7 @@ watchEffect(() => {
170170
>
171171
Home
172172
</p>
173-
<NestedLinksMenu
173+
<LinksPanelMenu
174174
:model="homeMobileMenuItems"
175175
class="w-full"
176176
/>

resources/js/Pages/Auth/ForgotPassword.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { ref, onMounted } from 'vue';
2+
import { useTemplateRef, onMounted } from 'vue';
33
import { useForm } from '@inertiajs/vue3';
44
import Message from 'primevue/message';
55
import GuestLayout from '@/Layouts/GuestLayout.vue';
@@ -11,7 +11,7 @@ defineProps({
1111
},
1212
});
1313
14-
const emailInput = ref(null);
14+
const emailInput = useTemplateRef('email-input');
1515
1616
const form = useForm({
1717
email: '',
@@ -47,7 +47,7 @@ onMounted(() => {
4747
<label for="email" class="block mb-2">Email</label>
4848
<InputText
4949
required
50-
ref="emailInput"
50+
ref="email-input"
5151
id="email"
5252
type="email"
5353
v-model="form.email"

resources/js/Pages/Auth/Login.vue

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { ref, onMounted } from 'vue';
2+
import { useTemplateRef, onMounted } from 'vue';
33
import { useForm } from '@inertiajs/vue3';
44
import Checkbox from 'primevue/checkbox';
55
import Message from 'primevue/message';
@@ -15,7 +15,7 @@ defineProps({
1515
},
1616
});
1717
18-
const emailInput = ref(null);
18+
const emailInput = useTemplateRef('email-input');
1919
2020
const form = useForm({
2121
email: '',
@@ -39,11 +39,7 @@ onMounted(() => {
3939
<Head title="Log in" />
4040

4141
<template #message v-if="status">
42-
<Message
43-
severity="success"
44-
:closable="false"
45-
class="shadow"
46-
>
42+
<Message severity="success" :closable="false" class="shadow">
4743
{{ status }}
4844
</Message>
4945
</template>
@@ -53,7 +49,7 @@ onMounted(() => {
5349
<label for="email" class="block mb-2">Email</label>
5450
<InputText
5551
required
56-
ref="emailInput"
52+
ref="email-input"
5753
id="email"
5854
type="email"
5955
v-model="form.email"

resources/js/Pages/Auth/Register.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { ref, onMounted } from 'vue';
2+
import { useTemplateRef, onMounted } from 'vue';
33
import { useForm } from '@inertiajs/vue3';
44
import GuestLayout from '@/Layouts/GuestLayout.vue';
55
import InputError from '@/Components/InputError.vue';
@@ -11,7 +11,7 @@ const form = useForm({
1111
password_confirmation: '',
1212
});
1313
14-
const nameInput = ref(null);
14+
const nameInput = useTemplateRef('name-input');
1515
1616
const submit = () => {
1717
form.post(route('register'), {
@@ -32,7 +32,7 @@ onMounted(() => {
3232
<div class="mb-6">
3333
<label for="name" class="block mb-2">Name</label>
3434
<InputText
35-
ref="nameInput"
35+
ref="name-input"
3636
id="name"
3737
type="text"
3838
v-model="form.name"

resources/js/Pages/Auth/ResetPassword.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { ref, onMounted } from 'vue';
2+
import { useTemplateRef, onMounted } from 'vue';
33
import { useForm } from '@inertiajs/vue3';
44
import GuestLayout from '@/Layouts/GuestLayout.vue';
55
import InputError from '@/Components/InputError.vue';
@@ -15,7 +15,7 @@ const props = defineProps({
1515
},
1616
});
1717
18-
const emailInput = ref(null);
18+
const emailInput = useTemplateRef('email-input');
1919
2020
const form = useForm({
2121
token: props.token,
@@ -43,7 +43,7 @@ onMounted(() => {
4343
<div class="mb-6">
4444
<label for="email" class="block mb-2">Email</label>
4545
<InputText
46-
ref="emailInput"
46+
ref="email-input"
4747
id="email"
4848
type="email"
4949
v-model="form.email"

resources/js/Pages/Profile/Partials/DeleteUserForm.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script setup>
2-
import { ref, watch, nextTick } from 'vue';
2+
import { ref, useTemplateRef, watch, nextTick } from 'vue';
33
import { useForm } from '@inertiajs/vue3';
44
import Dialog from 'primevue/dialog';
55
import InputError from '@/Components/InputError.vue';
66
7-
const passwordInput = ref(null);
7+
const passwordInput = useTemplateRef('password-input');
88
const modalOpen = ref(false);
99
1010
const form = useForm({
@@ -52,7 +52,7 @@ watch(modalOpen, (newModalOpen) => {
5252
<InputText
5353
required
5454
id="password"
55-
ref="passwordInput"
55+
ref="password-input"
5656
type="password"
5757
placeholder="Password"
5858
v-model="form.password"

resources/js/Pages/Profile/Partials/UpdatePasswordForm.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script setup>
2-
import { ref } from 'vue';
2+
import { useTemplateRef } from 'vue';
33
import { useForm } from '@inertiajs/vue3';
44
import { useToast } from 'primevue/usetoast';
55
import InputError from '@/Components/InputError.vue';
66
7-
const currentPasswordInput = ref(null);
8-
const passwordInput = ref(null);
7+
const currentPasswordInput = useTemplateRef('current-password-input');
8+
const passwordInput = useTemplateRef('password-input');
99
1010
const toast = useToast();
1111
const form = useForm({
@@ -61,7 +61,7 @@ const updatePassword = () => {
6161
<InputText
6262
required
6363
id="current_password"
64-
ref="currentPasswordInput"
64+
ref="current-password-input"
6565
type="password"
6666
v-model="form.current_password"
6767
class="w-full"
@@ -79,7 +79,7 @@ const updatePassword = () => {
7979
<InputText
8080
required
8181
id="password"
82-
ref="passwordInput"
82+
ref="password-input"
8383
type="password"
8484
v-model="form.password"
8585
class="w-full"

resources/js/Pages/Profile/Partials/UpdateProfileInformationForm.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { ref, onMounted } from 'vue';
2+
import { useTemplateRef, onMounted } from 'vue';
33
import { useForm, usePage } from '@inertiajs/vue3';
44
import { useToast } from 'primevue/usetoast';
55
import Message from 'primevue/message';
@@ -14,7 +14,7 @@ defineProps({
1414
},
1515
});
1616
17-
const nameInput = ref(null);
17+
const nameInput = useTemplateRef('name-input');
1818
1919
const user = usePage().props.auth.user;
2020
const toast = useToast();
@@ -59,7 +59,7 @@ onMounted(() => {
5959
<label for="name" class="block mb-2">Name</label>
6060
<InputText
6161
required
62-
ref="nameInput"
62+
ref="name-input"
6363
id="name"
6464
type="text"
6565
v-model="form.name"

0 commit comments

Comments
 (0)