mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-09 05:25:18 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -60,10 +60,7 @@ export const TagManager = () => {
|
|||||||
>
|
>
|
||||||
<div className="flex items-center justify-between p-3.5 rounded-lg bg-background border w-full">
|
<div className="flex items-center justify-between p-3.5 rounded-lg bg-background border w-full">
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<TagBadge
|
<TagBadge name={tag.name} color={tag.color} />
|
||||||
name={tag.name}
|
|
||||||
color={tag.color}
|
|
||||||
/>
|
|
||||||
{tag.color && (
|
{tag.color && (
|
||||||
<span className="text-xs text-muted-foreground font-mono">
|
<span className="text-xs text-muted-foreground font-mono">
|
||||||
{tag.color}
|
{tag.color}
|
||||||
@@ -74,36 +71,35 @@ export const TagManager = () => {
|
|||||||
{permissions?.tag.update && (
|
{permissions?.tag.update && (
|
||||||
<HandleTag tagId={tag.tagId} />
|
<HandleTag tagId={tag.tagId} />
|
||||||
)}
|
)}
|
||||||
{permissions?.tag.delete && (<DialogAction
|
{permissions?.tag.delete && (
|
||||||
title="Delete Tag"
|
<DialogAction
|
||||||
description={`Are you sure you want to delete the tag "${tag.name}"? This will remove the tag from all projects. This action cannot be undone.`}
|
title="Delete Tag"
|
||||||
type="destructive"
|
description={`Are you sure you want to delete the tag "${tag.name}"? This will remove the tag from all projects. This action cannot be undone.`}
|
||||||
onClick={async () => {
|
type="destructive"
|
||||||
await deleteTag({
|
onClick={async () => {
|
||||||
tagId: tag.tagId,
|
await deleteTag({
|
||||||
})
|
tagId: tag.tagId,
|
||||||
.then(async () => {
|
|
||||||
await utils.tag.all.invalidate();
|
|
||||||
toast.success(
|
|
||||||
"Tag deleted successfully",
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.then(async () => {
|
||||||
toast.error(
|
await utils.tag.all.invalidate();
|
||||||
"Error deleting tag",
|
toast.success(
|
||||||
);
|
"Tag deleted successfully",
|
||||||
});
|
);
|
||||||
}}
|
})
|
||||||
>
|
.catch(() => {
|
||||||
<Button
|
toast.error("Error deleting tag");
|
||||||
variant="ghost"
|
});
|
||||||
size="icon"
|
}}
|
||||||
className="group hover:bg-red-500/10"
|
|
||||||
isLoading={isRemoving}
|
|
||||||
>
|
>
|
||||||
<Trash2 className="size-4 text-primary group-hover:text-red-500" />
|
<Button
|
||||||
</Button>
|
variant="ghost"
|
||||||
</DialogAction>
|
size="icon"
|
||||||
|
className="group hover:bg-red-500/10"
|
||||||
|
isLoading={isRemoving}
|
||||||
|
>
|
||||||
|
<Trash2 className="size-4 text-primary group-hover:text-red-500" />
|
||||||
|
</Button>
|
||||||
|
</DialogAction>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -75,7 +75,10 @@ export function TagFilter({
|
|||||||
<PopoverContent className="w-64 p-0" align="start">
|
<PopoverContent className="w-64 p-0" align="start">
|
||||||
<Command>
|
<Command>
|
||||||
<div className="flex items-center border-b px-3">
|
<div className="flex items-center border-b px-3">
|
||||||
<CommandInput placeholder="Search tags..." className="h-9 focus-visible:ring-0" />
|
<CommandInput
|
||||||
|
placeholder="Search tags..."
|
||||||
|
className="h-9 focus-visible:ring-0"
|
||||||
|
/>
|
||||||
{selectedTags.length > 0 && (
|
{selectedTags.length > 0 && (
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
|
|||||||
@@ -103,7 +103,10 @@ export function TagSelector({
|
|||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent className="w-full p-0" align="start">
|
<PopoverContent className="w-full p-0" align="start">
|
||||||
<Command>
|
<Command>
|
||||||
<CommandInput placeholder="Search tags..." className="focus-visible:ring-0" />
|
<CommandInput
|
||||||
|
placeholder="Search tags..."
|
||||||
|
className="focus-visible:ring-0"
|
||||||
|
/>
|
||||||
<CommandList>
|
<CommandList>
|
||||||
<CommandEmpty>
|
<CommandEmpty>
|
||||||
<div className="flex flex-col items-center gap-2 py-1">
|
<div className="flex flex-col items-center gap-2 py-1">
|
||||||
|
|||||||
Reference in New Issue
Block a user