Use matcher for user menu

This commit is contained in:
Grzegorz Leoniec 2019-01-14 16:07:42 +01:00
parent 989a723d4d
commit c9008a23cb
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377

View File

@ -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
}