diff options
| author | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-03-30 18:02:05 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-30 18:02:05 +0300 |
| commit | 127bea7f73953f63c6a93cc49dcc665632e2b9ae (patch) | |
| tree | 97c5079f5d9e2e439e4fa1d6b445d782863e05a3 | |
| parent | 7c58bcbb46f73f5307a955ef097002ebbc5fe4fd (diff) | |
fix: opening links in the sidebar
| -rw-r--r-- | web/html/xui/component/aSidebar.html | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/web/html/xui/component/aSidebar.html b/web/html/xui/component/aSidebar.html index 0ddaa176..dfaebb17 100644 --- a/web/html/xui/component/aSidebar.html +++ b/web/html/xui/component/aSidebar.html @@ -45,27 +45,27 @@ return { tabs: [ { - key: '/panel/', + key: 'panel/', icon: 'dashboard', title: '{{ i18n "menu.dashboard"}}' }, { - key: '/panel/inbounds', + key: 'panel/inbounds', icon: 'user', title: '{{ i18n "menu.inbounds"}}' }, { - key: '/panel/settings', + key: 'panel/settings', icon: 'setting', title: '{{ i18n "menu.settings"}}' }, { - key: '/panel/xray', + key: 'panel/xray', icon: 'tool', title: '{{ i18n "menu.xray"}}' }, { - key: '/logout/', + key: 'logout/', icon: 'logout', title: '{{ i18n "menu.logout"}}' }, @@ -79,7 +79,9 @@ }, methods: { openLink(key) { - return key.startsWith('http') ? window.open(key) : location.href = key + return key.startsWith('http') ? + window.open(`{{ .base_path }}${key}`) : + location.href = `{{ .base_path }}${key}` }, closeDrawer() { this.visible = false; |
