θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

New embedded chat widget UI/UX #3899

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

Merged
merged 10 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
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
14 changes: 5 additions & 9 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ const GeneralBrowserExtension = lazy(
() => import("@/pages/GeneralSettings/BrowserExtensionApiKey")
);
const WorkspaceSettings = lazy(() => import("@/pages/WorkspaceSettings"));
const EmbedConfigSetup = lazy(
() => import("@/pages/GeneralSettings/EmbedConfigs")

const ChatEmbedWidgets = lazy(
() => import("@/pages/GeneralSettings/ChatEmbedWidgets")
);
const EmbedChats = lazy(() => import("@/pages/GeneralSettings/EmbedChats"));
const PrivacyAndData = lazy(
() => import("@/pages/GeneralSettings/PrivacyAndData")
);
Expand Down Expand Up @@ -178,12 +178,8 @@ export default function App() {
element={<AdminRoute Component={AdminLogs} />}
/>
<Route
path="/settings/embed-config"
element={<AdminRoute Component={EmbedConfigSetup} />}
/>
<Route
path="/settings/embed-chats"
element={<AdminRoute Component={EmbedChats} />}
path="/settings/embed-chat-widgets"
element={<AdminRoute Component={ChatEmbedWidgets} />}
/>
{/* Manager */}
<Route
Expand Down
8 changes: 1 addition & 7 deletions frontend/src/components/SettingsSidebar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,8 @@ const SidebarOptions = ({ user = null, t }) => (
childOptions={[
{
hidden: !canViewChatHistory,
btnText: t("settings.embed-chats"),
href: paths.settings.embedChats(),
flex: true,
roles: ["admin"],
},
{
btnText: t("settings.embeds"),
href: paths.settings.embedSetup(),
href: paths.settings.embedChatWidgets(),
flex: true,
roles: ["admin"],
},
Expand Down
16 changes: 16 additions & 0 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@
--theme-attachment-icon: #ffffff;
--theme-attachment-icon-spinner: #ffffff;
--theme-attachment-icon-spinner-bg: #27282a;

--theme-button-text: #a8a9ab;
--theme-button-code-hover-text: #7cd4fd;
--theme-button-code-hover-bg: #22343f;
--theme-button-disable-hover-text: #fec84b;
--theme-button-disable-hover-bg: #3a3128;
--theme-button-delete-hover-text: #f97066;
--theme-button-delete-hover-bg: #37282b;
}

[data-theme="light"] {
Expand Down Expand Up @@ -187,6 +195,14 @@
--theme-attachment-icon: #ffffff;
--theme-attachment-icon-spinner: #7cd4fd;
--theme-attachment-icon-spinner-bg: #ffffff;

--theme-button-text: #a8a9ab;
--theme-button-code-hover-text: #0ba5ec;
--theme-button-code-hover-bg: #e8f7fe;
--theme-button-disable-hover-text: #854708;
--theme-button-disable-hover-bg: #fef7e6;
--theme-button-delete-hover-text: #b42318;
--theme-button-delete-hover-bg: #fee4e2;
}

[data-theme="light"] .text-white {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/ar/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ const TRANSLATIONS = {
table: {
workspace: "Ω…Ψ³Ψ§Ψ­Ψ© Ψ§Ω„ΨΉΩ…Ω„",
chats: "Ψ§Ω„Ω…Ψ­Ψ§Ψ―Ψ«Ψ§Ψͺ Ψ§Ω„Ω…Ψ±Ψ³Ω„Ψ©",
Active: "Ψ§Ω„Ω…Ψ¬Ψ§Ω„Ψ§Ψͺ Ψ§Ω„Ω†Ψ΄Ψ·Ψ©",
active: "Ψ§Ω„Ω…Ψ¬Ψ§Ω„Ψ§Ψͺ Ψ§Ω„Ω†Ψ΄Ψ·Ψ©",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/da/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ const TRANSLATIONS = {
table: {
workspace: "ArbejdsomrΓ₯de",
chats: "Sendte chats",
Active: "Aktive domæner",
active: "Aktive domæner",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/de/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ const TRANSLATIONS = {
table: {
workspace: "Arbeitsbereich",
chats: "Gesendete Chats",
Active: "Aktive Domains",
active: "Aktive Domains",
created: null,
},
},
"embed-chats": {
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/locales/en/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,13 @@ const TRANSLATIONS = {
table: {
workspace: "Workspace",
chats: "Sent Chats",
Active: "Active Domains",
active: "Active Domains",
created: "Created",
},
},

"embed-chats": {
title: "Embed Chats",
title: "Embed Chat History",
export: "Export",
description:
"These are all the recorded chats and messages from any embed that you have published.",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/es/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ const TRANSLATIONS = {
table: {
workspace: "Espacio de trabajo",
chats: "Chats enviados",
Active: "Dominios activos",
active: "Dominios activos",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/fa/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ const TRANSLATIONS = {
table: {
workspace: "فآای کاری",
chats: "گفΨͺΪ―ΩˆΩ‡Ψ§ΫŒ Ψ§Ψ±Ψ³Ψ§Ω„ Ψ΄Ψ―Ω‡",
Active: "Ψ―Ψ§Ω…Ω†Ω‡β€ŒΩ‡Ψ§ΫŒ فعال",
active: "Ψ―Ψ§Ω…Ω†Ω‡β€ŒΩ‡Ψ§ΫŒ فعال",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/fr/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ const TRANSLATIONS = {
table: {
workspace: "Espace de travail",
chats: "Chats envoyΓ©s",
Active: "Domaines actifs",
active: "Domaines actifs",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/he/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ const TRANSLATIONS = {
table: {
workspace: "Χ‘Χ‘Χ™Χ‘Χͺ Χ’Χ‘Χ•Χ“Χ”",
chats: "Χ©Χ™Χ—Χ•Χͺ Χ©Χ Χ©ΧœΧ—Χ•",
Active: "ΧͺΧ—Χ•ΧžΧ™Χ Χ€Χ’Χ™ΧœΧ™Χ",
active: "ΧͺΧ—Χ•ΧžΧ™Χ Χ€Χ’Χ™ΧœΧ™Χ",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/it/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ const TRANSLATIONS = {
table: {
workspace: "Area di lavoro",
chats: "Chat inviate",
Active: "Domini attivi",
active: "Domini attivi",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/ja/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ const TRANSLATIONS = {
table: {
workspace: "γƒ―γƒΌγ‚―γ‚ΉγƒšγƒΌγ‚Ή",
chats: "ι€δΏ‘ζΈˆγΏγƒγƒ£γƒƒγƒˆ",
Active: "ζœ‰εŠΉγͺドパむン",
active: "ζœ‰εŠΉγͺドパむン",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/ko/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ const TRANSLATIONS = {
table: {
workspace: "μ›Œν¬μŠ€νŽ˜μ΄μŠ€",
chats: "보낸 μ±„νŒ…",
Active: "ν™œμ„± 도메인",
active: "ν™œμ„± 도메인",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/lv/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,8 @@ const TRANSLATIONS = {
table: {
workspace: "Darba vieta",
chats: "Nosūtītie čati",
Active: "AktΔ«vie domΔ“ni",
active: "AktΔ«vie domΔ“ni",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/nl/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ const TRANSLATIONS = {
table: {
workspace: "Werkruimte",
chats: "Verzonden Chats",
Active: "Actieve Domeinen",
active: "Actieve Domeinen",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/pt_BR/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ const TRANSLATIONS = {
table: {
workspace: "Workspace",
chats: "Chats Enviados",
Active: "DomΓ­nios Ativos",
active: "DomΓ­nios Ativos",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/ru/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,8 @@ const TRANSLATIONS = {
table: {
workspace: "Π Π°Π±ΠΎΡ‡Π΅Π΅ пространство",
chats: "ΠžΡ‚ΠΏΡ€Π°Π²Π»Π΅Π½Π½Ρ‹Π΅ Ρ‡Π°Ρ‚Ρ‹",
Active: "АктивныС Π΄ΠΎΠΌΠ΅Π½Ρ‹",
active: "АктивныС Π΄ΠΎΠΌΠ΅Π½Ρ‹",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/tr/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ const TRANSLATIONS = {
table: {
workspace: "Γ‡alışma AlanΔ±",
chats: "GΓΆnderilen Sohbetler",
Active: "Aktif Alan AdlarΔ±",
active: "Aktif Alan AdlarΔ±",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/vn/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ const TRANSLATIONS = {
table: {
workspace: "Workspace",
chats: "Sent Chats",
Active: "Active Domains",
active: "Active Domains",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/zh/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ const TRANSLATIONS = {
table: {
workspace: "ε·₯作区",
chats: "ε·²ε‘ι€θŠε€©",
Active: "活动域",
active: "活动域",
created: null,
},
},
"embed-chats": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locales/zh_TW/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ const TRANSLATIONS = {
table: {
workspace: "ε·₯δ½œε€",
chats: "已傳送對話",
Active: "ε·²ε•Ÿη”¨ηΆ²εŸŸ",
active: "ε·²ε•Ÿη”¨ηΆ²εŸŸ",
created: null,
},
},
"embed-chats": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,42 +38,43 @@ export default function ChatRow({ chat, onDelete }) {
<tr className="bg-transparent text-white text-opacity-80 text-xs font-medium border-b border-white/10 h-10">
<td className="px-6 font-medium whitespace-nowrap text-white">
<a
href={paths.settings.embedSetup()}
href={paths.settings.embedChatWidgets()}
target="_blank"
rel="noreferrer"
className="text-white flex items-center hover:underline"
>
<LinkSimple className="mr-2 w-5 h-5" />{" "}
{chat.embed_config.workspace.name}
</a>
</td>
<td
onClick={openConnectionDetailsModal}
className="px-6 cursor-pointer transform transition-transform duration-200 hover:scale-105 hover:shadow-lg"
className="px-6 cursor-pointer hover:shadow-lg"
>
<div className="flex flex-col">
<p>{truncate(chat.session_id, 20)}</p>
</div>
</td>
<td
onClick={openPromptModal}
className="px-6 border-transparent cursor-pointer transform transition-transform duration-200 hover:scale-105 hover:shadow-lg"
className="px-6 border-transparent cursor-pointer hover:shadow-lg"
>
{truncate(chat.prompt, 40)}
</td>
<td
onClick={openResponseModal}
className="px-6 cursor-pointer transform transition-transform duration-200 hover:scale-105 hover:shadow-lg"
className="px-6 cursor-pointer hover:shadow-lg"
>
{truncate(JSON.parse(chat.response)?.text, 40)}
</td>
<td className="px-6">{chat.createdAt}</td>
<td className="px-6 flex items-center gap-x-6 h-full mt-1">
<button
onClick={handleDelete}
className="text-xs font-medium text-white/80 light:text-black/80 hover:light:text-red-500 hover:text-red-300 rounded-lg px-2 py-1 hover:bg-white hover:light:bg-red-50 hover:bg-opacity-10"
className="group text-xs font-medium text-theme-text-secondary px-2 py-1 rounded-lg hover:bg-theme-button-delete-hover-bg"
>
<Trash className="h-5 w-5" />
<span className="group-hover:text-theme-button-delete-hover-text">
Delete
</span>
</button>
</td>
</tr>
Expand Down
Loading