From b662c25007650e3541d615e48829bb3146cab077 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Thu, 30 May 2024 10:53:40 +0700 Subject: [PATCH] fix: adjustment minor UI from qa feedback (#2963) * feat: update minor ui from feedback * fix: adjust spacing import model * feat: edit title thread (#2964) * feat: edit title thread * fix: fix copies * fix copies * fix copies --- themes/dark-dimmed/theme.json | 4 +- .../BottomPanel/DownloadingState/index.tsx | 2 +- web/containers/Layout/RibbonPanel/index.tsx | 10 ++- web/containers/Layout/TopPanel/index.tsx | 2 +- web/containers/LeftPanelContainer/index.tsx | 4 +- web/screens/Settings/Appearance/index.tsx | 3 +- .../Settings/EditModelInfoModal/index.tsx | 4 +- .../ThreadCenterPanel/ChatInput/index.tsx | 5 +- .../ModalEditTitleThread/index.tsx | 71 +++++++++++++++++++ web/screens/Thread/ThreadLeftPanel/index.tsx | 2 + 10 files changed, 96 insertions(+), 11 deletions(-) create mode 100644 web/screens/Thread/ThreadLeftPanel/ModalEditTitleThread/index.tsx diff --git a/themes/dark-dimmed/theme.json b/themes/dark-dimmed/theme.json index 908c6eec9..c96085092 100644 --- a/themes/dark-dimmed/theme.json +++ b/themes/dark-dimmed/theme.json @@ -52,7 +52,7 @@ }, "left-panel": { - "bg": "0, 0%, 13%, 0", + "bg": "215, 25%, 9%, 1", "menu": "0, 0%, 95%, 1", "menu-hover": "0, 0%, 28%, 0.2", "menu-active": "0, 0%, 100%, 1", @@ -64,7 +64,7 @@ }, "right-panel": { - "bg": "0, 0%, 13%, 0" + "bg": "215, 25%, 9%, 1" }, "tooltip": { diff --git a/web/containers/Layout/BottomPanel/DownloadingState/index.tsx b/web/containers/Layout/BottomPanel/DownloadingState/index.tsx index 7f71c8248..ddc2eab91 100644 --- a/web/containers/Layout/BottomPanel/DownloadingState/index.tsx +++ b/web/containers/Layout/BottomPanel/DownloadingState/index.tsx @@ -33,7 +33,7 @@ export default function DownloadingState() { +
- {!isMac && ( + {isWindows && (
-
+
{
-
+
diff --git a/web/screens/Thread/ThreadCenterPanel/ChatInput/index.tsx b/web/screens/Thread/ThreadCenterPanel/ChatInput/index.tsx index 52b237868..13187b7a4 100644 --- a/web/screens/Thread/ThreadCenterPanel/ChatInput/index.tsx +++ b/web/screens/Thread/ThreadCenterPanel/ChatInput/index.tsx @@ -232,7 +232,10 @@ const ChatInput = () => { {showAttacmentMenus && (
    { + const [title, setTitle] = useState(thread.title) + + const { updateThreadMetadata } = useCreateNewThread() + + const onUpdateTitle = useCallback( + (e: React.MouseEvent) => { + e.stopPropagation() + + updateThreadMetadata({ + ...thread, + title: title || 'New Thread', + }) + }, + [thread, title, updateThreadMetadata] + ) + + return ( + e.stopPropagation()} + > + + + Edit title + +
+ } + content={ +
+ setTitle(e.target.value)} + autoFocus + /> +
+ e.stopPropagation()}> + + + + + +
+
+ } + /> + ) +} + +export default memo(ModalEditTitleThread) diff --git a/web/screens/Thread/ThreadLeftPanel/index.tsx b/web/screens/Thread/ThreadLeftPanel/index.tsx index ea25d1fee..0da7d0088 100644 --- a/web/screens/Thread/ThreadLeftPanel/index.tsx +++ b/web/screens/Thread/ThreadLeftPanel/index.tsx @@ -22,6 +22,7 @@ import useSetActiveThread from '@/hooks/useSetActiveThread' import ModalCleanThread from './ModalCleanThread' import ModalDeleteThread from './ModalDeleteThread' +import ModalEditTitleThread from './ModalEditTitleThread' import { assistantsAtom } from '@/helpers/atoms/Assistant.atom' import { editMessageAtom } from '@/helpers/atoms/ChatMessage.atom' @@ -143,6 +144,7 @@ const ThreadLeftPanel = () => {
+