mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
feat: show book counts per library and lens in sidebar
This commit is contained in:
@@ -113,6 +113,9 @@ onMounted(() => {
|
||||
<span :class="activeLibraryId === lib.id ? 'font-medium text-sidebar-foreground' : 'text-sidebar-foreground/70'">
|
||||
{{ lib.name }}
|
||||
</span>
|
||||
<span v-if="lib.bookCount !== undefined" class="ml-auto shrink-0 rounded-full bg-sidebar-foreground/10 px-2 py-0.5 text-xs tabular-nums text-sidebar-foreground/70 group-data-[collapsible=icon]:hidden">
|
||||
{{ lib.bookCount.toLocaleString() }}
|
||||
</span>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
</SidebarMenu>
|
||||
@@ -146,6 +149,9 @@ onMounted(() => {
|
||||
<span :class="activeLensId === lens.id ? 'font-medium text-sidebar-foreground' : 'text-sidebar-foreground/70'">
|
||||
{{ lens.name }}
|
||||
</span>
|
||||
<span v-if="lens.bookCount !== undefined" class="ml-auto shrink-0 rounded-full bg-sidebar-foreground/10 px-2 py-0.5 text-xs tabular-nums text-sidebar-foreground/70 group-data-[collapsible=icon]:hidden">
|
||||
{{ lens.bookCount.toLocaleString() }}
|
||||
</span>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
<SidebarMenuItem v-if="lenses.length === 0">
|
||||
|
||||
@@ -10,6 +10,7 @@ export interface Lens {
|
||||
filter: GroupRule | null
|
||||
defaultSort: SortSpec[]
|
||||
isPublic: boolean
|
||||
bookCount?: number
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user