fix: acp category selector when category has image

This commit is contained in:
Barış Soner Uşaklı
2026-01-28 11:23:34 -05:00
parent eab4025bdd
commit ef75f1bac9
2 changed files with 9 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
<div class="mb-3"> <div class="mb-3">
<div component="category-selector" class="btn-group"> <div component="category-selector" class="btn-group">
<button type="button" class="btn btn-ghost border dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button type="button" class="btn btn-ghost border d-flex align-items-center gap-2 dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span component="category-selector-selected">[[topic:thread-tools.select-category]]</span> <span class="caret"></span> <span component="category-selector-selected" class="d-flex align-items-center">[[topic:thread-tools.select-category]]</span> <span class="caret"></span>
</button> </button>
<div class="dropdown-menu p-1"> <div class="dropdown-menu p-1">

View File

@@ -1,15 +1,16 @@
<button type="button" class="btn btn-ghost btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button type="button" class="btn btn-ghost btn-sm d-flex align-items-center gap-2 dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span component="category-selector-selected"> <span component="category-selector-selected" class="d-flex align-items-center">
<span class="category-item d-inline-flex align-items-center gap-1">
{{{ if (selectedCategory && !showCategorySelectLabel) }}} {{{ if (selectedCategory && !showCategorySelectLabel) }}}
<span class="category-item d-inline-flex align-items-center gap-1">
{buildCategoryIcon(selectedCategory, "24px", "rounded-circle")} {buildCategoryIcon(selectedCategory, "24px", "rounded-circle")}
{selectedCategory.name} <span class="fw-semibold">{selectedCategory.name}</span>
</span>
{{{ else }}} {{{ else }}}
<i class="fa fa-fw {{{ if selectCategoryIcon }}}{selectCategoryIcon}{{{ else }}}fa-list{{{ end }}}"></i> <i class="fa fa-fw {{{ if selectCategoryIcon }}}{selectCategoryIcon}{{{ else }}}fa-list{{{ end }}}"></i>
{{{ if selectCategoryLabel }}}{selectCategoryLabel}{{{ else }}}[[topic:thread-tools.select-category]]{{{ end }}} {{{ if selectCategoryLabel }}}{selectCategoryLabel}{{{ else }}}[[topic:thread-tools.select-category]]{{{ end }}}
{{{ end }}} {{{ end }}}
</span> </span>
</span> <span class="caret"></span> <span class="caret"></span>
</button> </button>
<div class="dropdown-menu p-1"> <div class="dropdown-menu p-1">