#pragma once // Spec: INV-social 17 (AttachmentViewer, VideoThumbnailView). // // ViewPtr AttachmentViewer(const Attachment&); one attachment (image or video, else nothing) // ViewPtr AttachmentViews(const std::vector&, float gap); vertical stack, capped at 50 // // Image: tappable RemoteImage (fit) with a spinner placeholder; tap opens the fullscreen zoom viewer // (Overlays::sheet(..., SheetStyle::FullScreen)). Video: 16:9 placeholder tile with a play badge; tap opens the URL // in the system player through Router::openUrl (DIFF: no in-app player, no frame extracted for the thumbnail). // Audio and other files render nothing, as in the Swift app. #include #include #include "model/Attachment.hpp" #include "ui/Views.hpp" namespace dp { class AttachmentLinks { public: // "/x" becomes "https://devplace.net/x"; absolute URLs are returned unchanged; empty stays empty. static std::string resolve(const std::string& url); }; ui::ViewPtr AttachmentViewer(const Attachment& attachment); ui::ViewPtr AttachmentViews(const std::vector& attachments, float spacing = 12); // Presents the fullscreen image viewer for an absolute URL. void presentFullscreenImage(const std::string& url); } // namespace dp