Skip to content

Commit 4a74016

Browse files
committed
feat(dashboard): replace Chatwoot widget with HubSpot widget in dashboard layout
- Updated the dashboard layout to use the HubSpotWidget instead of ChatwootWidget. - Added a new HubSpotWidget component that loads the HubSpot script asynchronously.
1 parent bd4964f commit 4a74016

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

apps/dokploy/components/layouts/dashboard-layout.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { api } from "@/utils/api";
22
import { ImpersonationBar } from "../dashboard/impersonation/impersonation-bar";
3-
import { ChatwootWidget } from "../shared/ChatwootWidget";
3+
import { HubSpotWidget } from "../shared/HubSpotWidget";
44
import Page from "./side";
55

66
interface Props {
@@ -25,7 +25,9 @@ export const DashboardLayout = ({ children }: Props) => {
2525
<>
2626
<Page>{children}</Page>
2727
{isCloud === true && isUserSubscribed === true && (
28-
<ChatwootWidget websiteToken="USCpQRKzHvFMssf3p6Eacae5" />
28+
<>
29+
<HubSpotWidget />
30+
</>
2931
)}
3032

3133
{haveRootAccess === true && <ImpersonationBar />}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Script from "next/script";
2+
3+
export const HubSpotWidget = () => {
4+
return (
5+
<Script
6+
id="hs-script-loader"
7+
type="text/javascript"
8+
src="//js-eu1.hs-scripts.com/147033433.js"
9+
strategy="lazyOnload"
10+
async
11+
defer
12+
/>
13+
);
14+
};

apps/dokploy/styles/globals.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,18 @@
247247
.cm-lineWrapping {
248248
@apply font-mono;
249249
}
250+
251+
/* HubSpot Widget - Force light color-scheme to prevent white background */
252+
#hubspot-messages-iframe-container,
253+
#hubspot-messages-iframe-container * {
254+
background-color: transparent !important;
255+
color-scheme: light !important;
256+
}
257+
258+
#hubspot-messages-iframe-container .hs-shadow-container {
259+
display: none !important;
260+
}
261+
262+
#hubspot-conversations-iframe {
263+
color-scheme: light !important;
264+
}

0 commit comments

Comments
 (0)