project nearly finished. TODO Next : Project page and refine some text

This commit is contained in:
2023-05-29 19:50:07 +02:00
parent 3be7a4adfd
commit ff3ea2cdcd
62 changed files with 6197 additions and 1313 deletions

36
src/stores/burger.js Normal file
View File

@@ -0,0 +1,36 @@
import { defineStore } from 'pinia'
import router from '@/router'
export const useBurgerStore = defineStore('Burger', {
state: () => ({
checked: false,
}),
actions:
{
toggle(){
if (this.checked){
this.unCheck()
}
else{
this.check()
}
//console.log("checked by toggle ? : " + this.checked)
if (this.checked){
router.push({name:'whoAmI'})
}
else {
router.push({name:'home'})
}
},
unCheck(){
this.checked = false;
//console.log("checked ? : " + this.checked)
},
check(){
this.checked = true;
//console.log("checked ? : " + this.checked)
}
}
})