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
path: root/web
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2024-01-26 16:20:22 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2024-01-26 16:20:22 +0300
commit5f9058c84f6a46a2233f323dcdac8281975accc0 (patch)
tree7f61f8c1c3f01cfe971c8e539ff7e9f729d87efc /web
parent979fdedbbe1f36962bf72349ba21de4223286227 (diff)
fix downloaded log format
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web')
-rw-r--r--web/html/xui/index.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index 3c01a29f..258d4154 100644
--- a/web/html/xui/index.html
+++ b/web/html/xui/index.html
@@ -299,12 +299,12 @@
</a-form-item>
<a-form-item>
<a-button type="primary" style="margin-bottom: 10px;"
- :href="'data:application/text;charset=utf-8,' + encodeURIComponent(logModal.logs)" download="x-ui.log">
+ :href="'data:application/text;charset=utf-8,' + encodeURIComponent(logModal.logs.join('\n'))" download="x-ui.log">
{{ i18n "download" }} x-ui.log
</a-button>
</a-form-item>
</a-form>
- <div class="ant-input" style="height: auto; max-height: 500px; overflow: auto;" v-html="logModal.logs"></div>
+ <div class="ant-input" style="height: auto; max-height: 500px; overflow: auto;" v-html="logModal.formattedLogs"></div>
</a-modal>
<a-modal id="backup-modal" v-model="backupModal.visible" :title="backupModal.title"
@@ -432,14 +432,16 @@
const logModal = {
visible: false,
- logs: '',
+ logs: [],
+ formattedLogs: '',
rows: 20,
level: 'info',
syslog: false,
loading: false,
show(logs) {
this.visible = true;
- this.logs = logs? this.formatLogs(logs) : "No Record...";
+ this.logs = logs;
+ this.formattedLogs = logs.length > 0 ? this.formatLogs(logs) : "No Record...";
},
formatLogs(logs) {
let formattedLogs = '';