Browse Source

[log] fix download format

Co-Authored-By: Alireza Ahmadi <[email protected]>
MHSanaei 1 year ago
parent
commit
c7926d0bc0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      web/html/xui/index.html

+ 2 - 2
web/html/xui/index.html

@@ -325,7 +325,7 @@
             </a-form-item>
             <a-form-item style="float: right;">
                 <a-button type="primary" icon="download"
-                :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">
                 </a-button>
             </a-form-item>
         </a-form>
@@ -457,7 +457,7 @@
 
     const logModal = {
         visible: false,
-        logs: '',
+        logs: [],
         rows: 20,
         level: 'info',
         syslog: false,