Skip to content

Commit 69a4cad

Browse files
committed
inertiajs upgrade to 1.0
1 parent 486c09a commit 69a4cad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+140
-72
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
"build": "vite build"
66
},
77
"devDependencies": {
8-
"@inertiajs/inertia": "^0.11.0",
9-
"@inertiajs/inertia-vue3": "^0.6.0",
10-
"@inertiajs/progress": "^0.2.7",
118
"@mdi/js": "^7.0.96",
129
"@tailwindcss/forms": "^0.5.2",
1310
"@tailwindcss/line-clamp": "^0.4.0",
@@ -23,5 +20,8 @@
2320
"tailwindcss": "^3.1.0",
2421
"vite": "^3.0.0",
2522
"vue": "^3.2.31"
23+
},
24+
"dependencies": {
25+
"@inertiajs/vue3": "^1.0.0"
2626
}
2727
}

resources/js/Components/Admin/MenuItemList.vue

Whitespace-only changes.

resources/js/Components/Admin/Pagination.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { Link } from '@inertiajs/inertia-vue3'
2+
import { Link } from '@inertiajs/vue3'
33
44
defineProps({
55
data: {

resources/js/Components/Admin/Sort.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup>
22
import { ref, computed } from "vue"
3-
import { Link } from "@inertiajs/inertia-vue3"
3+
import { Link } from "@inertiajs/vue3"
44
55
const props = defineProps({
66
label: {

resources/js/Components/AsideMenuItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup>
22
import { ref, computed } from 'vue'
3-
import { Link } from '@inertiajs/inertia-vue3'
3+
import { Link } from '@inertiajs/vue3'
44
import { useStyleStore } from '@/Stores/style.js'
55
import { mdiMinus, mdiPlus } from '@mdi/js'
66
import { getButtonColor } from '@/colors.js'

resources/js/Components/AsideMenuLayer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { Inertia } from '@inertiajs/inertia'
2+
import { router } from '@inertiajs/vue3'
33
import { mdiLogout, mdiClose } from '@mdi/js'
44
import { computed } from 'vue'
55
import { useLayoutStore } from '@/Stores/layout.js'
@@ -28,7 +28,7 @@ const logoutItem = computed(() => ({
2828
}))
2929
3030
const logoutItemClick = () => {
31-
Inertia.post(route('logout'))
31+
router.post(route('logout'))
3232
}
3333
3434
const menuClick = (event, item) => {

resources/js/Components/BaseButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup>
22
import { computed } from 'vue'
3-
import { Link } from '@inertiajs/inertia-vue3'
3+
import { Link } from '@inertiajs/vue3'
44
import { getButtonColor } from '@/colors.js'
55
import BaseIcon from '@/Components/BaseIcon.vue'
66

resources/js/Components/DropdownLink.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { Link } from '@inertiajs/inertia-vue3';
2+
import { Link } from '@inertiajs/vue3';
33
</script>
44

55
<template>

resources/js/Components/FormValidationErrors.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup>
22
import { computed } from 'vue'
3-
import { usePage } from '@inertiajs/inertia-vue3'
3+
import { usePage } from '@inertiajs/vue3'
44
import NotificationBarInCard from '@/Components/NotificationBarInCard.vue'
55
6-
const errors = computed(() => usePage().props.value.errors)
6+
const errors = computed(() => usePage().props.errors)
77
88
const hasErrors = computed(() => Object.keys(errors.value).length > 0)
99
</script>

resources/js/Components/NavBar.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup>
2-
import { usePage } from '@inertiajs/inertia-vue3'
3-
import { Inertia } from '@inertiajs/inertia'
2+
import { usePage, router } from '@inertiajs/vue3'
43
import { computed, ref } from 'vue'
54
import { containerMaxW } from '@/config.js'
65
import { useMainStore } from '@/Stores/main.js'
@@ -32,7 +31,7 @@ import NavBarSearch from '@/Components/NavBarSearch.vue'
3231
3332
const mainStore = useMainStore()
3433
35-
const userName = computed(() => usePage().props.value.auth.user.name)
34+
const userName = computed(() => usePage().props.auth.user.name)
3635
3736
const styleStore = useStyleStore()
3837
@@ -53,7 +52,7 @@ const menuOpenLg = () => {
5352
}
5453
5554
const logout = () => {
56-
Inertia.post(route('logout'))
55+
router.post(route('logout'))
5756
}
5857
</script>
5958

0 commit comments

Comments
 (0)