mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: update Chatwoot widget settings and types to enhance configuration options
This commit is contained in:
@@ -39,7 +39,6 @@ export const ChatwootWidget = ({
|
|||||||
// Configurar los settings de Chatwoot
|
// Configurar los settings de Chatwoot
|
||||||
window.chatwootSettings = {
|
window.chatwootSettings = {
|
||||||
position: "right",
|
position: "right",
|
||||||
darkMode: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
(window as any).chatwootSDKReady = () => {
|
(window as any).chatwootSDKReady = () => {
|
||||||
@@ -52,7 +51,6 @@ export const ChatwootWidget = ({
|
|||||||
name: user.name,
|
name: user.name,
|
||||||
avatar_url: user.avatarUrl,
|
avatar_url: user.avatarUrl,
|
||||||
phone_number: user.phoneNumber,
|
phone_number: user.phoneNumber,
|
||||||
...user.customAttributes,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
30
apps/dokploy/types/chatwoot.d.ts
vendored
30
apps/dokploy/types/chatwoot.d.ts
vendored
@@ -1,27 +1,21 @@
|
|||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
chatwootSettings?: {
|
chatwootSettings?: {
|
||||||
position?: "left" | "right";
|
|
||||||
type?: "standard" | "expanded_bubble";
|
|
||||||
launcherTitle?: string;
|
|
||||||
darkMode?: boolean;
|
|
||||||
hideMessageBubble?: boolean;
|
hideMessageBubble?: boolean;
|
||||||
placement?: "right" | "left";
|
showUnreadMessagesDialog?: boolean;
|
||||||
|
position?: "left" | "right";
|
||||||
|
locale?: string;
|
||||||
|
useBrowserLanguage?: boolean;
|
||||||
|
type?: "standard" | "expanded_bubble";
|
||||||
|
darkMode?: "light" | "auto";
|
||||||
|
launcherTitle?: string;
|
||||||
showPopoutButton?: boolean;
|
showPopoutButton?: boolean;
|
||||||
widgetStyle?: "standard" | "bubble";
|
baseDomain?: string;
|
||||||
};
|
};
|
||||||
chatwootSDK?: {
|
chatwootSDK?: {
|
||||||
run: (config: {
|
run: (config: {
|
||||||
websiteToken: string;
|
websiteToken: string;
|
||||||
baseUrl: string;
|
baseUrl: string;
|
||||||
user?: {
|
|
||||||
identifier?: string;
|
|
||||||
name?: string;
|
|
||||||
email?: string;
|
|
||||||
phone?: string;
|
|
||||||
avatar_url?: string;
|
|
||||||
custom_attributes?: Record<string, any>;
|
|
||||||
};
|
|
||||||
}) => void;
|
}) => void;
|
||||||
};
|
};
|
||||||
$chatwoot?: {
|
$chatwoot?: {
|
||||||
@@ -29,8 +23,14 @@ declare global {
|
|||||||
identifier: string,
|
identifier: string,
|
||||||
userAttributes: Record<string, any>,
|
userAttributes: Record<string, any>,
|
||||||
) => void;
|
) => void;
|
||||||
|
setCustomAttributes: (attributes: Record<string, any>) => void;
|
||||||
reset: () => void;
|
reset: () => void;
|
||||||
toggle: () => void;
|
toggle: (state?: "open" | "close") => void;
|
||||||
|
popoutChatWindow: () => void;
|
||||||
|
toggleBubbleVisibility: (visibility: "show" | "hide") => void;
|
||||||
|
setLocale: (locale: string) => void;
|
||||||
|
setLabel: (label: string) => void;
|
||||||
|
removeLabel: (label: string) => void;
|
||||||
};
|
};
|
||||||
chatwootSDKReady?: () => void;
|
chatwootSDKReady?: () => void;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user