Convert frontend to Vue #3

Merged
jacob1123 merged 158 commits from vue into master 2022-02-08 22:20:11 +01:00
Showing only changes of commit 37a842b395 - Show all commits

24
web/src/main.ts Normal file
View File

@ -0,0 +1,24 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router/routes.js'
import { store, key } from './store/index.js'
import vuetify from './plugins/vuetify'
import { loadFonts } from './plugins/webfontloader'
import { SET_CURRENT_ACCOUNT, SET_CURRENT_BUDGET } from './store/action-types'
loadFonts()
const app = createApp(App)
app.use(router)
app.use(store, key)
app.use(vuetify)
app.mount('#app')
router.beforeEach(async (to, from, next) => {
await store.dispatch(SET_CURRENT_BUDGET, to.params.budgetid);
await store.dispatch(SET_CURRENT_ACCOUNT, {
accountid: to.params.accountid,
budgetid: to.params.budgetid
});
next();
})