1
0
Fork 0

chore(webui): Migrate to Quasar 2.x and Vue.js 3.x

This commit is contained in:
Andi Sardina Ramos 2024-02-26 16:02:04 +02:00 committed by GitHub
parent 153765f99f
commit f7edb394f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 4374 additions and 7999 deletions

View file

@ -1,8 +1,8 @@
import { APP } from '../_helpers/APP'
import Boot from '../_middleware/Boot'
export default async ({ app, router, store, Vue }) => {
Vue.use(Boot)
export default async ({ app, router, store }) => {
app.use(Boot)
APP.root = app
APP.router = router

View file

@ -1,10 +1,14 @@
import { APP } from '../_helpers/APP'
import errors from '../_helpers/Errors'
import resize from '../_directives/resize'
export default async ({ app, router }) => {
// Directives
app.directive('resize', resize)
export default async ({ Vue }) => {
// Router
// ----------------------------------------------
APP.router.beforeEach(async (to, from, next) => {
router.beforeEach(async (to, from, next) => {
// Set APP
APP.routeTo = to
APP.routeFrom = from

View file

@ -1,12 +1,16 @@
import { boot } from 'quasar/wrappers'
import axios from 'axios'
import { APP } from '../_helpers/APP'
// Set config defaults when creating the instance
const API = axios.create({
const api = axios.create({
baseURL: APP.config.apiUrl
})
export default async ({ app, Vue }) => {
Vue.prototype.$api = app.api = APP.api = API
}
export default boot(({ app }) => {
app.config.globalProperties.$axios = axios
app.config.globalProperties.$api = api
APP.api = api
})
export { api }