From 3c219f6971418ee425d681410ab85724e93a5533 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 20 Feb 2021 12:25:34 +0100 Subject: [PATCH] client: Make show_thumbnails=0 show thumbnail in expanded items https://github.com/fossar/selfoss/pull/1022 added support for not showing thumbnails in the entry list. Unfortunately, that removed them altogether. This patch shows them again when an article is expanded. --- assets/js/templates/Item.jsx | 4 ++-- assets/styles/main.scss | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/js/templates/Item.jsx b/assets/js/templates/Item.jsx index fac921c6cf..f8cfc7f9fe 100644 --- a/assets/js/templates/Item.jsx +++ b/assets/js/templates/Item.jsx @@ -393,8 +393,8 @@ export default function Item({ item, selected, expanded, setNavExpanded }) { : null} {/* thumbnail */} - {selfoss.config.showThumbnails && item.thumbnail && item.thumbnail.trim().length > 0 ? -
+ {item.thumbnail && item.thumbnail.trim().length > 0 ? +
{item.strippedTitle} diff --git a/assets/styles/main.scss b/assets/styles/main.scss index ec7edc5248..d20b5e97ba 100644 --- a/assets/styles/main.scss +++ b/assets/styles/main.scss @@ -469,6 +469,10 @@ span.offline-count.diff { margin: 0 10px 5px 0; } +.entry:not(.expanded) .entry-thumbnail:not(.entry-thumbnail-always-visible) { + display: none; +} + .entry:not(.expanded) .entry-content, .entry:not(.expanded) .entry-toolbar { display: none;