mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2024-11-27 09:10:08 -05:00
Allow previewing sensitive images
A setting to not censor sensitive images if you think you're not in danger for looking at them.
This commit is contained in:
parent
0439440f40
commit
39f13d64fd
@ -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=_(
|
||||
|
@ -101,7 +101,7 @@
|
||||
<figure class="column attachment-image">
|
||||
<a href="{{ media.url }}">
|
||||
<noscript class="loading-lazy">
|
||||
{% if toot.sensitive %}
|
||||
{% if toot.sensitive and not preferences.preview_sensitive %}
|
||||
<img loading="lazy" src="{% static "images/sensitive.png" %}"
|
||||
{% else %}
|
||||
<img loading="lazy" src="{{ media.preview_url }}"
|
||||
@ -127,7 +127,7 @@
|
||||
<source src="{{ media.url }}" type="video/mp4">
|
||||
<a href="{{ media.url }}">
|
||||
<noscript class="loading-lazy">
|
||||
{% if toot.sensitive %}
|
||||
{% if toot.sensitive and not preferences.preview_sensitive %}
|
||||
<img loading="lazy" src="{% static "images/sensitive.png" %}"
|
||||
{% else %}
|
||||
<img loading="lazy" src="{{ media.preview_url }}"
|
||||
|
@ -30,6 +30,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="subtitle">Options</h2>
|
||||
<div class="columns">
|
||||
<div class="column is-quarter">
|
||||
<label class="label checkbox" for="id_preview_sensitive">
|
||||
{% render_field form.preview_sensitive class+="checkbox" %}
|
||||
{{ form.preview_sensitive.label }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="subtitle">Timeline Options</h2>
|
||||
<div class="field">
|
||||
<label class="label checkbox">
|
||||
|
Loading…
Reference in New Issue
Block a user