From 95e5bdb1068bdf509817d4bd8409b85a8960ebc2 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 5 Feb 2018 08:50:08 -0800 Subject: [PATCH] add setting to always mark as sensitive --- routes/_components/status/StatusMediaAttachments.html | 2 +- routes/_store/store.js | 4 +++- routes/settings/general.html | 10 ++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/routes/_components/status/StatusMediaAttachments.html b/routes/_components/status/StatusMediaAttachments.html index eff8d34c..953d013d 100644 --- a/routes/_components/status/StatusMediaAttachments.html +++ b/routes/_components/status/StatusMediaAttachments.html @@ -1,4 +1,4 @@ -{{#if status.sensitive}} +{{#if status.sensitive || $markMediaAsSensitive}}
{{#if sensitiveShown}} diff --git a/routes/_store/store.js b/routes/_store/store.js index 625f871c..3b18ccd3 100644 --- a/routes/_store/store.js +++ b/routes/_store/store.js @@ -11,7 +11,8 @@ const KEYS_TO_STORE_IN_LOCAL_STORAGE = new Set([ "instanceThemes", "loggedInInstances", "loggedInInstancesInOrder", - "autoplayGifs" + "autoplayGifs", + "markMediaAsSensitive" ]) class PinaforeStore extends LocalStorageStore { @@ -29,6 +30,7 @@ const store = new PinaforeStore({ spoilersShown: {}, sensitivesShown: {}, autoplayGifs: false, + markMediaAsSensitive: false }) mixins(PinaforeStore) diff --git a/routes/settings/general.html b/routes/settings/general.html index 15653892..7c887703 100644 --- a/routes/settings/general.html +++ b/routes/settings/general.html @@ -13,6 +13,11 @@ bind:checked="$autoplayGifs" on:change="store.save()">
+
+ + +
@@ -20,14 +25,15 @@