Files
Paul LütznerandClaude Opus 5.5 0591d9a854 Settings → Mail → Images: always show remote images (#124)
One per-user switch, off until somebody turns it on. With it on,
MessageRenderer treats every sender as if it were on the image allowlist,
so no message asks before loading its pictures. They still come through the
image proxy, so a sender learns that a message was opened but not the
reader's address. Mail in Spam stays blocked, as it does for trusted senders.

Kept apart from the per-sender allowlist: no "Stop showing" line for a
sender nobody trusted, and switching it off leaves those entries as they
were. Stored in the user's settings bag and carried by a config backup.
No migration.

Closes #124.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 08:00:44 +02:00

52 lines
2.5 KiB
Twig

{#
settings/_images.html.twig
─────────────────────────────────────────────────────────────────────────────
Whether remote images in mail load without the "Show images" bar (#124).
A plain form that submits on change and redirects, like Disposal beside it:
the switch decides how the NEXT message is drawn, so there is nothing on this
page worth streaming back.
Off to begin with, and the hint says what turning it on gives away — that a
message was opened — and the two things it does not: the reader's address,
because images still come through plMail, and mail in Spam, which stays
blocked whatever this says.
Accepts:
alwaysShow bool
#}
{% set segText = 'flex h-full items-center justify-center px-3 py-1.5 text-center text-[11px] leading-tight text-ink-muted
peer-checked:bg-accent peer-checked:text-accent-ink
peer-focus-visible:ring-2 peer-focus-visible:ring-inset peer-focus-visible:ring-accent
transition-colors cursor-pointer' %}
<div class="px-4 py-3">
<form method="post" action="{{ path('app_settings_images_update') }}" data-turbo="false" data-controller="ui--auto-submit">
<input type="hidden" name="_token" value="{{ csrf_token('settings-images') }}">
<div class="flex items-start justify-between gap-3">
<span class="min-w-0">
<span class="block text-xs font-medium text-ink-muted">{{ 'settings.images.always_show'|trans }}</span>
<span class="block text-[11px] text-ink-faint mt-0.5">{{ 'settings.images.always_show_hint'|trans }}</span>
</span>
<div class="grid grid-flow-col auto-cols-fr shrink-0 rounded-pane border border-line overflow-hidden"
role="radiogroup" aria-label="{{ 'settings.images.always_show'|trans }}">
{% for on in [true, false] %}
<label>
<input type="radio" name="alwaysShow" class="peer sr-only"
value="{{ on ? '1' : '0' }}"
data-action="change->ui--auto-submit#submit"
{{ alwaysShow == on ? 'checked' : '' }}>
<span class="{{ segText }}">
{{ (on ? 'settings.images.on' : 'settings.images.off')|trans }}
</span>
</label>
{% endfor %}
</div>
</div>
</form>
</div>