From c08e8f2d4d985415cb5cbc920d4fbfc036e3efe6 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 21 Jan 2018 12:34:35 -0800 Subject: [PATCH] add sensitive media toggle --- routes/_components/Media.html | 8 ++- routes/_components/Status.html | 100 ++++++++++++++++++++++++++++++-- routes/_components/Toolbar.html | 2 +- templates/2xx.html | 11 ++++ 4 files changed, 113 insertions(+), 8 deletions(-) diff --git a/routes/_components/Media.html b/routes/_components/Media.html index 3a44e1a3..45120a60 100644 --- a/routes/_components/Media.html +++ b/routes/_components/Media.html @@ -1,4 +1,5 @@ -
+
{{#each mediaAttachments as media}}
{{#if media.type === 'video'}} @@ -46,6 +47,11 @@ justify-items: center; grid-column-gap: 10px; grid-row-gap: 10px; + margin: 10px 0; + } + + .status-media.status-media-is-sensitive { + margin: 0; } .status-media-container { diff --git a/routes/_components/Status.html b/routes/_components/Status.html index d9be39d3..f86fc490 100644 --- a/routes/_components/Status.html +++ b/routes/_components/Status.html @@ -28,7 +28,7 @@ {{/if}} {{#if status.spoiler_text}}
- +
{{/if}} {{#if !status.spoiler_text || spoilerShown}} @@ -36,8 +36,33 @@ {{{status.content}}}
{{/if}} + {{#if originalMediaAttachments && originalMediaAttachments.length}} + {{#if status.sensitive}} + + {{else}} + + {{/if}} + {{/if}} -