From 9240b395e86e1897f99cc7dd0d0b220f5635b0fb Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 27 Mar 2023 23:29:58 +0800 Subject: [PATCH] chore: update style issues from feedback --- components/ChatView/Header.tsx | 9 ++++++++- components/ChatView/MessageView.tsx | 4 ++-- components/ClearDataConfirmModal.tsx | 2 +- components/ConnectionSidebar.tsx | 16 ++++++++-------- components/CreateConnectionModal.tsx | 8 ++++---- components/EmptyView.tsx | 4 ++-- components/MessageLoader.tsx | 2 +- components/SettingModal.tsx | 1 - store/chat.ts | 2 +- 9 files changed, 27 insertions(+), 21 deletions(-) diff --git a/components/ChatView/Header.tsx b/components/ChatView/Header.tsx index 9c87ee7..1c00c60 100644 --- a/components/ChatView/Header.tsx +++ b/components/ChatView/Header.tsx @@ -22,11 +22,18 @@ const Header = (props: Props) => { className || "" } sticky top-0 w-full flex flex-row justify-between items-center lg:grid lg:grid-cols-3 py-2 border-b bg-white z-1`} > -
+
{title} + + +
{title}
diff --git a/components/ChatView/MessageView.tsx b/components/ChatView/MessageView.tsx index d7386e1..3d131e4 100644 --- a/components/ChatView/MessageView.tsx +++ b/components/ChatView/MessageView.tsx @@ -23,7 +23,7 @@ const MessageView = (props: Props) => { > {isCurrentUser ? ( <> -
+
{message.content}
@@ -36,7 +36,7 @@ const MessageView = (props: Props) => {
{
-

SQLChat saves all of your data in localstorage. Please be sure to clear data.

+

SQL Chat saves all your data in your local browser. Are you sure to clear all of them?

+ + + - - -
diff --git a/components/CreateConnectionModal.tsx b/components/CreateConnectionModal.tsx index c2fe683..09ce4b2 100644 --- a/components/CreateConnectionModal.tsx +++ b/components/CreateConnectionModal.tsx @@ -96,19 +96,19 @@ const CreateConnectionModal = (props: Props) => { />
- + setPartialConnection({ username: e.target.value })} />
- + setPartialConnection({ password: e.target.value })} /> diff --git a/components/EmptyView.tsx b/components/EmptyView.tsx index 5080a3a..acf72ee 100644 --- a/components/EmptyView.tsx +++ b/components/EmptyView.tsx @@ -43,7 +43,7 @@ const EmptyView = (props: Props) => { return (
-

SQLChat

+

SQL Chat

@@ -51,7 +51,7 @@ const EmptyView = (props: Props) => { {examples.map((example) => (
handleExampleClick(example)} > {`"${example}"`} → diff --git a/components/MessageLoader.tsx b/components/MessageLoader.tsx index ee6a5b0..f381f9e 100644 --- a/components/MessageLoader.tsx +++ b/components/MessageLoader.tsx @@ -7,7 +7,7 @@ const MessageLoader = () => {
-
+
diff --git a/components/SettingModal.tsx b/components/SettingModal.tsx index 843ea64..1335086 100644 --- a/components/SettingModal.tsx +++ b/components/SettingModal.tsx @@ -43,7 +43,6 @@ const SettingModal = (props: Props) => { Clear -

SQLChat saves all of your data in localstorage. Please be sure to clear data.

diff --git a/store/chat.ts b/store/chat.ts index 9abe437..74ea3f8 100644 --- a/store/chat.ts +++ b/store/chat.ts @@ -8,7 +8,7 @@ const getDefaultChat = (): Chat => { return { id: generateUUID(), assistantId: "sql-assistant", - title: "SQL Chat " + dayjs().format("LTS"), + title: dayjs().format("LTS"), createdAt: Date.now(), }; };