diff --git a/Components/Content.razor b/Components/Content.razor
index 7e93bd4..d1df3d2 100644
--- a/Components/Content.razor
+++ b/Components/Content.razor
@@ -525,6 +525,7 @@
bool isReplying;
bool isDetailsOpen;
+ MediaAttachment viewingPicture;
bool isQuoting;
bool isEditing;
bool isActing;
@@ -626,6 +627,11 @@
}
+ @if (viewingPicture is { } picture)
+ {
+
+ }
+
@if (status.Card is { } card && status.MediaAttachments.Count == 0)
{
@@ -762,10 +768,11 @@
RenderFragment Media(MediaAttachment media, bool several) => media.Type switch
{
- "image" => @
+ "image" => @,
+ ,
"gifv" => @,
"video" => @,
@@ -1036,6 +1043,10 @@
await OnReplied.InvokeAsync(reply);
}
+ static List Pictures(Status status) => [.. status.MediaAttachments.Where(m => m.Type == "image")];
+
+ void OpenPicture(MediaAttachment media) => viewingPicture = media;
+
async Task OpenDetails()
{
isDetailsOpen = true;
diff --git a/Components/MediaViewer.razor b/Components/MediaViewer.razor
new file mode 100644
index 0000000..5a8b2d2
--- /dev/null
+++ b/Components/MediaViewer.razor
@@ -0,0 +1,75 @@
+@inherits LocalizableComponentBase
+
+@* A post's pictures, one at a time, in the app (a picture used to open its file in a new tab, leaving it): the whole
+ screen on a phone, a large dialog from md, with its alt text, the previous and next one (buttons, or the arrow
+ keys), and the original in a new tab for whoever wants the file. *@
+
+
+ @Localizer["Picture {0} of {1}", index + 1, Pictures.Count]
+
+
+