Add Sonner-based notifications and UX polish

This commit is contained in:
MOH
2026-03-10 17:43:26 +01:00
parent eceb0f3a54
commit 77cc9dca87
32 changed files with 279 additions and 310 deletions
+4 -1
View File
@@ -21,7 +21,10 @@ export async function updateMaintenanceModeAction(formData: FormData) {
const nextValue = formData.get("enabled") === "true";
const redirectPath = String(formData.get("redirectPath") ?? "/root");
const redirectUrl = new URL(redirectPath, "http://localhost");
redirectUrl.searchParams.set("__saved", "maintenance");
redirectUrl.searchParams.set(
"success",
nextValue ? "Wartungsmodus aktiviert." : "Wartungsmodus deaktiviert.",
);
await setMaintenanceMode(nextValue);
revalidatePath("/", "layout");