From 185dcb61f7097bfcde92e615c76e2f1a3b3605d1 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Sat, 3 Aug 2024 20:49:19 +0530 Subject: [PATCH] Update the settings page to better match the design --- src/interface/web/app/settings/page.tsx | 167 ++++++++++++------------ 1 file changed, 84 insertions(+), 83 deletions(-) diff --git a/src/interface/web/app/settings/page.tsx b/src/interface/web/app/settings/page.tsx index 4865652e..5b28e455 100644 --- a/src/interface/web/app/settings/page.tsx +++ b/src/interface/web/app/settings/page.tsx @@ -69,9 +69,10 @@ import { ArrowCircleDown, ArrowsClockwise, Check, + CaretDown, + Waveform, } from "@phosphor-icons/react"; -import NavMenu from "../components/navMenu/navMenu"; import SidePanel from "../components/sidePanel/chatHistorySidePanel"; import Loading from "../components/loading/loading"; @@ -242,11 +243,11 @@ const DropdownComponent: React.FC = ({ items, selected, const [position, setPosition] = useState(selected?.toString() ?? "0"); return !!selected && ( -
+
- - @@ -357,7 +358,7 @@ export default function SettingsView() { const [numberValidationState, setNumberValidationState] = useState(PhoneNumberValidationState.Verified); const [isManageFilesModalOpen, setIsManageFilesModalOpen] = useState(false); const { toast } = useToast(); - const cardClassName = "w-full lg:w-1/3 grid grid-flow-column border border-gray-300 shadow-md rounded-lg"; + const cardClassName = "w-full lg:w-1/3 grid grid-flow-column border border-gray-300 shadow-md rounded-lg bg-gradient-to-b from-background to-gray-50 dark:to-gray-950"; useEffect(() => { setUserConfig(initialUserConfig); @@ -751,7 +752,7 @@ export default function SettingsView() {
Content
- Files + Files Manage your synced files @@ -772,7 +773,7 @@ export default function SettingsView() { - Github + Github Set Github repositories to index @@ -841,84 +842,10 @@ export default function SettingsView() {
-
-
Models
-
- {userConfig.chat_model_options.length > 0 && ( - - Chat - -

Pick the chat model to generate text responses

- -
- - {!userConfig.is_active && ( -

Subscribe to switch model

- )} -
-
- )} - {userConfig.search_model_options.length > 0 && ( - - Search - -

Pick the search model to find your documents

- -
- - -
- )} - {userConfig.paint_model_options.length > 0 && ( - - Paint - -

Pick the paint model to generate image responses

- -
- - {!userConfig.is_active && ( -

Subscribe to switch model

- )} -
-
- )} - {userConfig.voice_model_options.length > 0 && ( - - Voice - -

Pick the voice model to generate speech responses

- -
- - {!userConfig.is_active && ( -

Subscribe to switch model

- )} -
-
- )} -
-
Clients
- + API Keys @@ -1038,6 +965,80 @@ export default function SettingsView() {
+
+
Models
+
+ {userConfig.chat_model_options.length > 0 && ( + + Chat + +

Pick the chat model to generate text responses

+ +
+ + {!userConfig.is_active && ( +

Subscribe to switch model

+ )} +
+
+ )} + {userConfig.search_model_options.length > 0 && ( + + Search + +

Pick the search model to find your documents

+ +
+ + +
+ )} + {userConfig.paint_model_options.length > 0 && ( + + Paint + +

Pick the paint model to generate image responses

+ +
+ + {!userConfig.is_active && ( +

Subscribe to switch model

+ )} +
+
+ )} + {userConfig.voice_model_options.length > 0 && ( + + Voice + +

Pick the voice model to generate speech responses

+ +
+ + {!userConfig.is_active && ( +

Subscribe to switch model

+ )} +
+
+ )} +
+