From 81fc32cfe18c2629308448c0ed61ef508f113566 Mon Sep 17 00:00:00 2001 From: pancakes Date: Fri, 31 Jan 2025 21:34:42 +1000 Subject: [PATCH] [frontend/components] Use a placeholder element for "blurred" sensitive media --- .../Components/AttachmentComponent.razor | 26 ++++++++++++------- .../Components/AttachmentComponent.razor.css | 10 ++++--- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Iceshrimp.Frontend/Components/AttachmentComponent.razor b/Iceshrimp.Frontend/Components/AttachmentComponent.razor index 0d9712ef..cc2f8a0f 100644 --- a/Iceshrimp.Frontend/Components/AttachmentComponent.razor +++ b/Iceshrimp.Frontend/Components/AttachmentComponent.razor @@ -11,29 +11,35 @@ @Attachment.AltText } + else if (BlurImage) + { +
+ + @Loc["Sensitive media"] + @Loc["Click to reveal"] +
+ } // else if (Attachment.ContentType == "audio/x-mod") // { // TODO: Module player - // } + // } else if (Attachment.ContentType.StartsWith("audio")) { - + } else if (Attachment.ContentType.StartsWith("video")) { -