Move to appConfig, Vuetify 3

This commit is contained in:
2024-01-27 19:17:30 +03:00
parent 4ac1fd9574
commit 1f7c8f0ed4
29 changed files with 1329 additions and 1323 deletions
-15
View File
@@ -1,15 +0,0 @@
import { library, config } from '@fortawesome/fontawesome-svg-core'
import { fab } from '@fortawesome/free-brands-svg-icons'
import { fas } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
// Add icon packs.
library.add(fab, fas)
// Let Nuxt manage CSS.
config.autoAddCss = false
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.component('FontAwesomeIcon', FontAwesomeIcon)
})
-12
View File
@@ -1,12 +0,0 @@
import { Screen } from 'quasar'
export default defineNuxtPlugin(() => {
Screen.setSizes({
sm: 601,
md: 996,
lg: 1281,
xl: 1921,
})
Screen.setDebounce(0)
})
-31
View File
@@ -1,31 +0,0 @@
import type { Router } from 'vue-router'
interface CustomRouter extends Router {
running?: boolean
nextRoute?: string | null
}
export default defineNuxtPlugin((nuxtApp) => {
const customRouter: CustomRouter = useRouter()
nuxtApp.hook('page:start', () => {
customRouter.running = false
customRouter.beforeEach((to, _from, next) => {
if (customRouter.running) {
next(true)
} else {
customRouter.nextRoute = to.fullPath
next(false)
}
})
})
nuxtApp.hook('page:transition:finish', () => {
customRouter.running = true
if (customRouter.nextRoute) {
customRouter
.push(customRouter.nextRoute)
.then(() => (customRouter.nextRoute = null))
}
})
})