Move to appConfig, Vuetify 3
This commit is contained in:
@@ -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)
|
||||
})
|
||||
@@ -1,12 +0,0 @@
|
||||
import { Screen } from 'quasar'
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
Screen.setSizes({
|
||||
sm: 601,
|
||||
md: 996,
|
||||
lg: 1281,
|
||||
xl: 1921,
|
||||
})
|
||||
|
||||
Screen.setDebounce(0)
|
||||
})
|
||||
@@ -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))
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user