From b952dbef429c245a37e149a5868a23245c9c6831 Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Fri, 30 Aug 2024 14:02:35 -0700 Subject: [PATCH] Minor search formatting updates (#2276) --- .../ee/danswer/server/enterprise_settings/models.py | 1 + web/src/app/admin/settings/interfaces.ts | 1 + web/src/app/chat/ChatBanner.tsx | 3 ++- web/src/app/chat/ChatPage.tsx | 9 +++++++-- web/src/app/chat/shared_chat_search/FixedLogo.tsx | 4 ++-- .../app/chat/shared_chat_search/FunctionalWrapper.tsx | 4 +++- .../app/ee/admin/whitelabeling/WhitelabelingForm.tsx | 11 ++++++++++- web/src/app/layout.tsx | 4 +--- web/src/components/admin/connectors/AdminSidebar.tsx | 10 +++++----- web/src/components/chat_search/Header.tsx | 2 +- web/src/components/header/HeaderTitle.tsx | 4 +++- web/src/components/header/LogoType.tsx | 2 +- 12 files changed, 37 insertions(+), 18 deletions(-) diff --git a/backend/ee/danswer/server/enterprise_settings/models.py b/backend/ee/danswer/server/enterprise_settings/models.py index c9831d87a..b4cf91a4a 100644 --- a/backend/ee/danswer/server/enterprise_settings/models.py +++ b/backend/ee/danswer/server/enterprise_settings/models.py @@ -11,6 +11,7 @@ class EnterpriseSettings(BaseModel): use_custom_logotype: bool = False # custom Chat components + two_lines_for_chat_header: bool | None = None custom_lower_disclaimer_content: str | None = None custom_header_content: str | None = None custom_popup_header: str | None = None diff --git a/web/src/app/admin/settings/interfaces.ts b/web/src/app/admin/settings/interfaces.ts index 247bfd09d..5c3f7a725 100644 --- a/web/src/app/admin/settings/interfaces.ts +++ b/web/src/app/admin/settings/interfaces.ts @@ -23,6 +23,7 @@ export interface EnterpriseSettings { // custom Chat components custom_lower_disclaimer_content: string | null; custom_header_content: string | null; + two_lines_for_chat_header: boolean | null; custom_popup_header: string | null; custom_popup_content: string | null; } diff --git a/web/src/app/chat/ChatBanner.tsx b/web/src/app/chat/ChatBanner.tsx index bcaa72049..c6c7e8b70 100644 --- a/web/src/app/chat/ChatBanner.tsx +++ b/web/src/app/chat/ChatBanner.tsx @@ -41,6 +41,7 @@ export function ChatBanner() { w-full mx-auto relative + cursor-default shadow-sm rounded border-l-8 border-l-400 @@ -53,7 +54,7 @@ export function ChatBanner() {
diff --git a/web/src/app/chat/shared_chat_search/FixedLogo.tsx b/web/src/app/chat/shared_chat_search/FixedLogo.tsx index 0b3e115c3..c5114ca3e 100644 --- a/web/src/app/chat/shared_chat_search/FixedLogo.tsx +++ b/web/src/app/chat/shared_chat_search/FixedLogo.tsx @@ -21,11 +21,11 @@ export default function FixedLogo() { } className="fixed cursor-pointer flex z-40 left-2.5 top-2" > -
+
-
+
{enterpriseSettings && enterpriseSettings.application_name ? (
{enterpriseSettings.application_name} diff --git a/web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx b/web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx index e66bc32aa..a5693ab47 100644 --- a/web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx +++ b/web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx @@ -122,6 +122,8 @@ export default function FunctionalWrapper({ const settings = combinedSettings?.settings; const chatBannerPresent = combinedSettings?.enterpriseSettings?.custom_header_content; + const twoLines = + combinedSettings?.enterpriseSettings?.two_lines_for_chat_header; const [toggledSidebar, setToggledSidebar] = useState(initiallyToggled); @@ -136,7 +138,7 @@ export default function FunctionalWrapper({ {(!settings || (settings.search_page_enabled && settings.chat_page_enabled)) && (
+ + -
+
-
+
{enterpriseSettings && enterpriseSettings.application_name ? ( -
+
{enterpriseSettings.application_name} @@ -75,8 +75,8 @@ export function AdminSidebar({ collections }: { collections: Collection[] }) {