From 4f835c6c5e0ff330aaa9c224c199ebca07001943 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 4 Oct 2025 20:56:38 -0600 Subject: [PATCH] feat: add warning alert for URL changes in WebDomain component --- .../dashboard/settings/web-domain.tsx | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/apps/dokploy/components/dashboard/settings/web-domain.tsx b/apps/dokploy/components/dashboard/settings/web-domain.tsx index cafb95f53..3bbd961f9 100644 --- a/apps/dokploy/components/dashboard/settings/web-domain.tsx +++ b/apps/dokploy/components/dashboard/settings/web-domain.tsx @@ -5,6 +5,7 @@ import { useEffect } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; +import { AlertBlock } from "@/components/shared/alert-block"; import { Button } from "@/components/ui/button"; import { Card, @@ -76,6 +77,10 @@ export const WebDomain = () => { resolver: zodResolver(addServerDomain), }); const https = form.watch("https"); + const domain = form.watch("domain") || ""; + const host = data?.user?.host || ""; + const hasChanged = domain !== host; + console.log(domain, host); useEffect(() => { if (data) { form.reset({ @@ -119,6 +124,36 @@ export const WebDomain = () => { + {/* Warning for GitHub webhook URL changes */} + {hasChanged && ( + +
+

⚠️ Important: URL Change Impact

+

+ If you change the Dokploy Server URL from{" "} + {domain} to a new URL, you will need to update: +

+
    +
  • + GitHub Apps: Update webhook URLs in your + Github Apps settings +
  • +
  • + GitLab Apps: Update redirect URIs in your + GitLab Apps settings +
  • +
  • + Gitea Apps: Update redirect URIs in your + Gitea Apps settings +
  • +
+

+ 💡 Tip: Consider recreating Git providers + after URL changes to avoid manual configuration. +

+
+
+ )}