Files
myprojplanet_vite/src/router/permission.ts

31 lines
872 B
TypeScript
Raw Normal View History

2021-08-31 18:09:59 +02:00
import { useGlobalStore } from '@store/globalStore'
import { static_data } from '@src/db/static_data'
import { useProgressBar } from '@store/Modules/ProgressBar'
import { tools } from '@store/Modules/tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useNotifStore } from '@store/NotifStore'
2021-08-31 18:09:59 +02:00
const progressBar = useProgressBar()
const getRouteData = async (to: any) => {
if (!to.meta.transparent) {
progressBar.start()
}
const titleToDisplay: any = await to.meta.asyncData(to)
}
const $router = useRouter()
// router().beforeEach(async (to: IMyRoute, from: IMyRoute, next) => {
// const getRouteData = async (to: IMyRoute | IMyRouteRecord) => {
/*
router().afterEach(async (from: IMyRoute, next) => {
progressBar.finish()
// AlertsStore.mutations.hideAlert()
// EventBus.$emit('closePopups')
})
*/