chore: clean up code by removing trailing whitespace and ensuring consistent formatting across various files = prettier

This commit is contained in:
Julien Froidefond
2025-12-01 08:37:30 +01:00
parent 757b1b84ab
commit e715779de7
98 changed files with 5453 additions and 3126 deletions

View File

@@ -37,13 +37,7 @@ import {
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import {
Database,
Trash2,
RotateCcw,
Save,
Clock,
} from "lucide-react";
import { Database, Trash2, RotateCcw, Save, Clock } from "lucide-react";
import { formatDistanceToNow } from "date-fns";
import { fr } from "date-fns/locale/fr";
import { toast } from "sonner";
@@ -84,10 +78,17 @@ export function BackupCard() {
if (backupsData.success) {
setBackups(
backupsData.data.map((b: { id: string; filename: string; size: number; createdAt: string }) => ({
...b,
createdAt: new Date(b.createdAt),
}))
backupsData.data.map(
(b: {
id: string;
filename: string;
size: number;
createdAt: string;
}) => ({
...b,
createdAt: new Date(b.createdAt),
}),
),
);
}
@@ -116,7 +117,9 @@ export function BackupCard() {
if (data.success) {
if (data.data.skipped) {
toast.info("Aucun changement détecté. La dernière sauvegarde a été mise à jour.");
toast.info(
"Aucun changement détecté. La dernière sauvegarde a été mise à jour.",
);
} else {
toast.success("Sauvegarde créée avec succès");
}
@@ -160,7 +163,9 @@ export function BackupCard() {
const data = await response.json();
if (data.success) {
toast.success("Sauvegarde restaurée avec succès. Rechargement de la page...");
toast.success(
"Sauvegarde restaurée avec succès. Rechargement de la page...",
);
setTimeout(() => {
window.location.reload();
}, 2000);
@@ -258,9 +263,9 @@ export function BackupCard() {
<Label htmlFor="backup-frequency">Fréquence</Label>
<Select
value={settings.frequency}
onValueChange={(value: "hourly" | "daily" | "weekly" | "monthly") =>
handleSettingsChange({ frequency: value })
}
onValueChange={(
value: "hourly" | "daily" | "weekly" | "monthly",
) => handleSettingsChange({ frequency: value })}
>
<SelectTrigger id="backup-frequency">
<SelectValue />
@@ -369,17 +374,16 @@ export function BackupCard() {
Restaurer cette sauvegarde ?
</AlertDialogTitle>
<AlertDialogDescription>
Cette action va remplacer votre base de données
actuelle par cette sauvegarde. Une sauvegarde
de sécurité sera créée avant la restauration.
Cette action va remplacer votre base de
données actuelle par cette sauvegarde. Une
sauvegarde de sécurité sera créée avant la
restauration.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Annuler</AlertDialogCancel>
<AlertDialogAction
onClick={() =>
handleRestoreBackup(backup.id)
}
onClick={() => handleRestoreBackup(backup.id)}
>
Restaurer
</AlertDialogAction>
@@ -406,9 +410,7 @@ export function BackupCard() {
<AlertDialogFooter>
<AlertDialogCancel>Annuler</AlertDialogCancel>
<AlertDialogAction
onClick={() =>
handleDeleteBackup(backup.id)
}
onClick={() => handleDeleteBackup(backup.id)}
>
Supprimer
</AlertDialogAction>
@@ -434,4 +436,3 @@ export function BackupCard() {
</Card>
);
}