mirror of https://github.com/FlowiseAI/Flowise.git
Embed Chat configuration updated (#2648)
parent
b662dd79c6
commit
8bb841641e
|
|
@ -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)}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue