Skip to content

Commit e928af7

Browse files
refactor: remove vite proxy & update vuetify to latest version
1 parent 3405ce4 commit e928af7

File tree

13 files changed

+865
-846
lines changed

13 files changed

+865
-846
lines changed

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
VITE_SERVER_URL=http://localhost:8000
2-
32
VITE_PUSHER_HOST=127.0.0.1
43
VITE_PUSHER_KEY=cbae043c3b6e2fdd4c12
54
VITE_PUSHER_CLUSTER=eu

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "vuetify-starter",
2+
"name": "vue-starter",
33
"version": "1.0.0",
44
"private": true,
55
"scripts": {
@@ -34,7 +34,7 @@
3434
"vue-chart-3": "^3.1.8",
3535
"vue-i18n": "^9.2.2",
3636
"vue-router": "^4.1.6",
37-
"vuetify": "^3.1.15",
37+
"vuetify": "^3.4.9",
3838
"webfontloader": "^1.6.28",
3939
"yup": "^1.1.1"
4040
},

src/components/auth/Heading.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<img
44
class="mb-3"
55
:src="`/${isDark ? 'logo-dark' : 'logo'}.png`"
6-
:width="isDark ? 60 : 120"
6+
:width="isDark ? 60 : 70"
77
alt="Logo"
88
/>
99
<h2 class="mb-2">{{ title }}</h2>

src/components/dashboard/bar/Bar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:ripple="false"
88
/>
99

10-
<v-toolbar-title text="Wakeb" class="text-uppercase text-medium-emphasis" />
10+
<v-toolbar-title text="Brand" class="text-uppercase text-medium-emphasis" />
1111

1212
<v-text-field
1313
v-if="lgAndUp"

src/components/dashboard/permissions/Create.vue

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/pages/dashboard/permissions.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<template>
22
<app-sheet title="Permissions" table class="pb-5">
3-
<template #actions>
4-
<v-btn @click="composer.add()" color="primary" rounded="pill">Create Permission</v-btn>
5-
</template>
6-
73
<v-data-table :headers="headers" :items="permissions">
84
<template #item.assigned_to="{ item }">
95
<v-chip v-for="role in item.raw.roles" color="primary" variant="tonal" class="mx-1">
@@ -32,7 +28,6 @@ import { ref, onMounted } from 'vue'
3228
import { useLoader } from '@/composables/useLoader'
3329
import axios from '@/plugins/axios'
3430
import useComposer from '@/hoc/useComposer.vue'
35-
import AppDashboardPermissionsCreate from '@/components/dashboard/permissions/Create.vue'
3631
3732
const composer = ref(null)
3833
const permissions = ref([])

src/plugins/axios.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@ import axios from 'axios'
22
import router from '../router'
33
import { useAppStore } from '@/stores/app'
44
import { useAuthStore } from '@/stores/auth'
5-
import { isDev } from '@/utils'
6-
7-
const env = import.meta.env
85

96
// Axios instance
107
const instance = axios.create({
11-
// We need to send requests to the front-end dev server
12-
// so the proxy can forward the requests to the backend host
13-
// in production, we'll send requests to the back-end directly.
14-
baseURL: `${isDev() ? '' : env.VITE_SERVER_URL}/api`,
8+
baseURL: `${import.meta.env.VITE_SERVER_URL}/api`,
159
headers: { 'X-Requested-With': 'XMLHttpRequest' },
10+
withXSRFToken: true,
1611
withCredentials: true,
1712
})
1813

src/plugins/laravel-echo.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Echo from 'laravel-echo'
22
import Pusher from 'pusher-js'
33
import axios from './axios'
4-
import { isDev } from '@/utils'
54

65
const env = import.meta.env
76

@@ -19,9 +18,8 @@ window.Echo = new Echo({
1918
// https://laravel.com/docs/10.x/sanctum#authorizing-private-broadcast-channels
2019
authorizer: (channel) => ({
2120
authorize: (socketId, callback) => {
22-
const prefix = isDev() ? '/@' : env.VITE_SERVER_URL
2321
axios
24-
.post(`${prefix}/broadcasting/auth`, {
22+
.post(`${env.VITE_SERVER_URL}/broadcasting/auth`, {
2523
socket_id: socketId,
2624
channel_name: channel.name,
2725
})

src/plugins/vuetify.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import 'vuetify/styles'
22
import '@mdi/font/css/materialdesignicons.css'
33
import { createVuetify } from 'vuetify'
4-
import { VDataTable } from 'vuetify/labs/VDataTable'
5-
import { VSkeletonLoader } from 'vuetify/labs/VSkeletonLoader'
64
import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n'
75
import { createI18n, useI18n } from 'vue-i18n'
86
import { loadFonts } from './webfontloader'
@@ -31,7 +29,6 @@ export const useVuetify = (app) => {
3129

3230
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
3331
const vuetify = createVuetify({
34-
components: { VDataTable, VSkeletonLoader },
3532
theme,
3633
locale: {
3734
adapter: createVueI18nAdapter({ i18n, useI18n }),

0 commit comments

Comments
 (0)