fixed badge display

This commit is contained in:
Gamosoft 2025-12-07 10:41:11 +01:00
parent fcf39e9e68
commit 24a869d2f4
1 changed files with 20 additions and 4 deletions

View File

@ -1023,13 +1023,13 @@
<svg fill="currentColor" viewBox="0 0 20 20"> <svg fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M17.707 9.293a1 1 0 010 1.414l-7 7a1 1 0 01-1.414 0l-7-7A.997.997 0 012 10V5a3 3 0 013-3h5c.256 0 .512.098.707.293l7 7zM5 6a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"/> <path fill-rule="evenodd" d="M17.707 9.293a1 1 0 010 1.414l-7 7a1 1 0 01-1.414 0l-7-7A.997.997 0 012 10V5a3 3 0 013-3h5c.256 0 .512.098.707.293l7 7zM5 6a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"/>
</svg> </svg>
<!-- Selected tags badge --> <!-- Filtered notes badge (shows result count when tags selected) -->
<span <span
x-show="selectedTags.length > 0" x-show="selectedTags.length > 0"
x-cloak x-cloak
class="absolute -top-1 -right-1 w-4 h-4 text-[9px] font-bold rounded-full flex items-center justify-center" class="absolute -top-1 -right-1 w-4 h-4 text-[9px] font-bold rounded-full flex items-center justify-center"
style="background-color: var(--accent-primary); color: white;" style="background-color: var(--accent-primary); color: white;"
x-text="selectedTags.length" x-text="searchResults.length > 9 ? '9+' : searchResults.length"
></span> ></span>
</button> </button>
@ -2259,7 +2259,7 @@
<span>Files</span> <span>Files</span>
</button> </button>
<button <button
class="mobile-bottom-tab" class="mobile-bottom-tab relative"
:class="{'active': activePanel === 'search'}" :class="{'active': activePanel === 'search'}"
@click="activePanel = 'search'; mobileSidebarOpen = true;" @click="activePanel = 'search'; mobileSidebarOpen = true;"
aria-label="Search" aria-label="Search"
@ -2268,9 +2268,17 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
</svg> </svg>
<span>Search</span> <span>Search</span>
<!-- Search results badge -->
<span
x-show="searchQuery.trim() && searchResults.length > 0"
x-cloak
class="absolute top-1 right-1/4 w-4 h-4 text-[9px] font-bold rounded-full flex items-center justify-center"
style="background-color: var(--accent-primary); color: white;"
x-text="searchResults.length > 9 ? '9+' : searchResults.length"
></span>
</button> </button>
<button <button
class="mobile-bottom-tab" class="mobile-bottom-tab relative"
:class="{'active': activePanel === 'tags'}" :class="{'active': activePanel === 'tags'}"
@click="activePanel = 'tags'; mobileSidebarOpen = true;" @click="activePanel = 'tags'; mobileSidebarOpen = true;"
aria-label="Tags" aria-label="Tags"
@ -2279,6 +2287,14 @@
<path fill-rule="evenodd" d="M17.707 9.293a1 1 0 010 1.414l-7 7a1 1 0 01-1.414 0l-7-7A.997.997 0 012 10V5a3 3 0 013-3h5c.256 0 .512.098.707.293l7 7zM5 6a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"/> <path fill-rule="evenodd" d="M17.707 9.293a1 1 0 010 1.414l-7 7a1 1 0 01-1.414 0l-7-7A.997.997 0 012 10V5a3 3 0 013-3h5c.256 0 .512.098.707.293l7 7zM5 6a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"/>
</svg> </svg>
<span>Tags</span> <span>Tags</span>
<!-- Filtered notes badge (shows result count when tags selected) -->
<span
x-show="selectedTags.length > 0"
x-cloak
class="absolute top-1 right-1/4 w-4 h-4 text-[9px] font-bold rounded-full flex items-center justify-center"
style="background-color: var(--accent-primary); color: white;"
x-text="searchResults.length > 9 ? '9+' : searchResults.length"
></span>
</button> </button>
<button <button
class="mobile-bottom-tab" class="mobile-bottom-tab"