mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 23:54:25 +00:00
feat(trash): disable delete now button when trash is empty
This commit is contained in:
@@ -838,7 +838,7 @@ export function FileBrowser({
|
|||||||
<Button
|
<Button
|
||||||
variant="destructive"
|
variant="destructive"
|
||||||
size="sm"
|
size="sm"
|
||||||
disabled={isEmptyingTrash}
|
disabled={isEmptyingTrash || (folders.length === 0 && displayedFiles.length === 0)}
|
||||||
onClick={() => setIsEmptyTrashDialogOpen(true)}
|
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"
|
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"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user