mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Use matcher for user menu
This commit is contained in:
parent
989a723d4d
commit
c9008a23cb
@ -43,7 +43,7 @@
|
||||
{{ $t('login.hello') }} <b>{{ user.name }}</b>
|
||||
<ds-menu
|
||||
:routes="routes"
|
||||
:is-exact="isExact"
|
||||
:matcher="matcher"
|
||||
>
|
||||
<ds-menu-item
|
||||
slot="Navigation"
|
||||
@ -124,10 +124,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isExact(url) {
|
||||
matcher(url, route) {
|
||||
if (url.indexOf('/profile') === 0) {
|
||||
// do only match own profile
|
||||
this.$route.path === url
|
||||
return this.$route.path === url
|
||||
}
|
||||
return this.$route.path.indexOf(url) === 0
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user