From 0c1d671c8dd05ec508b08737777e9b7493158b6e Mon Sep 17 00:00:00 2001 From: keboss-m <85340750+keboss-m@users.noreply.github.com> Date: Mon, 1 Jun 2026 12:49:54 +0300 Subject: [PATCH] Fix docx download: attach click handlers directly to file items, use iframe for reliable download --- backend/static/app.js | 49 ++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/backend/static/app.js b/backend/static/app.js index bf6d794..c30f4a0 100644 --- a/backend/static/app.js +++ b/backend/static/app.js @@ -225,6 +225,7 @@ class TranscriptionApp { } container.innerHTML = tree.map(folder => this.renderFolder(folder)).join(''); + this.attachFileItemListeners(); } renderFolder(folder) { @@ -232,10 +233,9 @@ class TranscriptionApp { const isMd = file.ext === '.md'; const isDocx = file.ext === '.docx'; const icon = isMd ? '📝' : isDocx ? '📄' : '📎'; - const clickable = isMd || isDocx ? 'clickable' : ''; return ` -
Скачивание DOCX...
+⬇️ Скачивание DOCX...
✅ Файл скачан: ${this.escapeHtml(path)}
+✅ Файл скачан