Notification: Set a new Friendship and Accepted Friendship

This commit is contained in:
Paolo Arena
2022-07-26 15:46:29 +02:00
parent e2006e683b
commit 43619ec719
15 changed files with 78 additions and 39 deletions

View File

@@ -29,10 +29,9 @@ export default defineComponent({
const myroutes = ref(<IListRoutes[]>[])
function getmenu(): any {
// console.log('getmenu menuOne!')
return globalStore.getmenu
}
const getmenu = computed(() => globalStore.getmenu )
const islogged = computed(() => userStore.isLogged)
function setParentVisibilityBasedOnRoute(parent: any) {
parent.routes.forEach((item: any) => {
@@ -42,19 +41,26 @@ export default defineComponent({
})
}
watch(() => userStore.isLogged || finishLoading.value,(to, from) => {
myroutes.value = []
myroutes.value = static_data.routes
})
watch(() => path, (to, from) => {
function updatemenu() {
const mymenu = globalStore.getmenu
// console.log('watch:', mymenu)
Object.keys(mymenu).forEach((parentName: any) => {
// console.log('parentName', parentName)
// @ts-ignore
setParentVisibilityBasedOnRoute(mymenu[parentName])
})
myroutes.value = []
myroutes.value = static_data.routes
}
watch(() => islogged.value,(to, from) => {
updatemenu()
})
watch(() => finishLoading.value,(to, from) => {
updatemenu()
})
watch(() => path, (to, from) => {
updatemenu()
})
/* function replaceUnderlineToSpace(text: string) {