feat(api): recursively calculate directory sizes for public share folders and display on UI
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m24s

This commit is contained in:
Elijah 2026-05-23 17:27:09 -07:00
parent 755c791af5
commit 96ca68b35c
2 changed files with 25 additions and 5 deletions

View file

@ -247,7 +247,7 @@ export default function PublicSharePage({ params }: { params: Promise<{ id: stri
className="flex items-center gap-2 px-5 py-2.5 rounded-xl font-medium transition-all hover:bg-white/10 bg-white/5 border border-white/10 text-white shadow-lg"
>
<Download className="w-4 h-4" />
Download ZIP
Download ZIP ({formatSize(fileInfo?.size || 0)})
</button>
</div>
)}
@ -287,7 +287,7 @@ export default function PublicSharePage({ params }: { params: Promise<{ id: stri
style={{ background: 'linear-gradient(135deg, #6366f1, #8b5cf6)' }}
>
<Download className="w-5 h-5" />
Download File
Download File ({formatSize(fileInfo?.size || 0)})
</button>
</div>
) : (
@ -326,7 +326,7 @@ export default function PublicSharePage({ params }: { params: Promise<{ id: stri
</span>
</td>
<td className="py-4 text-white/50 text-sm">
{f.is_dir ? '--' : formatSize(f.size)}
{formatSize(f.size)}
</td>
<td className="py-4 pr-4 text-right">
<button