render router-link in menu only if current route was matched by router, comment out fallback route

This commit is contained in:
Harald Bamberger
2026-07-06 10:52:53 +02:00
parent d1adc160ca
commit a06d7bbfec
2 changed files with 9 additions and 1 deletions
+5 -1
View File
@@ -9,6 +9,10 @@ export default {
}
},
methods: {
isRouterHandled() {
let isrouterhandled = this.$route.matched.length > 0;
return isrouterhandled;
},
isCompatLink() {
if(this.href === null) {
return false;
@@ -20,7 +24,7 @@ export default {
}
},
template: `
<router-link v-if="this.isCompatLink()"
<router-link v-if="this.isRouterHandled() && this.isCompatLink()"
:to="this.calcCompatRouterLink()"
>
<slot></slot>
+4
View File
@@ -252,6 +252,9 @@ const router = VueRouter.createRouter({
component: FhcDashboard,
props: {dashboard: 'CIS'},
},
/*
* TODO(ma0080): 2026-07-06: commented out => check if needed
*
{
path: '/:pathMatch(.*)*',
name: 'Fallback',
@@ -266,6 +269,7 @@ const router = VueRouter.createRouter({
};
},
},
*/
{
path: `/Cis/Zeitsperren`,
name: 'Zeitsperren',