From 39f13d64fdb6e5f9fa729526bff7ab8a87d3153f Mon Sep 17 00:00:00 2001 From: Cy Date: Sat, 30 May 2020 21:21:31 +0000 Subject: [PATCH] Allow previewing sensitive images A setting to not censor sensitive images if you think you're not in danger for looking at them. --- brutaldon/models.py | 5 +++++ brutaldon/templates/main/toot_partial.html | 4 ++-- brutaldon/templates/setup/settings.html | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/brutaldon/models.py b/brutaldon/models.py index 33847a1..b8cb58f 100644 --- a/brutaldon/models.py +++ b/brutaldon/models.py @@ -50,6 +50,11 @@ class Preference(models.Model): timezone = models.CharField( max_length=80, blank=True, null=True, choices=timezones, default="UTC" ) + preview_sensitive = models.BooleanField( + default=False, + help_text=_( + 'Show preview for media marked as "sensitive"')) + no_javascript = models.BooleanField( default=False, help_text=_( diff --git a/brutaldon/templates/main/toot_partial.html b/brutaldon/templates/main/toot_partial.html index abad8c7..2dfca7c 100644 --- a/brutaldon/templates/main/toot_partial.html +++ b/brutaldon/templates/main/toot_partial.html @@ -101,7 +101,7 @@