From 4055e844509a9addc0108fab9c654c7f1b36cda0 Mon Sep 17 00:00:00 2001 From: Khairul Haaziq <101852870+khairulhaaziq@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:10:31 +0800 Subject: [PATCH] enhance ui and fix layout problems (#63) --- components/Chat/Chat.tsx | 8 ++++---- components/Chat/ChatInput.tsx | 13 +++++++++---- components/Chat/ChatMessage.tsx | 6 +++--- components/Sidebar/Conversations.tsx | 20 ++++++++++---------- components/Sidebar/Key.tsx | 4 ++-- components/Sidebar/Search.tsx | 4 ++-- components/Sidebar/Sidebar.tsx | 12 ++++++------ components/Sidebar/SidebarButton.tsx | 4 ++-- components/Sidebar/SidebarSettings.tsx | 2 +- pages/index.tsx | 4 ++-- 10 files changed, 41 insertions(+), 36 deletions(-) diff --git a/components/Chat/Chat.tsx b/components/Chat/Chat.tsx index 6a997b1..a78f3cd 100644 --- a/components/Chat/Chat.tsx +++ b/components/Chat/Chat.tsx @@ -33,7 +33,7 @@ export const Chat: FC = ({ conversation, models, messageIsStreaming, mode }, [conversation.messages]); return ( -
+
{modelError ? (
Error fetching models.
@@ -42,11 +42,11 @@ export const Chat: FC = ({ conversation, models, messageIsStreaming, mode
) : ( <> -
+
{conversation.messages.length === 0 ? ( <>
-
{models.length === 0 ? "Loading..." : "Chatbot UI"}
+
{models.length === 0 ? "Loading..." : "Chatbot UI"}
{models.length > 0 && (
@@ -79,7 +79,7 @@ export const Chat: FC = ({ conversation, models, messageIsStreaming, mode {loading && }
diff --git a/components/Chat/ChatInput.tsx b/components/Chat/ChatInput.tsx index 2a5d999..5423f1d 100644 --- a/components/Chat/ChatInput.tsx +++ b/components/Chat/ChatInput.tsx @@ -68,10 +68,12 @@ export const ChatInput: FC = ({ onSend, messageIsStreaming, model }) => { }, [content]); return ( -
+
+
+