diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-04-11 15:11:04 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-04-11 15:11:04 +0300 |
| commit | 7412bf17a927df4715b65962de5f683dade83395 (patch) | |
| tree | 9a2ae08341c95ff8aa75c84c9b5c823cdb0c921a /web/html/xui | |
| parent | 519f2b462ee3340c959c57f5f92319dc011833e6 (diff) | |
bug fix
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/xui')
| -rw-r--r-- | web/html/xui/inbound_info_modal.html | 2 | ||||
| -rw-r--r-- | web/html/xui/index.html | 52 |
2 files changed, 37 insertions, 17 deletions
diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html index 1ba15b08..1b05a12c 100644 --- a/web/html/xui/inbound_info_modal.html +++ b/web/html/xui/inbound_info_modal.html @@ -240,7 +240,7 @@ return infoModal.dbInbound.isEnable; }, get subBase() { - return window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port:"") + "/sub/"; + return window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port:"") + basePath + "sub/"; }, get tgBase() { return "https://t.me/" diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 5a80989c..320422e3 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -76,6 +76,25 @@ <a-row> <a-col :sm="24" :md="12"> <a-card hoverable :class="siderDrawer.isDarkTheme ? darkClass : ''"> + 3x-ui: <a href="https://github.com/MHSanaei/3x-ui/releases" target="_blank"><a-tag color="green">v{{ .cur_ver }}</a-tag></a> + Xray: <a-tag color="green" style="cursor: pointer;" @click="openSelectV2rayVersion">v[[ status.xray.version ]]</a-tag> + Telegram: <a href="https://t.me/panel3xui" target="_blank"><a-tag color="green">@panel3xui</a-tag></a> + </a-card> + </a-col> + <a-col :sm="24" :md="12"> + <a-card hoverable :class="siderDrawer.isDarkTheme ? darkClass : ''"> + {{ i18n "pages.index.operationHours" }}: + <a-tag color="green">[[ formatSecond(status.uptime) ]]</a-tag> + <a-tooltip> + <template slot="title"> + {{ i18n "pages.index.operationHoursDesc" }} + </template> + <a-icon type="question-circle" theme="filled"></a-icon> + </a-tooltip> + </a-card> + </a-col> + <a-col :sm="24" :md="12"> + <a-card hoverable :class="siderDrawer.isDarkTheme ? darkClass : ''"> {{ i18n "pages.index.xrayStatus" }}: <a-tag :color="status.xray.color">[[ status.xray.state ]]</a-tag> <a-tooltip v-if="status.xray.state === State.Error"> @@ -84,7 +103,6 @@ </template> <a-icon type="question-circle" theme="filled"></a-icon> </a-tooltip> - <a-tag color="green" style="cursor: pointer;" @click="openSelectV2rayVersion">[[ status.xray.version ]]</a-tag> <a-tag color="blue" style="cursor: pointer;" @click="stopXrayService">{{ i18n "pages.index.stopXray" }}</a-tag> <a-tag color="blue" style="cursor: pointer;" @click="restartXrayService">{{ i18n "pages.index.restartXray" }}</a-tag> <a-tag color="blue" style="cursor: pointer;" @click="openSelectV2rayVersion">{{ i18n "pages.index.xraySwitch" }}</a-tag> @@ -92,14 +110,10 @@ </a-col> <a-col :sm="24" :md="12"> <a-card hoverable :class="siderDrawer.isDarkTheme ? darkClass : ''"> - {{ i18n "pages.index.operationHours" }}: - <a-tag color="green">[[ formatSecond(status.uptime) ]]</a-tag> - <a-tooltip> - <template slot="title"> - {{ i18n "pages.index.operationHoursDesc" }} - </template> - <a-icon type="question-circle" theme="filled"></a-icon> - </a-tooltip> + {{ i18n "menu.link" }}: + <a-tag color="blue" style="cursor: pointer;" @click="openLogs(20)">Log Reports</a-tag> + <a-tag color="blue" style="cursor: pointer;" @click="openConfig">Config</a-tag> + <a-tag color="blue" style="cursor: pointer;" @click="getBackup">Backup</a-tag> </a-card> </a-col> <a-col :sm="24" :md="12"> @@ -170,13 +184,6 @@ </a-row> </a-card> </a-col> - <a-col :sm="24" :md="12"> - <a-card hoverable :class="siderDrawer.isDarkTheme ? darkClass : ''"> - 3x-ui: <a href="https://github.com/MHSanaei/3x-ui/releases" target="_blank"><a-tag color="green">v{{ .cur_ver }}</a-tag></a> - <a href="https://t.me/panel3xui" target="_blank"><a-tag color="green">Telegram</a-tag></a> - <a-tag color="blue" style="cursor: pointer;" @click="openLogs(20)">Log Reports</a-tag> - </a-card> - </a-col> </a-row> </transition> </a-layout-content> @@ -226,6 +233,7 @@ </a-modal> </a-layout> {{template "js" .}} +{{template "textModal"}} <script> const State = { @@ -406,6 +414,18 @@ return; } logModal.show(msg.obj,rows); + }, + async openConfig(){ + this.loading(true); + const msg = await HttpUtil.post('server/getConfigJson'); + this.loading(false); + if (!msg.success) { + return; + } + txtModal.show('config.json',JSON.stringify(msg.obj, null, 2),'config.json'); + }, + getBackup(){ + window.location = basePath + 'server/getDb'; } }, async mounted() { |
