Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed Chat configuration updated #2648

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/ui/src/views/chatflows/EmbedChat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,24 @@ const buttonConfig = (isReact = false) => {
}`
}

const tooltipConfig = (isReact = false) => {
return isReact
? `tooltip: {
showTooltip: true,
tooltipMessage: 'Hi There 👋!',
tooltipBackgroundColor: 'black',
tooltipTextColor: 'white',
tooltipFontSize: 16,
}`
: `tooltip: {
showTooltip: true,
tooltipMessage: 'Hi There 👋!',
tooltipBackgroundColor: 'black',
tooltipTextColor: 'white',
tooltipFontSize: 16,
}`
}

const chatwindowConfig = (isReact = false) => {
return isReact
? `chatWindow: {
Expand Down Expand Up @@ -136,6 +154,7 @@ const chatwindowConfig = (isReact = false) => {
sendButtonColor: '#3B81F6',
maxChars: 50,
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
autoFocus: true, // If not used, autofocus is disabled on mobile and enabled on desktop. true enables it on both, false disables it on both.
},
feedback: {
color: '#303235',
Expand Down Expand Up @@ -177,6 +196,7 @@ const chatwindowConfig = (isReact = false) => {
sendButtonColor: '#3B81F6',
maxChars: 50,
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
autoFocus: true, // If not used, autofocus is disabled on mobile and enabled on desktop. true enables it on both, false disables it on both.
},
feedback: {
color: '#303235',
Expand All @@ -201,6 +221,7 @@ const embedPopupHtmlCodeCustomization = (chatflowid) => {
},
theme: {
${buttonConfig()},
${tooltipConfig()},
${chatwindowConfig()}
}
})
Expand All @@ -217,6 +238,7 @@ const App = () => {
apiHost="${baseURL}"
theme={{
${buttonConfig(true)},
${tooltipConfig(true)},
${chatwindowConfig(true)}
}}
/>
Expand Down
Loading