feat: custom file drop zone for asset upload modal; fix review issues
All checks were successful
Lint & Test / test (push) Successful in 1m29s

Replace plain <input type="file"> with a styled drag-and-drop zone
featuring hover/drag states, file info display, and remove button.

Fix 10 review issues: add 401 handling to upload, remove non-null
assertions, add missing i18n keys (common.remove, error.play_failed,
error.download_failed), normalize close button glyphs to &#x2715;,
i18n the dropzone aria-label, replace silent error catches with toast
notifications, use DataTransfer for cross-browser file assignment.
This commit is contained in:
2026-03-26 21:43:08 +03:00
parent f345687600
commit f61a0206d4
6 changed files with 38 additions and 21 deletions

View File

@@ -434,6 +434,7 @@
"confirm.turn_off_device": "Turn off this device?",
"common.loading": "Loading...",
"common.delete": "Delete",
"common.remove": "Remove",
"common.edit": "Edit",
"common.clone": "Clone",
"common.none": "None",
@@ -1995,6 +1996,8 @@
"asset.error.name_required": "Name is required",
"asset.error.no_file": "Please select a file to upload",
"asset.error.delete_failed": "Failed to delete asset",
"asset.error.play_failed": "Failed to play sound",
"asset.error.download_failed": "Failed to download asset",
"asset.play": "Play",
"asset.download": "Download",
"asset.prebuilt": "Prebuilt",