mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: tweak stat card
This commit is contained in:
@@ -14,9 +14,9 @@ export const StatCard = ({ icon, label, count, onClick, tooltip, className }: St
|
|||||||
>
|
>
|
||||||
<div className="w-auto flex justify-start items-center mr-1">
|
<div className="w-auto flex justify-start items-center mr-1">
|
||||||
{icon}
|
{icon}
|
||||||
<span className="block text-xs opacity-80">{label}</span>
|
<span className="block text-sm opacity-80">{label}</span>
|
||||||
</div>
|
</div>
|
||||||
<span className="text-xs truncate opacity-80">{count}</span>
|
<span className="text-sm truncate opacity-80">{count}</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ const StatisticsView = observer(() => {
|
|||||||
<div className="pt-1 w-full flex flex-row justify-start items-center gap-1 flex-wrap">
|
<div className="pt-1 w-full flex flex-row justify-start items-center gap-1 flex-wrap">
|
||||||
{isRootPath && hasPinnedMemos && (
|
{isRootPath && hasPinnedMemos && (
|
||||||
<StatCard
|
<StatCard
|
||||||
icon={<BookmarkIcon className="w-3 h-auto mr-1 opacity-70" />}
|
icon={<BookmarkIcon className="w-4 h-auto mr-1 opacity-70" />}
|
||||||
label={t("common.pinned")}
|
label={t("common.pinned")}
|
||||||
count={userStore.state.currentUserStats!.pinnedMemos.length}
|
count={userStore.state.currentUserStats!.pinnedMemos.length}
|
||||||
onClick={() => handleFilterClick("pinned")}
|
onClick={() => handleFilterClick("pinned")}
|
||||||
@@ -57,7 +57,7 @@ const StatisticsView = observer(() => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<StatCard
|
<StatCard
|
||||||
icon={<LinkIcon className="w-3 h-auto mr-1 opacity-70" />}
|
icon={<LinkIcon className="w-4 h-auto mr-1 opacity-70" />}
|
||||||
label={t("memo.links")}
|
label={t("memo.links")}
|
||||||
count={memoTypeStats.linkCount}
|
count={memoTypeStats.linkCount}
|
||||||
onClick={() => handleFilterClick("property.hasLink")}
|
onClick={() => handleFilterClick("property.hasLink")}
|
||||||
@@ -66,9 +66,9 @@ const StatisticsView = observer(() => {
|
|||||||
<StatCard
|
<StatCard
|
||||||
icon={
|
icon={
|
||||||
memoTypeStats.undoCount > 0 ? (
|
memoTypeStats.undoCount > 0 ? (
|
||||||
<ListTodoIcon className="w-3 h-auto mr-1 opacity-70" />
|
<ListTodoIcon className="w-4 h-auto mr-1 opacity-70" />
|
||||||
) : (
|
) : (
|
||||||
<CheckCircleIcon className="w-3 h-auto mr-1 opacity-70" />
|
<CheckCircleIcon className="w-4 h-auto mr-1 opacity-70" />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
label={t("memo.to-do")}
|
label={t("memo.to-do")}
|
||||||
@@ -88,7 +88,7 @@ const StatisticsView = observer(() => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<StatCard
|
<StatCard
|
||||||
icon={<Code2Icon className="w-3 h-auto mr-1 opacity-70" />}
|
icon={<Code2Icon className="w-4 h-auto mr-1 opacity-70" />}
|
||||||
label={t("memo.code")}
|
label={t("memo.code")}
|
||||||
count={memoTypeStats.codeCount}
|
count={memoTypeStats.codeCount}
|
||||||
onClick={() => handleFilterClick("property.hasCode")}
|
onClick={() => handleFilterClick("property.hasCode")}
|
||||||
|
Reference in New Issue
Block a user