Fix language dropdown

This commit is contained in:
Chocobozzz 2022-12-28 14:12:24 +01:00
parent dfc20e90df
commit 71029c7955
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 8 deletions

View File

@ -62,14 +62,8 @@
this.showMenu = !this.showMenu; this.showMenu = !this.showMenu;
}, },
buildLanguageRoute(locale: string | number) { buildLanguageRoute (locale: string | number) {
const paths = this.$route.fullPath.split('/') return '/' + locale
if (paths.length > 0 && Object.prototype.hasOwnProperty.call(this.availableLanguages, paths[0])) {
return '/' + locale + '/' + paths.slice(1).join('/')
}
return '/' + locale + this.$route.fullPath
} }
} }
}) })
@ -85,6 +79,7 @@
} }
.menu { .menu {
z-index: 10;
background-color: #fff; background-color: #fff;
background-clip: padding-box; background-clip: padding-box;
border: 1px solid rgba(0,0,0,.15); border: 1px solid rgba(0,0,0,.15);