Preview attachments in Postvak and Meelezen #467
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "postvak-attachment-previews"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A non-image attachment on a Postvak or Meelezen message was a plain link to the file proxy. The proxy serves HTML as a download on purpose (the rendered view only exists behind
?preview=html), so an HTML report never previewed.MessageItemnow draws the file cardsAttachmentPreviewalready gives a card: HTML opens in the sandboxed preview, PDF, text and video in theirs, and every file keeps its download button.MessageItemalso draws the card modal's thread and channel context, so those get the same file cards.The image viewer now steps to the previous and next image of a message (arrows, counter, ArrowLeft/ArrowRight).
ImageLightboxalready supported this, butMessageItemonly ever handed it the clicked image. It now emits every image of the message with the clicked index. The same wiring is added to the channel context and to the card modal's own message.The Postvak dev-mock's attachments had no file id (the proxy could not serve them) and no HTML file; both fixed in a separate commit.
Checked in the preview with Playwright: a Postvak row shows the file cards, and clicking
rapport.htmlopens the HTML preview with asandbox="allow-scripts"iframe on?preview=html.6e34e526df7125243e81