From 970a42043348deb9e5c77e6e53c84ddb04343eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 21 Feb 2026 12:26:45 -0500 Subject: [PATCH] refactor: add icons to selected/all fix truncation on category select in composer header --- public/src/client/unread.js | 6 ++++-- public/src/modules/categoryFilter.js | 4 ++-- .../partials/category/filter-dropdown-content.tpl | 7 +++++-- .../partials/category/selector-dropdown-content.tpl | 12 ++++++------ 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/public/src/client/unread.js b/public/src/client/unread.js index 240d426a53..6851ba1ec4 100644 --- a/public/src/client/unread.js +++ b/public/src/client/unread.js @@ -88,12 +88,14 @@ define('forum/unread', [ { cid: 'selected', name: '[[unread:selected]]', - icon: '', + icon: 'fa-regular fa-square-check', + color: 'var(--bs-secondary)', }, { cid: 'all', name: '[[unread:all]]', - icon: '', + icon: 'fa-list', + color: 'var(--bs-secondary)', }, ], defaultCategories, diff --git a/public/src/modules/categoryFilter.js b/public/src/modules/categoryFilter.js index 4f330be091..1f624b4415 100644 --- a/public/src/modules/categoryFilter.js +++ b/public/src/modules/categoryFilter.js @@ -82,10 +82,10 @@ define('categoryFilter', ['categorySearch', 'api', 'hooks'], function (categoryS return a - b; }); icon.toggleClass('invisible'); - listEl.find('[data-cid="all"] i').toggleClass('invisible', !!selectedCids.length); + listEl.find('[data-cid="all"] [component="category/select/icon"]').toggleClass('invisible', !!selectedCids.length); } else { el.find('[component="category/select/icon"]').addClass('invisible'); - listEl.find('[data-cid="all"] i').removeClass('invisible'); + listEl.find('[data-cid="all"] [component="category/select/icon"]').removeClass('invisible'); selectedCids = []; } diff --git a/src/views/partials/category/filter-dropdown-content.tpl b/src/views/partials/category/filter-dropdown-content.tpl index 8e92c5d7cf..4905ce3cc2 100644 --- a/src/views/partials/category/filter-dropdown-content.tpl +++ b/src/views/partials/category/filter-dropdown-content.tpl @@ -19,7 +19,10 @@ {{{ if !hideAll }}} @@ -33,7 +36,7 @@ {{{ if ./icon }}} {buildCategoryIcon(@value, "24px", "rounded-circle")} {{{ end }}} - {./name} + {./name} diff --git a/src/views/partials/category/selector-dropdown-content.tpl b/src/views/partials/category/selector-dropdown-content.tpl index 260ad4fa9a..e3941a1b8e 100644 --- a/src/views/partials/category/selector-dropdown-content.tpl +++ b/src/views/partials/category/selector-dropdown-content.tpl @@ -1,13 +1,13 @@ @@ -25,12 +25,12 @@