Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
99888be948
commit
8792cdb823
@@ -258,8 +258,32 @@ function ArchivePage() {
|
||||
<div className="text-xs text-muted-foreground whitespace-nowrap">
|
||||
Showing {rows.length} of {totalCount} {debouncedSearch ? "matching" : ""} rows
|
||||
</div>
|
||||
{isAdmin && activeId && (
|
||||
<Button
|
||||
variant={isLocked ? "default" : "outline"}
|
||||
size="sm"
|
||||
onClick={toggleLock}
|
||||
title={isLocked ? "Tab is locked — click to unlock" : "Tab is unlocked — click to lock"}
|
||||
>
|
||||
{isLocked ? (
|
||||
<>
|
||||
<Lock className="h-4 w-4 mr-1" /> Locked
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Unlock className="h-4 w-4 mr-1" /> Unlocked
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
{isAdmin && rows.length > 0 && (
|
||||
<Button variant="outline" size="sm" onClick={deleteAllInCategory}>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={deleteAllInCategory}
|
||||
disabled={isLocked}
|
||||
title={isLocked ? "Unlock tab to clear" : "Delete all rows in this tab"}
|
||||
>
|
||||
<Trash2 className="h-4 w-4 mr-1" /> Clear tab
|
||||
</Button>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user