fix: current tab highlight in sidebar (#2874)

This commit is contained in:
Shishkevich D. 2025-04-07 08:28:02 +07:00 committed by GitHub
parent 3ded4ee658
commit 520f7a2d15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,27 +45,27 @@
return { return {
tabs: [ tabs: [
{ {
key: 'panel/', key: '{{ .base_path }}panel/',
icon: 'dashboard', icon: 'dashboard',
title: '{{ i18n "menu.dashboard"}}' title: '{{ i18n "menu.dashboard"}}'
}, },
{ {
key: 'panel/inbounds', key: '{{ .base_path }}panel/inbounds',
icon: 'user', icon: 'user',
title: '{{ i18n "menu.inbounds"}}' title: '{{ i18n "menu.inbounds"}}'
}, },
{ {
key: 'panel/settings', key: '{{ .base_path }}panel/settings',
icon: 'setting', icon: 'setting',
title: '{{ i18n "menu.settings"}}' title: '{{ i18n "menu.settings"}}'
}, },
{ {
key: 'panel/xray', key: '{{ .base_path }}panel/xray',
icon: 'tool', icon: 'tool',
title: '{{ i18n "menu.xray"}}' title: '{{ i18n "menu.xray"}}'
}, },
{ {
key: 'logout/', key: '{{ .base_path }}logout/',
icon: 'logout', icon: 'logout',
title: '{{ i18n "menu.logout"}}' title: '{{ i18n "menu.logout"}}'
}, },
@ -80,8 +80,8 @@
methods: { methods: {
openLink(key) { openLink(key) {
return key.startsWith('http') ? return key.startsWith('http') ?
window.open(`{{ .base_path }}${key}`) : window.open(key) :
location.href = `{{ .base_path }}${key}` location.href = key
}, },
closeDrawer() { closeDrawer() {
this.visible = false; this.visible = false;