some changes

Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
MHSanaei
2024-02-19 00:45:00 +03:30
parent fe00cfb09b
commit 6b5535e60a
4 changed files with 12 additions and 13 deletions
+4 -5
View File
@@ -313,7 +313,7 @@
</a-form-item>
<a-form-item>
<a-button type="primary" style="margin-bottom: 10px;"
:href="'data:application/text;charset=utf-8,' + encodeURIComponent(logModal.logs.join('\n'))" download="x-ui.log">
:href="'data:application/text;charset=utf-8,' + encodeURIComponent(logModal.logs)" download="x-ui.log">
{{ i18n "download" }} x-ui.log
</a-button>
</a-form-item>
@@ -446,16 +446,15 @@
const logModal = {
visible: false,
logs: [],
formattedLogs: '',
logs: '',
rows: 20,
level: 'info',
syslog: false,
loading: false,
show(logs) {
this.visible = true;
this.logs = logs || [];
this.formattedLogs = this.logs.length > 0 ? this.formatLogs(this.logs) : "No Record...";
this.logs = logs;
this.formattedLogs = this.logs?.length > 0 ? this.formatLogs(this.logs) : "No Record...";
},
formatLogs(logs) {
let formattedLogs = '';