From b0cf050797702d6a7cc921c71b27cecb5ce234c6 Mon Sep 17 00:00:00 2001
From: Vivian Lim <vivlim@pm.me>
Date: Thu, 28 Jun 2018 21:39:25 -0700
Subject: Add configuration option to enable click-through content warnings

---
 src/components/status/status.vue | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/components/status/status.vue')

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 77a7904e..2e33999a 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -76,17 +76,19 @@
             <div v-if="status.summary" @click.prevent="linkClicked" class="status-content media-body">
               <div class="contentWarningLabel">
                 <span v-html="status.summary"></span>
-                <button v-if="showingContentWarningContent" @click.prevent="toggleContentWarningContent">Hide</button>
-                <button v-else @click.prevent="toggleContentWarningContent">Show</button>
+                <span v-if="clickThroughContentWarningsEnabled">
+                  <button v-if="showingContentWarningContent" @click.prevent="toggleContentWarningContent">Hide</button>
+                  <button v-else @click.prevent="toggleContentWarningContent">Show</button>
+                </span>
               </div>
-              <div v-if="showingContentWarningContent" v-html="status.content" class="contentWarnedContent"></div>
+              <div v-if="showingContentWarningContent || !clickThroughContentWarningsEnabled" v-html="status.content" class="contentWarnedContent"></div>
               <div v-else class="hiddenContent" @click.prevent="toggleContentWarningContent">Click to view this post.<span v-if="status.attachments && status.attachments.length > 0"> (has attachments)</span></div>
             </div>
             <div v-else @click.prevent="linkClicked" class="status-content media-body" v-html="status.statusnet_html"></div>
             <a v-if="showingTall" href="#" class="tall-status-unhider" @click.prevent="toggleShowTall">Show less</a>
           </div>
 
-          <div v-if='status.attachments && (!status.summary || showingContentWarningContent)' class='attachments media-body'>
+          <div v-if='status.attachments && (!status.summary || showingContentWarningContent || !clickThroughContentWarningsEnabled)' class='attachments media-body'>
             <attachment :size="attachmentSize" :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments" :key="attachment.id">
             </attachment>
           </div>
-- 
cgit v1.2.3-70-g09d2

