feat(trash): disable delete now button when trash is empty

This commit is contained in:
yiling
2026-06-11 16:25:18 +08:00
parent f093b490c6
commit 8bd34904ff
@@ -838,7 +838,7 @@ export function FileBrowser({
<Button
variant="destructive"
size="sm"
disabled={isEmptyingTrash}
disabled={isEmptyingTrash || (folders.length === 0 && displayedFiles.length === 0)}
onClick={() => setIsEmptyTrashDialogOpen(true)}
className="h-8 px-3 text-xs font-medium bg-destructive/10 text-destructive border border-destructive/20 hover:bg-destructive hover:text-destructive-foreground transition-all duration-200"
>