From 45402d0755e16c4697183c05d6780c1aa172ddc7 Mon Sep 17 00:00:00 2001 From: Weves Date: Wed, 29 May 2024 21:37:49 -0700 Subject: [PATCH] Add back custom logo/name to sidebar header --- .../app/chat/sessionSidebar/ChatSidebar.tsx | 23 ++++++++++++++----- web/src/components/header/Header.tsx | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/web/src/app/chat/sessionSidebar/ChatSidebar.tsx b/web/src/app/chat/sessionSidebar/ChatSidebar.tsx index b5fe5975bb8..bd3fdbf5ff0 100644 --- a/web/src/app/chat/sessionSidebar/ChatSidebar.tsx +++ b/web/src/app/chat/sessionSidebar/ChatSidebar.tsx @@ -16,6 +16,8 @@ import { SettingsContext } from "@/components/settings/SettingsProvider"; import React from "react"; import { FaBrain } from "react-icons/fa"; +import { Logo } from "@/components/Logo"; +import { HeaderTitle } from "@/components/header/Header"; export const ChatSidebar = ({ existingChats, @@ -44,6 +46,7 @@ export const ChatSidebar = ({ return null; } const settings = combinedSettings.settings; + const enterpriseSettings = combinedSettings.enterpriseSettings; return ( <> @@ -69,12 +72,20 @@ export const ChatSidebar = ({ } >
-
- Logo -
-

- Danswer -

+ + + {enterpriseSettings && enterpriseSettings.application_name ? ( +
+ + {enterpriseSettings.application_name} + +

+ Powered by Danswer +

+
+ ) : ( + Danswer + )}
diff --git a/web/src/components/header/Header.tsx b/web/src/components/header/Header.tsx index 416b1b302e2..d25e450044d 100644 --- a/web/src/components/header/Header.tsx +++ b/web/src/components/header/Header.tsx @@ -12,7 +12,7 @@ import { SettingsContext } from "../settings/SettingsProvider"; import { UserDropdown } from "../UserDropdown"; import { Logo } from "../Logo"; -function HeaderTitle({ children }: { children: JSX.Element | string }) { +export function HeaderTitle({ children }: { children: JSX.Element | string }) { return

{children}

; }