From 8ef447a997aa3ad0e2f333b1b71c2cbc91a40395 Mon Sep 17 00:00:00 2001
From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com>
Date: Tue, 8 Apr 2025 22:17:29 +0700
Subject: chore: create `FileManager` class for downloading files
---
web/html/index.html | 4 +---
web/html/modals/text_modal.html | 13 +------------
2 files changed, 2 insertions(+), 15 deletions(-)
(limited to 'web/html')
diff --git a/web/html/index.html b/web/html/index.html
index 1be7df13..574fc539 100644
--- a/web/html/index.html
+++ b/web/html/index.html
@@ -400,9 +400,7 @@
SysLog
-
-
+
diff --git a/web/html/modals/text_modal.html b/web/html/modals/text_modal.html
index cd90821d..38844e92 100644
--- a/web/html/modals/text_modal.html
+++ b/web/html/modals/text_modal.html
@@ -5,7 +5,7 @@
:autosize="{ minRows: 10, maxRows: 20}">
+ @click="FileManager.downloadTextFile(txtModal.content, txtModal.fileName)">
[[ txtModal.fileName ]]
@@ -35,17 +35,6 @@
this.close();
})
},
- download: function (content = '', fileName = '') {
- let link = document.createElement('a');
-
- link.download = fileName;
- link.href = URL.createObjectURL(new Blob([content], { type: 'text/plain' }));
- link.click();
-
- URL.revokeObjectURL(link.href);
-
- link.remove();
- },
close: function () {
this.visible = false;
},
--
cgit v1.2.3