mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 09:01:06 +03:00
Embed Chat configuration updated (#2648)
This commit is contained in:
@@ -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) => {
|
const chatwindowConfig = (isReact = false) => {
|
||||||
return isReact
|
return isReact
|
||||||
? `chatWindow: {
|
? `chatWindow: {
|
||||||
@@ -136,6 +154,7 @@ const chatwindowConfig = (isReact = false) => {
|
|||||||
sendButtonColor: '#3B81F6',
|
sendButtonColor: '#3B81F6',
|
||||||
maxChars: 50,
|
maxChars: 50,
|
||||||
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
|
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: {
|
feedback: {
|
||||||
color: '#303235',
|
color: '#303235',
|
||||||
@@ -177,6 +196,7 @@ const chatwindowConfig = (isReact = false) => {
|
|||||||
sendButtonColor: '#3B81F6',
|
sendButtonColor: '#3B81F6',
|
||||||
maxChars: 50,
|
maxChars: 50,
|
||||||
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
|
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: {
|
feedback: {
|
||||||
color: '#303235',
|
color: '#303235',
|
||||||
@@ -201,6 +221,7 @@ const embedPopupHtmlCodeCustomization = (chatflowid) => {
|
|||||||
},
|
},
|
||||||
theme: {
|
theme: {
|
||||||
${buttonConfig()},
|
${buttonConfig()},
|
||||||
|
${tooltipConfig()},
|
||||||
${chatwindowConfig()}
|
${chatwindowConfig()}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -217,6 +238,7 @@ const App = () => {
|
|||||||
apiHost="${baseURL}"
|
apiHost="${baseURL}"
|
||||||
theme={{
|
theme={{
|
||||||
${buttonConfig(true)},
|
${buttonConfig(true)},
|
||||||
|
${tooltipConfig(true)},
|
||||||
${chatwindowConfig(true)}
|
${chatwindowConfig(true)}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user