From 4181fd7869ce3668bbdbe3b64539fac2f49a3e0f Mon Sep 17 00:00:00 2001 From: myung03 Date: Tue, 14 May 2024 16:05:58 -0700 Subject: [PATCH] fixed size display for locations cards --- interface/app/$libraryId/overview/StatCard.tsx | 10 +++++----- interface/app/$libraryId/overview/index.tsx | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/interface/app/$libraryId/overview/StatCard.tsx b/interface/app/$libraryId/overview/StatCard.tsx index d2c546cee..196aaa4d1 100644 --- a/interface/app/$libraryId/overview/StatCard.tsx +++ b/interface/app/$libraryId/overview/StatCard.tsx @@ -12,11 +12,12 @@ type StatCardProps = { freeSpace?: string | number[]; color: string; connectionType: 'lan' | 'p2p' | 'cloud' | null; + devices: boolean; }; const Pill = tw.div`px-1.5 py-[1px] rounded text-tiny font-medium text-ink-dull bg-app-box border border-app-line`; -const StatCard = ({ icon, name, connectionType, ...stats }: StatCardProps) => { +const StatCard = ({ icon, name, devices, connectionType, ...stats }: StatCardProps) => { const [mounted, setMounted] = useState(false); const isDark = useIsDark(); @@ -44,7 +45,7 @@ const StatCard = ({ icon, name, connectionType, ...stats }: StatCardProps) => { return ( -
+
{stats.freeSpace && ( { {name} {freeSpace.value} - {freeSpace.unit} {t('free_of')} {totalSpace.value} - {totalSpace.unit} + {freeSpace.unit} {devices && t('free_of') + " " + totalSpace.value + totalSpace.unit}
-
+
{connectionType || t('local')}
{/*