mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-22 07:28:43 -04:00
* init * changes * Now updating statistics once a minute * More robust statistics updater * Concurrency is hard * improvements to stats * refactor * adjust setting back/forward padding so it matches top bar * refactor sidebar * rename * setting up screens * some changes * Co-authored-by: Brendan Allan <Brendonovich@users.noreply.github.com> * yes * yes2 * refactored explorerItem.ts * important explorer code shouldn't be thrown away in a util moment * support for multiple thumbnails in ExplorerItem * clippy * move debug * yes * label filters * ts * comment out unconnected stuff * added .mid for midi files --------- Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { Clock, Heart, Planet, Tag } from '@phosphor-icons/react';
|
|
import { useLibraryQuery } from '@sd/client';
|
|
|
|
import Icon from '../../SidebarLayout/Icon';
|
|
import SidebarLink from '../../SidebarLayout/Link';
|
|
|
|
export const COUNT_STYLE = `absolute right-1 min-w-[20px] top-1 flex h-[19px] px-1 items-center justify-center rounded-full border border-app-button/40 text-[9px]`;
|
|
|
|
export default function LibrarySection() {
|
|
const labelCount = useLibraryQuery(['labels.count']);
|
|
|
|
return (
|
|
<div className="space-y-0.5">
|
|
<SidebarLink to="overview">
|
|
<Icon component={Planet} />
|
|
Overview
|
|
</SidebarLink>
|
|
<SidebarLink to="recents">
|
|
<Icon component={Clock} />
|
|
Recents
|
|
{/* <div className={COUNT_STYLE}>34</div> */}
|
|
</SidebarLink>
|
|
<SidebarLink to="favorites">
|
|
<Icon component={Heart} />
|
|
Favorites
|
|
{/* <div className={COUNT_STYLE}>2</div> */}
|
|
</SidebarLink>
|
|
<SidebarLink to="labels">
|
|
<Icon component={Tag} />
|
|
Labels
|
|
<div className={COUNT_STYLE}>{labelCount.data || 0}</div>
|
|
</SidebarLink>
|
|
</div>
|
|
);
|
|
}
|