Skip to content

Commit 8c90040

Browse files
committed
fix(tag-filter): update no tags message and improve layout
- Changed the message displayed when no tags are found to "No tags created yet." for better clarity. - Added a consistent layout for the tag handling component in both TagFilter and TagSelector, ensuring a unified user experience.
1 parent 8db1250 commit 8c90040

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎apps/dokploy/components/shared/tag-filter.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ export function TagFilter({
9494
<CommandEmpty>
9595
<div className="flex flex-col items-center gap-2 py-1">
9696
<span className="text-sm text-muted-foreground">
97-
No tags found.
97+
{tags.length === 0
98+
? "No tags created yet."
99+
: "No tags found."}
98100
</span>
99-
<HandleTag />
100101
</div>
101102
</CommandEmpty>
102103
<CommandGroup>
@@ -118,6 +119,9 @@ export function TagFilter({
118119
);
119120
})}
120121
</CommandGroup>
122+
<div className="flex items-center justify-center p-2 border-t">
123+
<HandleTag />
124+
</div>
121125
</CommandList>
122126
</Command>
123127
</PopoverContent>

‎apps/dokploy/components/shared/tag-selector.tsx‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,12 @@ export function TagSelector({
111111
<CommandEmpty>
112112
<div className="flex flex-col items-center gap-2 py-1">
113113
<span className="text-sm text-muted-foreground">
114-
No tags found.
114+
{tags.length === 0
115+
? "No tags created yet."
116+
: "No tags found."}
115117
</span>
116-
<HandleTag />
117118
</div>
118119
</CommandEmpty>
119-
{tags.length === 0 && (
120-
<div className="flex flex-col items-center gap-2 py-4">
121-
<span className="text-sm text-muted-foreground">
122-
No tags created yet.
123-
</span>
124-
<HandleTag />
125-
</div>
126-
)}
127120
<CommandGroup>
128121
{tags.map((tag) => {
129122
const isSelected = selectedTags.includes(tag.id);
@@ -153,6 +146,9 @@ export function TagSelector({
153146
);
154147
})}
155148
</CommandGroup>
149+
<div className="flex items-center justify-center p-2 border-t">
150+
<HandleTag />
151+
</div>
156152
</CommandList>
157153
</Command>
158154
</PopoverContent>

0 commit comments

Comments
 (0)