Skip to content

Commit 3951247

Browse files
committed
fix(ui): unify tab header styles across backups, schedules, volume backups and patches
1 parent a0e0574 commit 3951247

5 files changed

Lines changed: 40 additions & 64 deletions

File tree

‎apps/dokploy/components/dashboard/application/patches/show-patches.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ export const ShowPatches = ({ id, type }: Props) => {
8484

8585
return (
8686
<Card className="bg-background">
87-
<CardHeader className="flex flex-row items-center justify-between">
88-
<div>
89-
<CardTitle>Patches</CardTitle>
87+
<CardHeader className="flex flex-row items-center flex-wrap gap-4 justify-between">
88+
<div className="flex flex-col gap-1">
89+
<CardTitle className="text-xl">Patches</CardTitle>
9090
<CardDescription>
9191
Apply code patches to your repository during build. Patches are
9292
applied after cloning the repository and before building.

‎apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,19 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => {
7777
};
7878

7979
return (
80-
<Card className=" px-6 shadow-none bg-transparent h-full min-h-[50vh]">
81-
<CardHeader className="px-0">
82-
<div className="flex justify-between items-center gap-y-2 flex-wrap">
83-
<div className="flex flex-col gap-2">
84-
<CardTitle className="text-xl font-bold flex items-center gap-2">
85-
Scheduled Tasks
86-
</CardTitle>
87-
<CardDescription>
88-
Schedule tasks to run automatically at specified intervals.
89-
</CardDescription>
90-
</div>
91-
{schedules && schedules.length > 0 && (
92-
<HandleSchedules id={id} scheduleType={scheduleType} />
93-
)}
80+
<Card className="bg-background h-full min-h-[50vh]">
81+
<CardHeader className="flex flex-row items-center flex-wrap gap-4 justify-between">
82+
<div className="flex flex-col gap-1">
83+
<CardTitle className="text-xl">Scheduled Tasks</CardTitle>
84+
<CardDescription>
85+
Schedule tasks to run automatically at specified intervals.
86+
</CardDescription>
9487
</div>
88+
{schedules && schedules.length > 0 && (
89+
<HandleSchedules id={id} scheduleType={scheduleType} />
90+
)}
9591
</CardHeader>
96-
<CardContent className="px-0">
92+
<CardContent>
9793
{isLoadingSchedules ? (
9894
<div className="flex gap-4 w-full items-center justify-center text-center mx-auto min-h-[45vh]">
9995
<Loader2 className="size-4 text-muted-foreground/70 transition-colors animate-spin self-center" />

‎apps/dokploy/components/dashboard/application/volume-backups/show-volume-backups.tsx‎

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -77,35 +77,26 @@ export const ShowVolumeBackups = ({
7777
};
7878

7979
return (
80-
<Card className=" px-6 shadow-none bg-transparent h-full min-h-[50vh]">
81-
<CardHeader className="px-0">
82-
<div className="flex justify-between items-center flex-wrap gap-2">
83-
<div className="flex flex-col gap-2">
84-
<CardTitle className="text-xl font-bold flex items-center gap-2">
85-
Volume Backups
86-
</CardTitle>
87-
<CardDescription>
88-
Schedule volume backups to run automatically at specified
89-
intervals
90-
</CardDescription>
91-
</div>
92-
<div className="flex items-center gap-2 flex-wrap">
93-
{volumeBackups && volumeBackups.length > 0 && (
94-
<>
95-
<HandleVolumeBackups id={id} volumeBackupType={type} />
96-
<div className="flex items-center gap-2">
97-
<RestoreVolumeBackups
98-
id={id}
99-
type={type}
100-
serverId={serverId}
101-
/>
102-
</div>
103-
</>
104-
)}
105-
</div>
80+
<Card className="bg-background h-full min-h-[50vh]">
81+
<CardHeader className="flex flex-row items-center flex-wrap gap-4 justify-between">
82+
<div className="flex flex-col gap-1">
83+
<CardTitle className="text-xl">Volume Backups</CardTitle>
84+
<CardDescription>
85+
Schedule volume backups to run automatically at specified intervals
86+
</CardDescription>
87+
</div>
88+
<div className="flex items-center gap-2 flex-wrap">
89+
{volumeBackups && volumeBackups.length > 0 && (
90+
<>
91+
<HandleVolumeBackups id={id} volumeBackupType={type} />
92+
<div className="flex items-center gap-2">
93+
<RestoreVolumeBackups id={id} type={type} serverId={serverId} />
94+
</div>
95+
</>
96+
)}
10697
</div>
10798
</CardHeader>
108-
<CardContent className="px-0">
99+
<CardContent>
109100
{isLoadingVolumeBackups ? (
110101
<div className="flex gap-4 w-full items-center justify-center text-center mx-auto min-h-[45vh]">
111102
<Loader2 className="size-4 text-muted-foreground/70 transition-colors animate-spin self-center" />

‎apps/dokploy/components/dashboard/database/backups/show-backups.tsx‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
import {
2-
ClipboardList,
3-
Database,
4-
DatabaseBackup,
5-
Play,
6-
Trash2,
7-
} from "lucide-react";
1+
import { ClipboardList, DatabaseBackup, Play, Trash2 } from "lucide-react";
82
import Link from "next/link";
93
import { useState } from "react";
104
import { toast } from "sonner";
@@ -101,12 +95,9 @@ export const ShowBackups = ({
10195

10296
return (
10397
<Card className="bg-background">
104-
<CardHeader className="flex flex-row justify-between gap-4 flex-wrap">
105-
<div className="flex flex-col gap-0.5">
106-
<CardTitle className="text-xl flex flex-row gap-2">
107-
<Database className="size-6 text-muted-foreground" />
108-
Backups
109-
</CardTitle>
98+
<CardHeader className="flex flex-row items-center flex-wrap gap-4 justify-between">
99+
<div className="flex flex-col gap-1">
100+
<CardTitle className="text-xl">Backups</CardTitle>
110101
<CardDescription>
111102
Add backups to your database to save the data to a different
112103
provider.

‎apps/dokploy/pages/dashboard/schedules.tsx‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ function SchedulesPage() {
1212
{(serverId) => (
1313
<div className="w-full">
1414
<Card className="h-full bg-sidebar p-2.5 rounded-xl w-full min-h-[45vh]">
15-
<div className="rounded-xl bg-background shadow-md h-full">
16-
<ShowSchedules
17-
scheduleType={serverId ? "server" : "dokploy-server"}
18-
id={serverId ?? "dokploy-server"}
19-
/>
20-
</div>
15+
<ShowSchedules
16+
scheduleType={serverId ? "server" : "dokploy-server"}
17+
id={serverId ?? "dokploy-server"}
18+
/>
2119
</Card>
2220
</div>
2321
)}

0 commit comments

Comments
 (0)