From 0be503395a4d519407c5b37085c9a363a5055f84 Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Mon, 26 Feb 2024 16:24:50 -0800 Subject: [PATCH 01/28] WIP main sidebar designs --- frontend/src/components/Footer/index.jsx | 7 ++ .../src/components/SettingsButton/index.jsx | 17 +++++ .../Sidebar/ActiveWorkspaces/index.jsx | 73 ++++++++++--------- frontend/src/components/Sidebar/index.jsx | 58 +++++---------- frontend/tailwind.config.js | 3 +- 5 files changed, 83 insertions(+), 75 deletions(-) create mode 100644 frontend/src/components/SettingsButton/index.jsx diff --git a/frontend/src/components/Footer/index.jsx b/frontend/src/components/Footer/index.jsx index 26b271a8ce8..4b175405be4 100644 --- a/frontend/src/components/Footer/index.jsx +++ b/frontend/src/components/Footer/index.jsx @@ -13,6 +13,7 @@ import { LinkSimple, } from "@phosphor-icons/react"; import React, { useEffect, useState } from "react"; +import SettingsButton from "../SettingsButton"; export const MAX_ICONS = 3; export const ICON_COMPONENTS = { @@ -49,6 +50,7 @@ export default function Footer() { @@ -56,6 +58,7 @@ export default function Footer() { @@ -63,6 +66,7 @@ export default function Footer() { + ); @@ -83,6 +88,7 @@ export default function Footer() { key={index} href={item.url} target="_blank" + rel="noreferrer" className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border" > {React.createElement(ICON_COMPONENTS[item.icon], { @@ -91,6 +97,7 @@ export default function Footer() { })} ))} + ); diff --git a/frontend/src/components/SettingsButton/index.jsx b/frontend/src/components/SettingsButton/index.jsx new file mode 100644 index 00000000000..18c7b1a1670 --- /dev/null +++ b/frontend/src/components/SettingsButton/index.jsx @@ -0,0 +1,17 @@ +import useUser from "@/hooks/useUser"; +import paths from "@/utils/paths"; +import { Wrench } from "@phosphor-icons/react"; + +export default function SettingsButton() { + const { user } = useUser(); + return ( + + + + ); +} diff --git a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx index 9ee6a6878dc..467c6eb2e09 100644 --- a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx +++ b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx @@ -90,55 +90,58 @@ export default function ActiveWorkspaces() { href={isActive ? null : paths.workspace.chat(workspace.slug)} className={` transition-all duration-[200ms] - flex flex-grow w-[75%] gap-x-2 py-[6px] px-[12px] rounded-lg text-slate-200 justify-start items-center - hover:bg-workspace-item-selected-gradient + flex flex-grow w-[75%] gap-x-2 py-[6px] px-[12px] rounded-[4px] text-slate-200 justify-start items-center + hover:bg-workspace-item-selected-gradient ${ isActive - ? "border-2 bg-workspace-item-selected-gradient border-white" - : "border bg-workspace-item-gradient bg-opacity-60 border-transparent hover:border-slate-100 hover:border-opacity-50" + ? "bg-workspace-item-selected-gradient" + : "border-[2px] border-outline" }`} >

{isActive || isHovered - ? truncate(workspace.name, 17) + ? truncate(workspace.name, 15) : truncate(workspace.name, 20)}

{(isActive || isHovered || gearHover[workspace.id]) && user?.role !== "default" ? ( -
- + className="rounded-md flex items-center justify-center text-white ml-auto" + > + + +
handleGearMouseLeave(workspace.id)} className="rounded-md flex items-center justify-center text-white ml-auto" > - +
+ +
) : null} diff --git a/frontend/src/components/Sidebar/index.jsx b/frontend/src/components/Sidebar/index.jsx index d14099b2b59..0c38eb776ce 100644 --- a/frontend/src/components/Sidebar/index.jsx +++ b/frontend/src/components/Sidebar/index.jsx @@ -1,14 +1,14 @@ import React, { useEffect, useRef, useState } from "react"; -import { Wrench, Plus, List } from "@phosphor-icons/react"; +import { Plus, List } from "@phosphor-icons/react"; import NewWorkspaceModal, { useNewWorkspaceModal, } from "../Modals/NewWorkspace"; import ActiveWorkspaces from "./ActiveWorkspaces"; -import paths from "@/utils/paths"; import { USER_BACKGROUND_COLOR } from "@/utils/constants"; import useLogo from "@/hooks/useLogo"; import useUser from "@/hooks/useUser"; import Footer from "../Footer"; +import SettingsButton from "../SettingsButton"; export default function Sidebar() { const { user } = useUser(); @@ -21,40 +21,30 @@ export default function Sidebar() { } = useNewWorkspaceModal(); return ( - <> +
+
+ Logo +
- {/* Header Information */} -
-
- Logo -
- {(!user || user?.role !== "default") && ( -
- -
- )} -
- - {/* Primary Body */} -
+
{(!user || user?.role !== "default") && (
{showingNewWsModal && } - +
); } @@ -190,17 +180,3 @@ export function SidebarMobileHeader() { ); } - -function SettingsButton() { - const { user } = useUser(); - return ( - - - - ); -} diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index f3f8aaca2c4..8add5a6924c 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -24,7 +24,8 @@ export default { "sidebar-button": "#31353A", sidebar: "#25272C", "historical-msg-system": "rgba(255, 255, 255, 0.05);", - "historical-msg-user": "#2C2F35" + "historical-msg-user": "#2C2F35", + outline: "#4E5153" }, backgroundImage: { "preference-gradient": From d66d54198675d753f0cd24e44ae2ff7f2cc6dfeb Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Mon, 26 Feb 2024 18:07:03 -0800 Subject: [PATCH 02/28] hover states and active states for main sidebar --- .../Sidebar/ActiveWorkspaces/index.jsx | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx index 467c6eb2e09..2470bc28ba9 100644 --- a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx +++ b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx @@ -11,7 +11,7 @@ import { GearSix, SquaresFour, UploadSimple } from "@phosphor-icons/react"; import truncate from "truncate"; import useUser from "@/hooks/useUser"; import ThreadContainer from "./ThreadContainer"; -import { Link } from "react-router-dom"; +import { Link, useMatch } from "react-router-dom"; export default function ActiveWorkspaces() { const { slug } = useParams(); @@ -23,6 +23,8 @@ export default function ActiveWorkspaces() { const [uploadHover, setUploadHover] = useState({}); const { showing, showModal, hideModal } = useManageWorkspaceModal(); const { user } = useUser(); + const match = useMatch("/workspace/:slug/settings/:tab"); + const isInWorkspaceSettings = !!match; useEffect(() => { async function getWorkspaces() { @@ -117,8 +119,12 @@ export default function ActiveWorkspaces() {
{(isActive || isHovered || gearHover[workspace.id]) && user?.role !== "default" ? ( -
-
+
+
@@ -150,14 +154,19 @@ export default function ActiveWorkspaces() { )} onMouseEnter={() => handleGearMouseEnter(workspace.id)} onMouseLeave={() => handleGearMouseLeave(workspace.id)} - className="rounded-md flex items-center justify-center text-white ml-auto" + className="rounded-md flex items-center justify-center text-[#A7A8A9] hover:text-white ml-auto" >
From 613611cea3df3797cc17e2a547f983f22c2d7be7 Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Mon, 26 Feb 2024 21:05:31 -0800 Subject: [PATCH 03/28] main and settings sidebar UI updates & improve performance using Link instead of --- frontend/src/components/Footer/index.jsx | 1 - .../src/components/SettingsButton/index.jsx | 24 +++++-- .../src/components/SettingsSidebar/index.jsx | 65 ++++++++----------- .../Sidebar/ActiveWorkspaces/index.jsx | 13 ++-- frontend/src/components/Sidebar/index.jsx | 9 ++- 5 files changed, 59 insertions(+), 53 deletions(-) diff --git a/frontend/src/components/Footer/index.jsx b/frontend/src/components/Footer/index.jsx index 4b175405be4..17048980ab1 100644 --- a/frontend/src/components/Footer/index.jsx +++ b/frontend/src/components/Footer/index.jsx @@ -1,6 +1,5 @@ import System from "@/models/system"; import paths from "@/utils/paths"; -import { safeJsonParse } from "@/utils/request"; import { BookOpen, DiscordLogo, diff --git a/frontend/src/components/SettingsButton/index.jsx b/frontend/src/components/SettingsButton/index.jsx index 18c7b1a1670..ae3aeb9f64e 100644 --- a/frontend/src/components/SettingsButton/index.jsx +++ b/frontend/src/components/SettingsButton/index.jsx @@ -1,17 +1,29 @@ import useUser from "@/hooks/useUser"; import paths from "@/utils/paths"; -import { Wrench } from "@phosphor-icons/react"; +import { ArrowUUpLeft, Wrench } from "@phosphor-icons/react"; +import { Link } from "react-router-dom"; +import { useMatch } from "react-router-dom"; export default function SettingsButton() { + const isInSettings = !!useMatch("/settings/*"); const { user } = useUser(); + + if (isInSettings) + return ( + + + + ); + return ( - - + ); } diff --git a/frontend/src/components/SettingsSidebar/index.jsx b/frontend/src/components/SettingsSidebar/index.jsx index ea48871146e..96610d4d629 100644 --- a/frontend/src/components/SettingsSidebar/index.jsx +++ b/frontend/src/components/SettingsSidebar/index.jsx @@ -13,7 +13,6 @@ import { Database, Lock, House, - X, List, FileCode, Plugs, @@ -25,6 +24,7 @@ import useUser from "@/hooks/useUser"; import { USER_BACKGROUND_COLOR } from "@/utils/constants"; import { isMobile } from "react-device-detect"; import Footer from "../Footer"; +import { Link } from "react-router-dom"; export default function SettingsSidebar() { const { logo } = useLogo(); @@ -124,50 +124,40 @@ export default function SettingsSidebar() { } return ( - <> +
+ + Logo +
-
- {/* Header Information */} -
-
- Logo -
-
- - - -
-
-
- Settings +
+
+ Instance Settings
- {/* Primary Body */} -
+
- {/* Options */}
-
+
- +
); } @@ -196,15 +186,16 @@ const Option = ({ return ( <> {!!subOptions && (isActive || hasActiveChild) && (
{ async function getWorkspaces() { @@ -92,12 +91,12 @@ export default function ActiveWorkspaces() { href={isActive ? null : paths.workspace.chat(workspace.slug)} className={` transition-all duration-[200ms] - flex flex-grow w-[75%] gap-x-2 py-[6px] px-[12px] rounded-[4px] text-slate-200 justify-start items-center - hover:bg-workspace-item-selected-gradient + flex flex-grow w-[75%] gap-x-2 py-[6px] px-[12px] rounded-[4px] text-white justify-start items-center + hover:bg-workspace-item-selected-gradient hover:font-bold border-2 border-outline ${ isActive - ? "bg-workspace-item-selected-gradient" - : "border-[2px] border-outline" + ? "bg-workspace-item-selected-gradient font-bold" + : "" }`} >
@@ -108,7 +107,7 @@ export default function ActiveWorkspaces() { size={24} />

diff --git a/frontend/src/components/Sidebar/index.jsx b/frontend/src/components/Sidebar/index.jsx index 0c38eb776ce..13aaeee1074 100644 --- a/frontend/src/components/Sidebar/index.jsx +++ b/frontend/src/components/Sidebar/index.jsx @@ -9,6 +9,8 @@ import useLogo from "@/hooks/useLogo"; import useUser from "@/hooks/useUser"; import Footer from "../Footer"; import SettingsButton from "../SettingsButton"; +import { Link } from "react-router-dom"; +import paths from "@/utils/paths"; export default function Sidebar() { const { user } = useUser(); @@ -22,14 +24,17 @@ export default function Sidebar() { return (

-
+ Logo -
+
Date: Mon, 26 Feb 2024 21:07:31 -0800 Subject: [PATCH 04/28] update borders to match rest of UI in all pages --- frontend/src/components/DefaultChat/index.jsx | 2 +- frontend/src/components/WorkspaceChat/ChatContainer/index.jsx | 2 +- frontend/src/pages/Admin/Invitations/index.jsx | 2 +- frontend/src/pages/Admin/Logging/index.jsx | 2 +- frontend/src/pages/Admin/System/index.jsx | 2 +- frontend/src/pages/Admin/Users/index.jsx | 2 +- frontend/src/pages/Admin/Workspaces/index.jsx | 2 +- frontend/src/pages/GeneralSettings/ApiKeys/index.jsx | 2 +- frontend/src/pages/GeneralSettings/Appearance/index.jsx | 2 +- frontend/src/pages/GeneralSettings/Chats/index.jsx | 2 +- frontend/src/pages/GeneralSettings/EmbedChats/index.jsx | 2 +- frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx | 2 +- frontend/src/pages/GeneralSettings/Security/index.jsx | 2 +- frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx | 4 ++-- frontend/src/pages/WorkspaceSettings/index.jsx | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/DefaultChat/index.jsx b/frontend/src/components/DefaultChat/index.jsx index 8bc6c7cb7e1..00dd9550a61 100644 --- a/frontend/src/components/DefaultChat/index.jsx +++ b/frontend/src/components/DefaultChat/index.jsx @@ -335,7 +335,7 @@ export default function DefaultChatContainer() { return (
{isMobile && } {fetchedMessages.length === 0 diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx index 8a99a62a2eb..09f58489803 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx @@ -108,7 +108,7 @@ export default function ChatContainer({ workspace, knownHistory = [] }) { return (
{isMobile && }
diff --git a/frontend/src/pages/Admin/Invitations/index.jsx b/frontend/src/pages/Admin/Invitations/index.jsx index a4a99e93be4..cdf0a649591 100644 --- a/frontend/src/pages/Admin/Invitations/index.jsx +++ b/frontend/src/pages/Admin/Invitations/index.jsx @@ -18,7 +18,7 @@ export default function AdminInvites() {
diff --git a/frontend/src/pages/Admin/Logging/index.jsx b/frontend/src/pages/Admin/Logging/index.jsx index 246cf211016..697823c4a66 100644 --- a/frontend/src/pages/Admin/Logging/index.jsx +++ b/frontend/src/pages/Admin/Logging/index.jsx @@ -30,7 +30,7 @@ export default function AdminLogs() {
diff --git a/frontend/src/pages/Admin/System/index.jsx b/frontend/src/pages/Admin/System/index.jsx index c561efd2e6f..040edc70c97 100644 --- a/frontend/src/pages/Admin/System/index.jsx +++ b/frontend/src/pages/Admin/System/index.jsx @@ -43,7 +43,7 @@ export default function AdminSystem() {
diff --git a/frontend/src/pages/Admin/Workspaces/index.jsx b/frontend/src/pages/Admin/Workspaces/index.jsx index 62a28094bb4..3ab4c8cda99 100644 --- a/frontend/src/pages/Admin/Workspaces/index.jsx +++ b/frontend/src/pages/Admin/Workspaces/index.jsx @@ -18,7 +18,7 @@ export default function AdminWorkspaces() {
diff --git a/frontend/src/pages/GeneralSettings/ApiKeys/index.jsx b/frontend/src/pages/GeneralSettings/ApiKeys/index.jsx index 9ba3335f56d..8814820cd76 100644 --- a/frontend/src/pages/GeneralSettings/ApiKeys/index.jsx +++ b/frontend/src/pages/GeneralSettings/ApiKeys/index.jsx @@ -20,7 +20,7 @@ export default function AdminApiKeys() {
diff --git a/frontend/src/pages/GeneralSettings/Appearance/index.jsx b/frontend/src/pages/GeneralSettings/Appearance/index.jsx index 9aed853b27d..2ff3c292cce 100644 --- a/frontend/src/pages/GeneralSettings/Appearance/index.jsx +++ b/frontend/src/pages/GeneralSettings/Appearance/index.jsx @@ -11,7 +11,7 @@ export default function Appearance() {
diff --git a/frontend/src/pages/GeneralSettings/Chats/index.jsx b/frontend/src/pages/GeneralSettings/Chats/index.jsx index aeb341c1b31..0ddb0ad7a43 100644 --- a/frontend/src/pages/GeneralSettings/Chats/index.jsx +++ b/frontend/src/pages/GeneralSettings/Chats/index.jsx @@ -90,7 +90,7 @@ export default function WorkspaceChats() {
diff --git a/frontend/src/pages/GeneralSettings/EmbedChats/index.jsx b/frontend/src/pages/GeneralSettings/EmbedChats/index.jsx index 23c5bf189e5..c74d8c7e1bb 100644 --- a/frontend/src/pages/GeneralSettings/EmbedChats/index.jsx +++ b/frontend/src/pages/GeneralSettings/EmbedChats/index.jsx @@ -14,7 +14,7 @@ export default function EmbedChats() {
diff --git a/frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx b/frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx index 4257b029f8e..103ee728139 100644 --- a/frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx +++ b/frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx @@ -17,7 +17,7 @@ export default function EmbedConfigs() {
diff --git a/frontend/src/pages/GeneralSettings/Security/index.jsx b/frontend/src/pages/GeneralSettings/Security/index.jsx index e09315d16ee..55e2c797e94 100644 --- a/frontend/src/pages/GeneralSettings/Security/index.jsx +++ b/frontend/src/pages/GeneralSettings/Security/index.jsx @@ -13,7 +13,7 @@ export default function GeneralSecurity() {
diff --git a/frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx b/frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx index e5eacaea727..5a799ecad6d 100644 --- a/frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx +++ b/frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx @@ -165,7 +165,7 @@ export default function GeneralVectorDatabase() { {loading ? (
@@ -174,7 +174,7 @@ export default function GeneralVectorDatabase() { ) : (
}
Date: Mon, 26 Feb 2024 21:13:54 -0800 Subject: [PATCH 05/28] update borders of all containers to match rest of UI --- frontend/src/components/DefaultChat/index.jsx | 2 +- frontend/src/components/WorkspaceChat/ChatContainer/index.jsx | 2 +- frontend/src/pages/Admin/Invitations/index.jsx | 2 +- frontend/src/pages/Admin/Logging/index.jsx | 2 +- frontend/src/pages/Admin/System/index.jsx | 2 +- frontend/src/pages/Admin/Users/index.jsx | 2 +- frontend/src/pages/Admin/Workspaces/index.jsx | 2 +- frontend/src/pages/GeneralSettings/ApiKeys/index.jsx | 2 +- frontend/src/pages/GeneralSettings/Appearance/index.jsx | 2 +- frontend/src/pages/GeneralSettings/Chats/index.jsx | 2 +- frontend/src/pages/GeneralSettings/EmbedChats/index.jsx | 2 +- frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx | 2 +- frontend/src/pages/GeneralSettings/Security/index.jsx | 2 +- frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx | 4 ++-- frontend/src/pages/WorkspaceSettings/index.jsx | 4 ++-- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/frontend/src/components/DefaultChat/index.jsx b/frontend/src/components/DefaultChat/index.jsx index 00dd9550a61..a20e323bd1b 100644 --- a/frontend/src/components/DefaultChat/index.jsx +++ b/frontend/src/components/DefaultChat/index.jsx @@ -335,7 +335,7 @@ export default function DefaultChatContainer() { return (
{isMobile && } {fetchedMessages.length === 0 diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx index 09f58489803..293da491f32 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/index.jsx @@ -108,7 +108,7 @@ export default function ChatContainer({ workspace, knownHistory = [] }) { return (
{isMobile && }
diff --git a/frontend/src/pages/Admin/Invitations/index.jsx b/frontend/src/pages/Admin/Invitations/index.jsx index cdf0a649591..31b2b7923e7 100644 --- a/frontend/src/pages/Admin/Invitations/index.jsx +++ b/frontend/src/pages/Admin/Invitations/index.jsx @@ -18,7 +18,7 @@ export default function AdminInvites() {
diff --git a/frontend/src/pages/Admin/Logging/index.jsx b/frontend/src/pages/Admin/Logging/index.jsx index 697823c4a66..f405c9a6810 100644 --- a/frontend/src/pages/Admin/Logging/index.jsx +++ b/frontend/src/pages/Admin/Logging/index.jsx @@ -30,7 +30,7 @@ export default function AdminLogs() {
diff --git a/frontend/src/pages/Admin/System/index.jsx b/frontend/src/pages/Admin/System/index.jsx index 040edc70c97..9fe4c71833d 100644 --- a/frontend/src/pages/Admin/System/index.jsx +++ b/frontend/src/pages/Admin/System/index.jsx @@ -43,7 +43,7 @@ export default function AdminSystem() {
diff --git a/frontend/src/pages/Admin/Workspaces/index.jsx b/frontend/src/pages/Admin/Workspaces/index.jsx index 3ab4c8cda99..fa612af12cd 100644 --- a/frontend/src/pages/Admin/Workspaces/index.jsx +++ b/frontend/src/pages/Admin/Workspaces/index.jsx @@ -18,7 +18,7 @@ export default function AdminWorkspaces() {
diff --git a/frontend/src/pages/GeneralSettings/ApiKeys/index.jsx b/frontend/src/pages/GeneralSettings/ApiKeys/index.jsx index 8814820cd76..606dbf0f565 100644 --- a/frontend/src/pages/GeneralSettings/ApiKeys/index.jsx +++ b/frontend/src/pages/GeneralSettings/ApiKeys/index.jsx @@ -20,7 +20,7 @@ export default function AdminApiKeys() {
diff --git a/frontend/src/pages/GeneralSettings/Appearance/index.jsx b/frontend/src/pages/GeneralSettings/Appearance/index.jsx index 2ff3c292cce..c2311a2c3e6 100644 --- a/frontend/src/pages/GeneralSettings/Appearance/index.jsx +++ b/frontend/src/pages/GeneralSettings/Appearance/index.jsx @@ -11,7 +11,7 @@ export default function Appearance() {
diff --git a/frontend/src/pages/GeneralSettings/Chats/index.jsx b/frontend/src/pages/GeneralSettings/Chats/index.jsx index 0ddb0ad7a43..5afde115d4a 100644 --- a/frontend/src/pages/GeneralSettings/Chats/index.jsx +++ b/frontend/src/pages/GeneralSettings/Chats/index.jsx @@ -90,7 +90,7 @@ export default function WorkspaceChats() {
diff --git a/frontend/src/pages/GeneralSettings/EmbedChats/index.jsx b/frontend/src/pages/GeneralSettings/EmbedChats/index.jsx index c74d8c7e1bb..d6079f39100 100644 --- a/frontend/src/pages/GeneralSettings/EmbedChats/index.jsx +++ b/frontend/src/pages/GeneralSettings/EmbedChats/index.jsx @@ -14,7 +14,7 @@ export default function EmbedChats() {
diff --git a/frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx b/frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx index 103ee728139..73a2ca6dbd3 100644 --- a/frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx +++ b/frontend/src/pages/GeneralSettings/EmbedConfigs/index.jsx @@ -17,7 +17,7 @@ export default function EmbedConfigs() {
diff --git a/frontend/src/pages/GeneralSettings/Security/index.jsx b/frontend/src/pages/GeneralSettings/Security/index.jsx index 55e2c797e94..7824825af7d 100644 --- a/frontend/src/pages/GeneralSettings/Security/index.jsx +++ b/frontend/src/pages/GeneralSettings/Security/index.jsx @@ -13,7 +13,7 @@ export default function GeneralSecurity() {
diff --git a/frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx b/frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx index 5a799ecad6d..36242d1463f 100644 --- a/frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx +++ b/frontend/src/pages/GeneralSettings/VectorDatabase/index.jsx @@ -165,7 +165,7 @@ export default function GeneralVectorDatabase() { {loading ? (
@@ -174,7 +174,7 @@ export default function GeneralVectorDatabase() { ) : (
}
- + Date: Mon, 26 Feb 2024 21:25:30 -0800 Subject: [PATCH 06/28] remove unneeded conditional --- frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx index bbd535e71ae..7f05b4ed86b 100644 --- a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx +++ b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx @@ -93,11 +93,7 @@ export default function ActiveWorkspaces() { transition-all duration-[200ms] flex flex-grow w-[75%] gap-x-2 py-[6px] px-[12px] rounded-[4px] text-white justify-start items-center hover:bg-workspace-item-selected-gradient hover:font-bold border-2 border-outline - ${ - isActive - ? "bg-workspace-item-selected-gradient font-bold" - : "" - }`} + ${isActive && "bg-workspace-item-selected-gradient font-bold"}`} >
From 2c3b01b5afde1e7d592ae47a6d785eb19ff2d66b Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Tue, 27 Feb 2024 16:43:09 -0800 Subject: [PATCH 07/28] custom messages component redesign and appearance settings layout changes --- .../components/EditingChatBubble/index.jsx | 83 ++++++++++--------- .../Appearance/CustomLogo/index.jsx | 12 +-- .../Appearance/CustomMessages/index.jsx | 31 ++++--- .../FooterCustomization/NewIconForm/index.jsx | 2 +- .../Appearance/FooterCustomization/index.jsx | 10 +-- .../Appearance/SupportEmail/index.jsx | 10 ++- .../GeneralSettings/Appearance/index.jsx | 12 +-- 7 files changed, 87 insertions(+), 73 deletions(-) diff --git a/frontend/src/components/EditingChatBubble/index.jsx b/frontend/src/components/EditingChatBubble/index.jsx index ba5cc480481..0aa2a078488 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/pages/GeneralSettings/Appearance/CustomLogo/index.jsx b/frontend/src/pages/GeneralSettings/Appearance/CustomLogo/index.jsx index 1e81f563c3f..2301a3c79d1 100644 --- a/frontend/src/pages/GeneralSettings/Appearance/CustomLogo/index.jsx +++ b/frontend/src/pages/GeneralSettings/Appearance/CustomLogo/index.jsx @@ -63,10 +63,12 @@ export default function CustomLogo() { }; return ( -
-
-

Custom Logo

-

+

+
+

+ Custom Logo +

+

Upload your custom logo to make your chatbot yours.

@@ -80,7 +82,7 @@ export default function CustomLogo() { />