Commit 453cc96
feat(ui): drop-zone hint mode separation (convert vs compress)
The homepage drop-zone advertised "Supported: HEIC · JPG · PNG · WebP
· BMP · TIFF · GIF · DOCX · PDF · TXT · MD · XLSX · CSV · JSON · MP4
· MOV · AVI · MKV · WebM · MP3 · WAV · FLAC · OGG · M4A" regardless
of the mode toggle, even though the compress path only accepts a much
narrower subset (JPG/PNG/WebP/TIFF + MP4/AVI/MOV/MKV/WebM). Users would
upload an MP3 in compress mode, see a 422, and bounce.
Adds two side-by-side hint blocks in index.html (`supported-convert`,
`supported-compress`) and toggles `hidden` from app.js::setMode based
on the active mode. Server-side validation is unchanged — this is
purely a UI affordance to set expectations correctly before upload.
New tests/test_homepage_drop_zone_modes.py asserts both blocks are
present with the expected `hidden` defaults so a future template
refactor can't silently revert this.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ab796ef commit 453cc96
3 files changed
Lines changed: 54 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments