mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-20 15:18:21 +03:00
show activity indicator on trash icon while deleting a profile
This commit is contained in:
parent
af0696771a
commit
8d633423b0
@ -510,12 +510,17 @@ export default function ProfilesView({
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
className="size-7 text-muted-foreground hover:text-destructive"
|
className="size-7 text-muted-foreground hover:text-destructive"
|
||||||
|
disabled={deleting && deleteProfile === profile}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setDeleteProfile(profile);
|
setDeleteProfile(profile);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Trash2 className="size-4" />
|
{deleting && deleteProfile === profile ? (
|
||||||
|
<ActivityIndicator className="size-4" />
|
||||||
|
) : (
|
||||||
|
<Trash2 className="size-4" />
|
||||||
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -650,7 +655,10 @@ export default function ProfilesView({
|
|||||||
</AlertDialogCancel>
|
</AlertDialogCancel>
|
||||||
<AlertDialogAction
|
<AlertDialogAction
|
||||||
className="bg-destructive text-white hover:bg-destructive/90"
|
className="bg-destructive text-white hover:bg-destructive/90"
|
||||||
onClick={handleDeleteProfile}
|
onClick={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
handleDeleteProfile();
|
||||||
|
}}
|
||||||
disabled={deleting}
|
disabled={deleting}
|
||||||
>
|
>
|
||||||
{deleting && <ActivityIndicator className="mr-2 size-4" />}
|
{deleting && <ActivityIndicator className="mr-2 size-4" />}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user