Skip to content

Commit e0a03ad

Browse files
HTML Embed Chat popup configuration updated (FlowiseAI#2583)
* HTML Embed Chat popup configuration updated * HTML Embed Chat popup configuration * Update EmbedChat.jsx update spacing to be consistent --------- Co-authored-by: Henry Heng <[email protected]>
1 parent 582dcc8 commit e0a03ad

File tree

1 file changed

+44
-12
lines changed

1 file changed

+44
-12
lines changed

packages/ui/src/views/chatflows/EmbedChat.jsx

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,17 @@ const buttonConfig = (isReact = false) => {
8888
backgroundColor: "#3B81F6",
8989
right: 20,
9090
bottom: 20,
91-
size: "medium",
91+
size: 48, // small | medium | large | number
92+
dragAndDrop: true,
9293
iconColor: "white",
9394
customIconSrc: "https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg",
9495
}`
9596
: `button: {
9697
backgroundColor: "#3B81F6",
9798
right: 20,
9899
bottom: 20,
99-
size: "medium",
100+
size: 48, // small | medium | large | number
101+
dragAndDrop: true,
100102
iconColor: "white",
101103
customIconSrc: "https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg",
102104
}`
@@ -105,7 +107,11 @@ const buttonConfig = (isReact = false) => {
105107
const chatwindowConfig = (isReact = false) => {
106108
return isReact
107109
? `chatWindow: {
108-
welcomeMessage: "Hello! This is custom welcome message",
110+
showTitle: true,
111+
title: 'Flowise Bot',
112+
titleAvatarSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
113+
welcomeMessage: 'Hello! This is custom welcome message',
114+
errorMessage: 'This is a custom error message',
109115
backgroundColor: "#ffffff",
110116
height: 700,
111117
width: 400,
@@ -124,14 +130,29 @@ const chatwindowConfig = (isReact = false) => {
124130
avatarSrc: "https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png",
125131
},
126132
textInput: {
127-
placeholder: "Type your question",
128-
backgroundColor: "#ffffff",
129-
textColor: "#303235",
130-
sendButtonColor: "#3B81F6",
133+
placeholder: 'Type your question',
134+
backgroundColor: '#ffffff',
135+
textColor: '#303235',
136+
sendButtonColor: '#3B81F6',
137+
maxChars: 50,
138+
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
139+
},
140+
feedback: {
141+
color: '#303235',
142+
},
143+
footer: {
144+
textColor: '#303235',
145+
text: 'Powered by',
146+
company: 'Flowise',
147+
companyLink: 'https://flowiseai.com',
131148
}
132149
}`
133150
: `chatWindow: {
134-
welcomeMessage: "Hello! This is custom welcome message",
151+
showTitle: true,
152+
title: 'Flowise Bot',
153+
titleAvatarSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
154+
welcomeMessage: 'Hello! This is custom welcome message',
155+
errorMessage: 'This is a custom error message',
135156
backgroundColor: "#ffffff",
136157
height: 700,
137158
width: 400,
@@ -150,10 +171,21 @@ const chatwindowConfig = (isReact = false) => {
150171
avatarSrc: "https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png",
151172
},
152173
textInput: {
153-
placeholder: "Type your question",
154-
backgroundColor: "#ffffff",
155-
textColor: "#303235",
156-
sendButtonColor: "#3B81F6",
174+
placeholder: 'Type your question',
175+
backgroundColor: '#ffffff',
176+
textColor: '#303235',
177+
sendButtonColor: '#3B81F6',
178+
maxChars: 50,
179+
maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
180+
},
181+
feedback: {
182+
color: '#303235',
183+
},
184+
footer: {
185+
textColor: '#303235',
186+
text: 'Powered by',
187+
company: 'Flowise',
188+
companyLink: 'https://flowiseai.com',
157189
}
158190
}`
159191
}

0 commit comments

Comments
 (0)