diff --git a/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx b/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx index a1a327561..23c99a78e 100644 --- a/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx +++ b/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx @@ -1,21 +1,28 @@ "use client"; import Head from "next/head"; +import { useTheme } from "next-themes"; import { api } from "@/utils/api"; export function WhitelabelingProvider() { + const { resolvedTheme } = useTheme(); const { data: config } = api.whitelabeling.getPublic.useQuery(undefined, { staleTime: 5 * 60 * 1000, refetchOnWindowFocus: false, }); + const faviconHref = config?.faviconUrl + ?? (resolvedTheme === "dark" ? "/icon-dark.svg" + : resolvedTheme === "light" ? "/icon-light.svg" + : "/icon.svg"); + if (!config) return null; return ( <> {config.metaTitle && {config.metaTitle}} - {config.faviconUrl && } + {config.customCss && ( diff --git a/apps/dokploy/public/icon-dark.svg b/apps/dokploy/public/icon-dark.svg new file mode 100644 index 000000000..5faafdb37 --- /dev/null +++ b/apps/dokploy/public/icon-dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/dokploy/public/icon-light.svg b/apps/dokploy/public/icon-light.svg new file mode 100644 index 000000000..6121a89dd --- /dev/null +++ b/apps/dokploy/public/icon-light.svg @@ -0,0 +1,5 @@ + + + + +