mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
fix: opening links in the sidebar
added `base_path` variable
This commit is contained in:
parent
728166bd1a
commit
91719fac23
1 changed files with 8 additions and 6 deletions
|
@ -45,27 +45,27 @@
|
||||||
return {
|
return {
|
||||||
tabs: [
|
tabs: [
|
||||||
{
|
{
|
||||||
key: '/panel/',
|
key: 'panel/',
|
||||||
icon: 'dashboard',
|
icon: 'dashboard',
|
||||||
title: '{{ i18n "menu.dashboard"}}'
|
title: '{{ i18n "menu.dashboard"}}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '/panel/inbounds',
|
key: 'panel/inbounds',
|
||||||
icon: 'user',
|
icon: 'user',
|
||||||
title: '{{ i18n "menu.inbounds"}}'
|
title: '{{ i18n "menu.inbounds"}}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '/panel/settings',
|
key: 'panel/settings',
|
||||||
icon: 'setting',
|
icon: 'setting',
|
||||||
title: '{{ i18n "menu.settings"}}'
|
title: '{{ i18n "menu.settings"}}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '/panel/xray',
|
key: 'panel/xray',
|
||||||
icon: 'tool',
|
icon: 'tool',
|
||||||
title: '{{ i18n "menu.xray"}}'
|
title: '{{ i18n "menu.xray"}}'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '/logout/',
|
key: 'logout/',
|
||||||
icon: 'logout',
|
icon: 'logout',
|
||||||
title: '{{ i18n "menu.logout"}}'
|
title: '{{ i18n "menu.logout"}}'
|
||||||
},
|
},
|
||||||
|
@ -79,7 +79,9 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openLink(key) {
|
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() {
|
closeDrawer() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
|
Loading…
Reference in a new issue