Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-19 18:28:09 +00:00
co-authored by renee-png
parent 99888be948
commit 8792cdb823
+25 -1
View File
@@ -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>
)}