PASSAGGIO A VITE !

AGG. 1.1.23
This commit is contained in:
Surya Paolo
2025-03-01 14:14:43 +01:00
parent f0098e57b2
commit bc960d38a1
1044 changed files with 5323 additions and 10823777 deletions

View File

@@ -8,6 +8,8 @@
import { boot } from 'quasar/wrappers'
import { useGlobalStore } from '@src/store/globalStore';
import { useUserStore } from '@src/store/UserStore';
import { tools } from '@src/store/Modules/tools';
export default boot(({ app, router }) => {
// ******************************************
@@ -19,13 +21,19 @@ export default boot(({ app, router }) => {
// the subsequent Middleware function.
router.beforeEach((to, from, next) => {
console.log('beforeEach ROUTER')
console.log('beforeEach ROUTER', from, to )
// Execute your command before each navigation
// executeCommand();
const globalStore = useGlobalStore()
const userStore = useUserStore()
try {
globalStore.editOn = false
if (userStore.isLogged && from.path !== to.path) {
// console.log('globalStore.editOn = false (prima era = ', globalStore.editOn, ')')
const pageKey = to.path
// console.log('pagek=', pageKey)
globalStore.editOn = tools.getCookie('edn_' + pageKey, '0') === '1'
}
} catch(e) {
}