v4: an uploaded audio file plays from its cover everywhere, and a card's play badge sits in the middle of its thumbnail — a link played from its thumbnail in every view, but an uploaded file only did on a list card: a journal tile opened the dump, an audio file's page showed a round button by its waveform and never its uploaded cover, and an uploaded video's page was a black box until played. The list card's badge sat in the thumbnail's bottom-left corner, where it looked misplaced, and clicking a playing file restarted it. The new usePlayFile hook builds the player's item and the file's artwork (fileArtworkUrl) for the card, the journal tile and the dump's page, and plays, or pauses once the file is the current one. A card's badge, ▶ or ⏸, is now centred, as is the ↗ on a link out; over a placeholder it takes the place of the glyph. An audio file without a cover shows a placeholder tinted from its file name, not a bare 🎵. In the journal, audio counts as having art (hasThumbnail), so it is an image tile, its glyph raised above the title, and a file tile plays and pauses the file. On the dump's page, the cover (96px, the card's badge on it) plays the file beside the shared Waveform, which replaces FilePreview's copy of it; a video takes the server's still as its poster. 674 frontend tests pass, and tsc, eslint, deno fmt, doc:lint and i18n:compile --strict are clean; checked in screenshots in Smooth light at 1280 and 390px, Brutalist dark on the journal at 390px and Kanagawa dark at 390px, playing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -367,7 +367,7 @@ msgstr "[deleted]"
|
||||
|
||||
#. placeholder {0}: dump.commentCount
|
||||
#: src/components/dump/DumpCard.tsx:139
|
||||
#: src/components/dump/JournalCard.tsx:133
|
||||
#: src/components/dump/JournalCard.tsx:136
|
||||
msgid "{0, plural, one {# comment} other {# comments}}"
|
||||
msgstr "{0, plural, one {# comment} other {# comments}}"
|
||||
|
||||
@@ -853,7 +853,7 @@ msgid "Done"
|
||||
msgstr "Done"
|
||||
|
||||
#. placeholder {0}: dump.fileName
|
||||
#: src/components/dump/FilePreview.tsx:358
|
||||
#: src/components/dump/FilePreview.tsx:215
|
||||
msgid "Download {0}"
|
||||
msgstr "Download {0}"
|
||||
|
||||
@@ -1441,8 +1441,8 @@ msgstr "Passwords do not match"
|
||||
msgid "Paste a link…"
|
||||
msgstr "Paste a link…"
|
||||
|
||||
#: src/components/dump/FilePreview.tsx:134
|
||||
#: src/components/dump/FilePreview.tsx:310
|
||||
#: src/components/dump/FilePreview.tsx:65
|
||||
#: src/components/dump/FilePreview.tsx:177
|
||||
#: src/components/dump/RichContentCard.tsx:103
|
||||
#: src/components/player/MediaPlayer.tsx:330
|
||||
msgid "Pause"
|
||||
@@ -1452,10 +1452,8 @@ msgstr "Pause"
|
||||
msgid "Picked up where you left off."
|
||||
msgstr "Picked up where you left off."
|
||||
|
||||
#: src/components/dump/FilePreview.tsx:134
|
||||
#: src/components/dump/FilePreview.tsx:253
|
||||
#: src/components/dump/FilePreview.tsx:275
|
||||
#: src/components/dump/FilePreview.tsx:310
|
||||
#: src/components/dump/FilePreview.tsx:65
|
||||
#: src/components/dump/FilePreview.tsx:177
|
||||
#: src/components/dump/RichContentCard.tsx:103
|
||||
#: src/components/dump/RichContentCard.tsx:150
|
||||
#: src/components/player/MediaPlayer.tsx:330
|
||||
@@ -1491,7 +1489,7 @@ msgid "Previous track"
|
||||
msgstr "Previous track"
|
||||
|
||||
#: src/components/dump/DumpCard.tsx:148
|
||||
#: src/components/dump/JournalCard.tsx:142
|
||||
#: src/components/dump/JournalCard.tsx:145
|
||||
#: src/components/playlist/PlaylistCard.tsx:104
|
||||
#: src/components/playlist/PlaylistHeader.tsx:76
|
||||
#: src/components/playlist/PlaylistMembershipPanel.tsx:81
|
||||
|
||||
@@ -367,7 +367,7 @@ msgstr "[supprimé]"
|
||||
|
||||
#. placeholder {0}: dump.commentCount
|
||||
#: src/components/dump/DumpCard.tsx:139
|
||||
#: src/components/dump/JournalCard.tsx:133
|
||||
#: src/components/dump/JournalCard.tsx:136
|
||||
msgid "{0, plural, one {# comment} other {# comments}}"
|
||||
msgstr "{0, plural, one {# commentaire} other {# commentaires}}"
|
||||
|
||||
@@ -853,7 +853,7 @@ msgid "Done"
|
||||
msgstr "Terminé"
|
||||
|
||||
#. placeholder {0}: dump.fileName
|
||||
#: src/components/dump/FilePreview.tsx:358
|
||||
#: src/components/dump/FilePreview.tsx:215
|
||||
msgid "Download {0}"
|
||||
msgstr "Télécharger {0}"
|
||||
|
||||
@@ -1441,8 +1441,8 @@ msgstr "Les mots de passe ne correspondent pas"
|
||||
msgid "Paste a link…"
|
||||
msgstr "Collez un lien…"
|
||||
|
||||
#: src/components/dump/FilePreview.tsx:134
|
||||
#: src/components/dump/FilePreview.tsx:310
|
||||
#: src/components/dump/FilePreview.tsx:65
|
||||
#: src/components/dump/FilePreview.tsx:177
|
||||
#: src/components/dump/RichContentCard.tsx:103
|
||||
#: src/components/player/MediaPlayer.tsx:330
|
||||
msgid "Pause"
|
||||
@@ -1452,10 +1452,8 @@ msgstr "Pause"
|
||||
msgid "Picked up where you left off."
|
||||
msgstr "Reprise de votre brouillon."
|
||||
|
||||
#: src/components/dump/FilePreview.tsx:134
|
||||
#: src/components/dump/FilePreview.tsx:253
|
||||
#: src/components/dump/FilePreview.tsx:275
|
||||
#: src/components/dump/FilePreview.tsx:310
|
||||
#: src/components/dump/FilePreview.tsx:65
|
||||
#: src/components/dump/FilePreview.tsx:177
|
||||
#: src/components/dump/RichContentCard.tsx:103
|
||||
#: src/components/dump/RichContentCard.tsx:150
|
||||
#: src/components/player/MediaPlayer.tsx:330
|
||||
@@ -1491,7 +1489,7 @@ msgid "Previous track"
|
||||
msgstr "Piste précédente"
|
||||
|
||||
#: src/components/dump/DumpCard.tsx:148
|
||||
#: src/components/dump/JournalCard.tsx:142
|
||||
#: src/components/dump/JournalCard.tsx:145
|
||||
#: src/components/playlist/PlaylistCard.tsx:104
|
||||
#: src/components/playlist/PlaylistHeader.tsx:76
|
||||
#: src/components/playlist/PlaylistMembershipPanel.tsx:81
|
||||
|
||||
Reference in New Issue
Block a user