From d9fce5f65e2c724462e2a6305cfb77aceb732627 Mon Sep 17 00:00:00 2001 From: Sean Hatfield Date: Tue, 12 Mar 2024 10:45:03 -0700 Subject: [PATCH] [FEAT] Settings pages UI updates (#833) * WIP main sidebar designs * hover states and active states for main sidebar * main and settings sidebar UI updates & improve performance using Link instead of * update borders to match rest of UI in all pages * update borders of all containers to match rest of UI * remove unneeded conditional * custom messages component redesign and appearance settings layout changes * improve UX of custom logo file uploader component to match designs * fix sizing on custom logo upload field * WIP footer customization new UI * implement new UI for custom footer icon selection * update workspace chats to match new settings UI * update system preferences to match new settings UI * update export workspace chats button border * update invitations settings page to match new settings UI * update instance workspaces settings page to match new settings UI * update instance workspaces to match new settings UI * update api keys settings to match new settings UI * update LLM preferences settings to match new settings UI * update embedding preferences settings to match new settings UI * update vector db preferences settings to match new settings UI * align all buttons in settings pages * update ui for data connectors to match rest of settings ui * update UI for embed chat * updated ui for logging page * fix duplicate attributes left from merge conflicts * fix dynamic class to use ternary * remove transition classes where it is not needed --- .../components/EditingChatBubble/index.jsx | 83 ++++----- .../src/components/SettingsSidebar/index.jsx | 4 +- .../Sidebar/ActiveWorkspaces/index.jsx | 6 +- frontend/src/components/Sidebar/index.jsx | 12 +- .../src/pages/Admin/Invitations/index.jsx | 25 +-- frontend/src/pages/Admin/Logging/index.jsx | 22 +-- frontend/src/pages/Admin/System/index.jsx | 128 +++++++------- frontend/src/pages/Admin/Users/index.jsx | 18 +- frontend/src/pages/Admin/Workspaces/index.jsx | 17 +- .../pages/GeneralSettings/ApiKeys/index.jsx | 19 ++- .../Appearance/CustomLogo/index.jsx | 124 ++++++++------ .../Appearance/CustomMessages/index.jsx | 31 ++-- .../FooterCustomization/NewIconForm/index.jsx | 161 ++++++++++-------- .../Appearance/FooterCustomization/index.jsx | 136 +++++---------- .../Appearance/SupportEmail/index.jsx | 10 +- .../GeneralSettings/Appearance/index.jsx | 12 +- .../src/pages/GeneralSettings/Chats/index.jsx | 68 ++++---- .../Connectors/Github/index.jsx | 14 +- .../Connectors/Youtube/index.jsx | 12 +- .../GeneralSettings/DataConnectors/index.jsx | 21 ++- .../GeneralSettings/EmbedChats/index.jsx | 12 +- .../GeneralSettings/EmbedConfigs/index.jsx | 16 +- .../EmbeddingPreference/index.jsx | 123 +++++++------ .../GeneralSettings/LLMPreference/index.jsx | 16 +- .../GeneralSettings/VectorDatabase/index.jsx | 34 ++-- 25 files changed, 569 insertions(+), 555 deletions(-) diff --git a/frontend/src/components/EditingChatBubble/index.jsx b/frontend/src/components/EditingChatBubble/index.jsx index ba5cc480..0aa2a078 100644 --- a/frontend/src/components/EditingChatBubble/index.jsx +++ b/frontend/src/components/EditingChatBubble/index.jsx @@ -13,49 +13,52 @@ export default function EditingChatBubble({ const isUser = type === "user"; return ( -
- +
+

+ {isUser ? "User" : "AnythingLLM Chat Assistant"} +

setIsEditing(true)} > - {isEditing ? ( - setTempMessage(e.target.value)} - onBlur={() => { - handleMessageChange(index, type, tempMessage); - setIsEditing(false); - }} - autoFocus - className="w-full" - /> - ) : ( - tempMessage && ( -

- {tempMessage} -

- ) - )} + +
setIsEditing(true)} + > + {isEditing ? ( + setTempMessage(e.target.value)} + onBlur={() => { + handleMessageChange(index, type, tempMessage); + setIsEditing(false); + }} + autoFocus + className={`w-full ${ + isUser ? "bg-[#41444C] text-white" : "bg-[#2E3036] text-white" + }`} + /> + ) : ( + tempMessage && ( +

+ {tempMessage} +

+ ) + )} +
); diff --git a/frontend/src/components/SettingsSidebar/index.jsx b/frontend/src/components/SettingsSidebar/index.jsx index 112b641b..84b78064 100644 --- a/frontend/src/components/SettingsSidebar/index.jsx +++ b/frontend/src/components/SettingsSidebar/index.jsx @@ -149,7 +149,9 @@ export default function SettingsSidebar() {
-