fileinfo: fix filename visible when image is spoiler

This commit is contained in:
fowr 2025-02-08 17:53:13 -03:00
parent d36c6244e4
commit 49f7cf4f42

View File

@ -20,7 +20,10 @@
{% endif %}
{% endif %}
{% if config.show_filename and file.filename %}
, {% if file.filename|length > config.max_filename_display %}
,
{% if file.thumb == 'spoiler' %}
<a href="{{ config.uri_img }}{{ file.file|e|bidi_cleanup }}" download="{{ file.filename|e|bidi_cleanup }}" title="{% trans %}Spoiler Image{% endtrans %}">{% trans %}Spoiler Image{% endtrans %}</a>
{% elseif file.filename|length > config.max_filename_display %}
<a href="{{ config.uri_img }}{{ file.file|e|bidi_cleanup }}" download="{{ file.filename|e|bidi_cleanup }}" title="Save as original filename: {{ file.filename|e|bidi_cleanup }}">{{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }}</a>
{% else %}
<a href="{{ config.uri_img }}{{ file.file|e|bidi_cleanup }}" download="{{ file.filename|e|bidi_cleanup }}" title="Save as original filename">{{ file.filename|e|bidi_cleanup }}</a>