Skip to content

Commit ae95485

Browse files
committed
fix(ui): structurally resolve unclickable watch path badges
1 parent 1c44141 commit ae95485

10 files changed

Lines changed: 60 additions & 30 deletions

‎apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,14 +438,17 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
438438
{field.value?.map((path, index) => (
439439
<Badge key={index} variant="secondary">
440440
{path}
441-
<X
442-
className="ml-1 size-3 cursor-pointer"
441+
<button
442+
type="button"
443+
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
443444
onClick={() => {
444445
const newPaths = [...(field.value || [])];
445446
newPaths.splice(index, 1);
446447
form.setValue("watchPaths", newPaths);
447448
}}
448-
/>
449+
>
450+
<X className="size-3" />
451+
</button>
449452
</Badge>
450453
))}
451454
</div>

‎apps/dokploy/components/dashboard/application/general/generic/save-git-provider.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,17 @@ export const SaveGitProvider = ({ applicationId }: Props) => {
242242
{field.value?.map((path, index) => (
243243
<Badge key={index} variant="secondary">
244244
{path}
245-
<X
246-
className="ml-1 size-3 cursor-pointer"
245+
<button
246+
type="button"
247+
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
247248
onClick={() => {
248249
const newPaths = [...(field.value || [])];
249250
newPaths.splice(index, 1);
250251
form.setValue("watchPaths", newPaths);
251252
}}
252-
/>
253+
>
254+
<X className="size-3" />
255+
</button>
253256
</Badge>
254257
))}
255258
</div>

‎apps/dokploy/components/dashboard/application/general/generic/save-gitea-provider.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,14 +466,17 @@ export const SaveGiteaProvider = ({ applicationId }: Props) => {
466466
className="flex items-center gap-1"
467467
>
468468
{path}
469-
<X
470-
className="size-3 cursor-pointer hover:text-destructive"
469+
<button
470+
type="button"
471+
className="cursor-pointer hover:text-destructive focus:outline-none"
471472
onClick={() => {
472473
const newPaths = [...(field.value || [])];
473474
newPaths.splice(index, 1);
474475
field.onChange(newPaths);
475476
}}
476-
/>
477+
>
478+
<X className="size-3" />
479+
</button>
477480
</Badge>
478481
))}
479482
</div>

‎apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,14 +478,17 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
478478
className="flex items-center gap-1"
479479
>
480480
{path}
481-
<X
482-
className="size-3 cursor-pointer hover:text-destructive"
481+
<button
482+
type="button"
483+
className="cursor-pointer hover:text-destructive focus:outline-none"
483484
onClick={() => {
484485
const newPaths = [...(field.value || [])];
485486
newPaths.splice(index, 1);
486487
field.onChange(newPaths);
487488
}}
488-
/>
489+
>
490+
<X className="size-3" />
491+
</button>
489492
</Badge>
490493
))}
491494
</div>

‎apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,14 +459,17 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
459459
className="flex items-center gap-1"
460460
>
461461
{path}
462-
<X
463-
className="size-3 cursor-pointer hover:text-destructive"
462+
<button
463+
type="button"
464+
className="cursor-pointer hover:text-destructive focus:outline-none"
464465
onClick={() => {
465466
const newPaths = [...(field.value || [])];
466467
newPaths.splice(index, 1);
467468
field.onChange(newPaths);
468469
}}
469-
/>
470+
>
471+
<X className="size-3" />
472+
</button>
470473
</Badge>
471474
))}
472475
</div>

‎apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,17 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
442442
{field.value?.map((path, index) => (
443443
<Badge key={index} variant="secondary">
444444
{path}
445-
<X
446-
className="ml-1 size-3 cursor-pointer"
445+
<button
446+
type="button"
447+
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
447448
onClick={() => {
448449
const newPaths = [...(field.value || [])];
449450
newPaths.splice(index, 1);
450451
form.setValue("watchPaths", newPaths);
451452
}}
452-
/>
453+
>
454+
<X className="size-3" />
455+
</button>
453456
</Badge>
454457
))}
455458
</div>

‎apps/dokploy/components/dashboard/compose/general/generic/save-git-provider-compose.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,17 @@ export const SaveGitProviderCompose = ({ composeId }: Props) => {
251251
{field.value?.map((path, index) => (
252252
<Badge key={index} variant="secondary">
253253
{path}
254-
<X
255-
className="ml-1 size-3 cursor-pointer"
254+
<button
255+
type="button"
256+
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
256257
onClick={() => {
257258
const newPaths = [...(field.value || [])];
258259
newPaths.splice(index, 1);
259260
form.setValue("watchPaths", newPaths);
260261
}}
261-
/>
262+
>
263+
<X className="size-3" />
264+
</button>
262265
</Badge>
263266
))}
264267
</div>

‎apps/dokploy/components/dashboard/compose/general/generic/save-gitea-provider-compose.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,14 +431,17 @@ export const SaveGiteaProviderCompose = ({ composeId }: Props) => {
431431
{field.value?.map((path, index) => (
432432
<Badge key={index} variant="secondary">
433433
{path}
434-
<X
435-
className="ml-1 size-3 cursor-pointer"
434+
<button
435+
type="button"
436+
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
436437
onClick={() => {
437438
const newPaths = [...(field.value || [])];
438439
newPaths.splice(index, 1);
439440
form.setValue("watchPaths", newPaths);
440441
}}
441-
/>
442+
>
443+
<X className="size-3" />
444+
</button>
442445
</Badge>
443446
))}
444447
</div>

‎apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,14 +470,17 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
470470
{field.value?.map((path, index) => (
471471
<Badge key={index} variant="secondary">
472472
{path}
473-
<X
474-
className="ml-1 size-3 cursor-pointer"
473+
<button
474+
type="button"
475+
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
475476
onClick={() => {
476477
const newPaths = [...(field.value || [])];
477478
newPaths.splice(index, 1);
478479
form.setValue("watchPaths", newPaths);
479480
}}
480-
/>
481+
>
482+
<X className="size-3" />
483+
</button>
481484
</Badge>
482485
))}
483486
</div>

‎apps/dokploy/components/dashboard/compose/general/generic/save-gitlab-provider-compose.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,14 +460,17 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
460460
{field.value?.map((path, index) => (
461461
<Badge key={index} variant="secondary">
462462
{path}
463-
<X
464-
className="ml-1 size-3 cursor-pointer"
463+
<button
464+
type="button"
465+
className="ml-1 cursor-pointer hover:text-destructive focus:outline-none"
465466
onClick={() => {
466467
const newPaths = [...(field.value || [])];
467468
newPaths.splice(index, 1);
468469
form.setValue("watchPaths", newPaths);
469470
}}
470-
/>
471+
>
472+
<X className="size-3" />
473+
</button>
471474
</Badge>
472475
))}
473476
</div>

0 commit comments

Comments
 (0)