diff --git a/apps/dokploy/components/dashboard/projects/show.tsx b/apps/dokploy/components/dashboard/projects/show.tsx
index 10130ef13..770bb945a 100644
--- a/apps/dokploy/components/dashboard/projects/show.tsx
+++ b/apps/dokploy/components/dashboard/projects/show.tsx
@@ -17,6 +17,7 @@ import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
import { DateTooltip } from "@/components/shared/date-tooltip";
import { FocusShortcutInput } from "@/components/shared/focus-shortcut-input";
import { StatusTooltip } from "@/components/shared/status-tooltip";
+import { TagBadge } from "@/components/shared/tag-badge";
import { TagFilter } from "@/components/shared/tag-filter";
import {
AlertDialog,
@@ -29,7 +30,6 @@ import {
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
-import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
Card,
@@ -486,23 +486,11 @@ export const ShowProjects = () => {
project.projectTags.length > 0 && (
{project.projectTags.map((pt) => (
-
- {pt.tag.name}
-
+ name={pt.tag.name}
+ color={pt.tag.color}
+ />
))}
)}
diff --git a/apps/dokploy/components/dashboard/settings/tags/tag-manager.tsx b/apps/dokploy/components/dashboard/settings/tags/tag-manager.tsx
index 2aa905b75..2a074914c 100644
--- a/apps/dokploy/components/dashboard/settings/tags/tag-manager.tsx
+++ b/apps/dokploy/components/dashboard/settings/tags/tag-manager.tsx
@@ -5,6 +5,7 @@ import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
import { AlertBlock } from "@/components/shared/alert-block";
+import { TagBadge } from "@/components/shared/tag-badge";
import {
AlertDialog,
AlertDialogAction,
@@ -15,7 +16,6 @@ import {
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
-import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
Card,
@@ -232,16 +232,10 @@ export const HandleTag = ({ tagId }: HandleTagProps) => {
{colorValue && (
Preview:
-
- {form.watch("name") || "Tag Name"}
-
+
)}
@@ -355,18 +349,7 @@ export const TagManager = () => {
className="flex items-center justify-between rounded-lg border p-3 hover:bg-accent/50 transition-colors"
>
-
- {tag.name}
-
+
{tag.color && (
{tag.color}
diff --git a/apps/dokploy/components/shared/tag-badge.tsx b/apps/dokploy/components/shared/tag-badge.tsx
new file mode 100644
index 000000000..100e93dc8
--- /dev/null
+++ b/apps/dokploy/components/shared/tag-badge.tsx
@@ -0,0 +1,25 @@
+import { Badge } from "@/components/ui/badge";
+import { cn } from "@/lib/utils";
+
+interface TagBadgeProps {
+ name: string;
+ color?: string | null;
+ className?: string;
+ children?: React.ReactNode;
+}
+
+export function TagBadge({ name, color, className, children }: TagBadgeProps) {
+ return (
+
+ {name}
+ {children}
+
+ );
+}
diff --git a/apps/dokploy/components/shared/tag-filter.tsx b/apps/dokploy/components/shared/tag-filter.tsx
index f14ccb12b..a5eda4d44 100644
--- a/apps/dokploy/components/shared/tag-filter.tsx
+++ b/apps/dokploy/components/shared/tag-filter.tsx
@@ -1,6 +1,7 @@
import { Filter } from "lucide-react";
import * as React from "react";
import { HandleTag } from "@/components/dashboard/settings/tags/tag-manager";
+import { TagBadge } from "@/components/shared/tag-badge";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
@@ -109,18 +110,7 @@ export function TagFilter({
className="mr-2"
onCheckedChange={() => handleTagToggle(tag.id)}
/>
-
- {tag.name}
-
+
);
})}
diff --git a/apps/dokploy/components/shared/tag-selector.tsx b/apps/dokploy/components/shared/tag-selector.tsx
index e20a9d465..5ce64380f 100644
--- a/apps/dokploy/components/shared/tag-selector.tsx
+++ b/apps/dokploy/components/shared/tag-selector.tsx
@@ -1,7 +1,7 @@
import { Check, ChevronsUpDown, X } from "lucide-react";
import * as React from "react";
import { HandleTag } from "@/components/dashboard/settings/tags/tag-manager";
-import { Badge } from "@/components/ui/badge";
+import { TagBadge } from "@/components/shared/tag-badge";
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
import {
@@ -77,17 +77,12 @@ export function TagSelector({
{selectedTagObjects.length > 0 ? (
selectedTagObjects.map((tag) => (
-
- {tag.name}
-
+
))
) : (
{placeholder}
@@ -132,19 +127,11 @@ export function TagSelector({
className="mr-2"
onCheckedChange={() => handleTagToggle(tag.id)}
/>
-
- {tag.name}
-
+