feat(web): add download button to file viewer (#926)

Adds a download icon button to the file viewer toolbar (next to copy-path).
Clicking it decodes the existing base64 file content into a Blob and triggers
a browser download — no new backend endpoint required. Works for text, binary,
and image files. Button is hidden until the file has loaded successfully.

Closes #924

via [HAPI](https://hapi.run)

Co-authored-by: HAPI <noreply@hapi.run>
This commit is contained in:
SSU-WEI HUANG
2026-06-18 10:16:17 +08:00
committed by GitHub
co-authored by HAPI
parent 2643f17840
commit a8e08e8014
3 changed files with 52 additions and 0 deletions
+1
View File
@@ -310,6 +310,7 @@ export default {
'file.page.unknownPath': 'Unknown path',
'file.page.copyPath': 'Copy path',
'file.page.copyContent': 'Copy file content',
'file.page.download': 'Download file',
'file.page.tab.diff': 'Diff',
'file.page.tab.file': 'File',
'file.page.missingPath': 'No file path provided.',