From 05698cb60f081e98c02565b20286f4e3f8763a55 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Mon, 15 Jan 2024 10:20:49 +0700 Subject: [PATCH] WIP layout api server --- web/screens/LocalServer/index.tsx | 81 ++++++++++++++++--------- web/screens/Settings/Advanced/index.tsx | 6 +- 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/web/screens/LocalServer/index.tsx b/web/screens/LocalServer/index.tsx index 7720812edb..4382c424de 100644 --- a/web/screens/LocalServer/index.tsx +++ b/web/screens/LocalServer/index.tsx @@ -1,43 +1,53 @@ import { Button } from '@janhq/uikit' -import { useAtom } from 'jotai' +import { useAtom, useAtomValue } from 'jotai' import { ExternalLinkIcon } from 'lucide-react' +import { twMerge } from 'tailwind-merge' + +import DropdownListSidebar from '@/containers/DropdownListSidebar' + +import { showRightSideBarAtom } from '../Chat/Sidebar' + import { serverEnabledAtom } from '@/helpers/atoms/LocalServer.atom' const LocalServerScreen = () => { const [serverEnabled, setServerEnabled] = useAtom(serverEnabledAtom) + const showing = useAtomValue(showRightSideBarAtom) return (
{/* Left SideBar */} -
-

Server Options

-

- Start an OpenAI-compatible local HTTP server. -

- -
- - +
+
+

Server Options

+

+ Start an OpenAI-compatible local HTTP server. +

+
+
+
+ + +
@@ -54,6 +64,21 @@ const LocalServerScreen = () => {
{/* Right bar */} +
+

+ Lorem, ipsum dolor sit amet consectetur adipisicing elit. Cumque earum + numquam fugit quia quisquam id quos aspernatur unde voluptatem neque, + officiis doloribus, laborum totam ad deserunt corporis impedit beatae + vitae? +

+
) } diff --git a/web/screens/Settings/Advanced/index.tsx b/web/screens/Settings/Advanced/index.tsx index da5455b92d..bd4ac91230 100644 --- a/web/screens/Settings/Advanced/index.tsx +++ b/web/screens/Settings/Advanced/index.tsx @@ -6,7 +6,7 @@ import { useContext, useEffect, useState } from 'react' import { fs } from '@janhq/core' import { Switch, Button } from '@janhq/uikit' -import { useAtom } from 'jotai' +// import { useAtom } from 'jotai' import ShortcutModal from '@/containers/ShortcutModal' import { toaster } from '@/containers/Toast' @@ -17,13 +17,13 @@ import { FeatureToggleContext } from '@/context/FeatureToggle' import { useSettings } from '@/hooks/useSettings' -import { serverEnabledAtom } from '@/helpers/atoms/LocalServer.atom' +// import { serverEnabledAtom } from '@/helpers/atoms/LocalServer.atom' const Advanced = () => { const { experimentalFeatureEnabed, setExperimentalFeatureEnabled } = useContext(FeatureToggleContext) const [gpuEnabled, setGpuEnabled] = useState(false) - const [serverEnabled, setServerEnabled] = useAtom(serverEnabledAtom) + // const [serverEnabled, setServerEnabled] = useAtom(serverEnabledAtom) const { readSettings, saveSettings, validateSettings, setShowNotification } = useSettings()