Spaces:
Running
Running
Update static/appS.js
Browse files- static/appS.js +14 -12
static/appS.js
CHANGED
@@ -629,19 +629,21 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
629 |
iconRow.appendChild(icon);
|
630 |
}
|
631 |
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
|
|
|
|
|
|
|
|
|
|
641 |
|
642 |
-
downloadLink.appendChild(downloadIcon);
|
643 |
-
iconRow.appendChild(downloadLink);
|
644 |
-
}
|
645 |
|
646 |
message.appendChild(iconRow);
|
647 |
}
|
|
|
629 |
iconRow.appendChild(icon);
|
630 |
}
|
631 |
|
632 |
+
if (fileName) {
|
633 |
+
const downloadLink = document.createElement('a');
|
634 |
+
downloadLink.href = `/files/${fileName.split('/').pop()}`;
|
635 |
+
downloadLink.target = "_blank";
|
636 |
+
downloadLink.download = fileName.split('/').pop();
|
637 |
+
|
638 |
+
const downloadIcon = document.createElement("i");
|
639 |
+
downloadIcon.className = "fa-solid fa-file-arrow-down";
|
640 |
+
downloadIcon.style.fontSize = "18px";
|
641 |
+
downloadIcon.style.cursor = "pointer";
|
642 |
+
|
643 |
+
downloadLink.appendChild(downloadIcon);
|
644 |
+
iconContainer.appendChild(downloadLink);
|
645 |
+
}
|
646 |
|
|
|
|
|
|
|
647 |
|
648 |
message.appendChild(iconRow);
|
649 |
}
|