diff --git a/interface/app/$libraryId/overview/LibraryStats.tsx b/interface/app/$libraryId/overview/LibraryStats.tsx index 38b4ec2ed..e573ee289 100644 --- a/interface/app/$libraryId/overview/LibraryStats.tsx +++ b/interface/app/$libraryId/overview/LibraryStats.tsx @@ -115,7 +115,7 @@ const LibraryStats = () => { } const { statistics } = stats.data; - const totalSpace = Number(statistics.total_local_bytes_capacity); + const totalSpace = Number(statistics.total_library_bytes); const totalUsedSpace = Number(statistics.total_local_bytes_used); // Define the major categories and aggregate the "Other" category @@ -146,11 +146,11 @@ const LibraryStats = () => { const sections: Section[] = Object.entries(aggregatedData).map(([name, data], index) => { const colors = [ + '#6D90B9', // Gray '#3A7ECC', // Slightly Darker Blue 400 - '#AAAAAA', // Gray '#004C99', // Tailwind Blue 700 '#2563EB', // Tailwind Blue 500 - '#00274D' // Dark Navy Blue, + '#004C99' // Dark Navy Blue, ]; const color = colors[index % colors.length] || '#8F8F8F'; // Use a default color if colors array is empty @@ -162,14 +162,6 @@ const LibraryStats = () => { }; }); - // Add System Data section - sections.push({ - name: 'System Data', - value: systemDataBytes, - color: '#2F3038', // Gray for System Data - tooltip: 'System data that exists outside of your Spacedrive library' - }); - return (
diff --git a/interface/app/$libraryId/overview/StorageBar.tsx b/interface/app/$libraryId/overview/StorageBar.tsx index 955f54237..230b59d93 100644 --- a/interface/app/$libraryId/overview/StorageBar.tsx +++ b/interface/app/$libraryId/overview/StorageBar.tsx @@ -44,27 +44,24 @@ const StorageBar: React.FC = ({ sections, totalSpace }) => { return `${pixvalue.toFixed(2)}px`; }; - const usedSpace = sections.reduce((acc, section) => acc + section.value, 0); - const unusedSpace = totalSpace - usedSpace; - - const nonSystemSections = sections.filter((section) => section.name !== 'System Data'); - const systemSection = sections.find((section) => section.name === 'System Data'); + // Sort sections by value from smallest to largest + const sortedSections = sections.sort((a, b) => a.value - b.value); return (
- {nonSystemSections.map((section, index) => { + {sortedSections.map((section, index) => { const humanizedValue = humanizeSize(section.value); const isHovered = hoveredSectionIndex === index; return (
= ({ sections, totalSpace }) => { ); })} - {unusedSpace > 0 && ( -
- )} - {systemSection && ( - -
- - )}
- {sections.map((section, index) => ( - + {sortedSections.map((section, index) => ( +
setHoveredSectionIndex(index)}