fix: resolve public share downloads and sort storage overview by size
All checks were successful
Automated Container Build / build-and-push (push) Successful in 35s

This commit is contained in:
Elijah 2026-05-23 10:12:53 -07:00
parent fb3f3a3393
commit 5c2eaf49e4
2 changed files with 13 additions and 4 deletions

View file

@ -63,6 +63,8 @@ export default function StorageDashboard() {
const totalDriveSize = 100 * 1024 * 1024 * 1024; // Dummy 100GB capacity for visualization, could be dynamic
const sortedCategories = [...data.categories].sort((a, b) => b.size - a.size);
return (
<div className="flex-1 overflow-y-auto p-8 max-w-5xl mx-auto w-full">
<div className="mb-8 flex items-center gap-4">
@ -85,7 +87,7 @@ export default function StorageDashboard() {
{/* Progress Bar */}
<div className="h-4 w-full rounded-full overflow-hidden flex gap-0.5" style={{ backgroundColor: 'var(--color-bg-secondary)' }}>
{data.categories.map(cat => {
{sortedCategories.map(cat => {
const pct = (cat.size / Math.max(data.total_size, 1)) * 100;
if (pct === 0) return null;
return (
@ -104,7 +106,7 @@ export default function StorageDashboard() {
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
{data.categories.map((cat, idx) => {
{sortedCategories.map((cat, idx) => {
const config = categoryConfig[cat.category] || categoryConfig.other;
const Icon = config.icon;
return (