Fix preview popover styling and icon preservation
- Preserve icon structure when updating total count in trait badge - Add gap between title and count in preview popover header - Style the count badge with background, padding, and rounded corners Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,15 @@
|
||||
|
||||
var $totalBadge = this.$wrapper.find('.trait-total-count');
|
||||
if (total > 0) {
|
||||
$totalBadge.text(total).show();
|
||||
// Update count while preserving icon structure
|
||||
var $countValue = $totalBadge.find('.count-value');
|
||||
if ($countValue.length) {
|
||||
$countValue.text(total);
|
||||
} else {
|
||||
// Fallback: set HTML with icon
|
||||
$totalBadge.html('<i class="icon-eye"></i> <span class="count-value">' + total + '</span>');
|
||||
}
|
||||
$totalBadge.show();
|
||||
} else {
|
||||
$totalBadge.hide();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user