Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/html/xui/index.html')
-rw-r--r--web/html/xui/index.html47
1 files changed, 41 insertions, 6 deletions
diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index b8a1e4b5..713d5b7e 100644
--- a/web/html/xui/index.html
+++ b/web/html/xui/index.html
@@ -84,16 +84,18 @@
</template>
<a-icon type="question-circle" theme="filled"></a-icon>
</a-tooltip>
- <a-tag color="green" @click="openSelectV2rayVersion">[[ status.xray.version ]]</a-tag>
- <a-tag color="blue" @click="stopXrayService">{{ i18n "pages.index.stopXray" }}</a-tag>
- <a-tag color="blue" @click="restartXrayService">{{ i18n "pages.index.restartXray" }}</a-tag>
- <a-tag color="blue" @click="openSelectV2rayVersion">{{ i18n "pages.index.xraySwitch" }}</a-tag>
+ <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>
</a-card>
</a-col>
<a-col :sm="24" :md="12">
<a-card hoverable :class="siderDrawer.isDarkTheme ? darkClass : ''">
+ x-ui: <a-tag color="green">{{ .cur_ver }}</a-tag>
+ <a-tag color="blue" style="cursor: pointer;" @click="openLogs">Logs</a-tag>
{{ i18n "pages.index.operationHours" }}:
- <a-tag color="#87d068">[[ formatSecond(status.uptime) ]]</a-tag>
+ <a-tag color="green">[[ formatSecond(status.uptime) ]]</a-tag>
<a-tooltip>
<template slot="title">
{{ i18n "pages.index.operationHoursDesc" }}
@@ -177,7 +179,7 @@
<a-modal id="version-modal" v-model="versionModal.visible" title='{{ i18n "pages.index.xraySwitch" }}'
:closable="true" @ok="() => versionModal.visible = false"
:class="siderDrawer.isDarkTheme ? darkClass : ''"
- ok-text='{{ i18n "confirm" }}' cancel-text='{{ i18n "cancel"}}'>
+ footer="">
<h2>{{ i18n "pages.index.xraySwitchClick"}}</h2>
<h2>{{ i18n "pages.index.xraySwitchClickDesk"}}</h2>
<template v-for="version, index in versionModal.versions">
@@ -187,6 +189,17 @@
</a-tag>
</template>
</a-modal>
+ <a-modal id="log-modal" v-model="logModal.visible" title="X-UI logs"
+ :closable="true" @ok="() => logModal.visible = false" @cancel="() => logModal.visible = false"
+ :class="siderDrawer.isDarkTheme ? darkClass : ''"
+ width="800px"
+ footer="">
+ <table style="margin: 0px; width: 100%; background-color: black; color: hsla(0,0%,100%,.65);">
+ <tr v-for="log , index in logModal.logs">
+ <td style="vertical-align: top;">[[ index ]]</td><td>[[ log ]]</td>
+ </tr>
+ </table>
+ </a-modal>
</a-layout>
{{template "js" .}}
<script>
@@ -280,6 +293,18 @@
},
};
+ const logModal = {
+ visible: false,
+ logs: '',
+ show(logs) {
+ this.visible = true;
+ this.logs = logs;
+ },
+ hide() {
+ this.visible = false;
+ },
+ };
+
const app = new Vue({
delimiters: ['[[', ']]'],
el: '#app',
@@ -287,6 +312,7 @@
siderDrawer,
status: new Status(),
versionModal,
+ logModal,
spinning: false,
loadingTip: '{{ i18n "loading"}}',
},
@@ -346,6 +372,15 @@
return;
}
},
+ async openLogs(){
+ this.loading(true);
+ const msg = await HttpUtil.post('server/logs');
+ this.loading(false);
+ if (!msg.success) {
+ return;
+ }
+ logModal.show(msg.obj);
+ }
},
async mounted() {
while (true) {