From 1d6ee64e1dbddff6f2894de55e6b1c47dbc6229a Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Mon, 12 Feb 2024 19:36:52 +0700 Subject: [PATCH 1/3] [Cherry Pick] Fix [UI/UX] [Front End] Settings Page (#4032) * Fix [UI/UX] [Locales] Correct Spelling - [+] fix(locales): correct spelling and improve wording in cn.ts and en.ts locale files * Fix [UI/UX] [Front End] Settings Page - [+] fix(settings.tsx): correct typo in ApiVerion to ApiVersion - [+] refactor(settings.tsx): switch Azure.ApiKey to Google.ApiKey in ListItem title and subTitle * Fix [UI/UX] [Locales] [SK] Correct Typo - [+] fix(sk.ts): correct typo in ApiVersion key in Slovak locale file --- app/components/settings.tsx | 8 ++++---- app/locales/cn.ts | 17 +++++++++-------- app/locales/en.ts | 10 +++++----- app/locales/sk.ts | 2 +- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 35d3b0215..84ae7edf6 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -1081,8 +1081,8 @@ export function Settings() { > Date: Thu, 15 Feb 2024 10:51:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=EF=BC=8C=E6=9A=82=E5=81=9C=E6=8C=89=E9=92=AE=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/chat.module.scss | 35 +++++---- app/components/chat.tsx | 133 ++++++++++++++++++++++---------- 2 files changed, 110 insertions(+), 58 deletions(-) diff --git a/app/components/chat.module.scss b/app/components/chat.module.scss index 32300a9c4..456e13eb0 100644 --- a/app/components/chat.module.scss +++ b/app/components/chat.module.scss @@ -298,24 +298,24 @@ .chat-message-header { margin-top: 20px; display: flex; - align-items: center; + align-items: flex-end; +} - .chat-message-actions { +.chat-message-actions { + display: flex; + box-sizing: border-box; + font-size: 12px; + align-items: flex-end; + justify-content: space-between; + transition: all ease 0.3s; + transform: scale(0.9) translateY(5px); + margin: 0 10px; + opacity: 0; + pointer-events: none; + + .chat-input-actions { display: flex; - box-sizing: border-box; - font-size: 12px; - align-items: flex-end; - justify-content: space-between; - transition: all ease 0.3s; - transform: scale(0.9) translateY(5px); - margin: 0 10px; - opacity: 0; - pointer-events: none; - - .chat-input-actions { - display: flex; - flex-wrap: nowrap; - } + flex-wrap: nowrap; } } @@ -431,10 +431,11 @@ white-space: nowrap; transition: all ease 0.6s; color: var(--black); - text-align: right; + text-align: left; width: 100%; box-sizing: border-box; padding-right: 10px; + padding-left: 10px; pointer-events: none; z-index: 1; } diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 4f1c6c764..0bef821b6 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1258,44 +1258,50 @@ function _Chat() { )} - {showActions && ( -
-
- {message.streaming ? ( - } - onClick={() => onUserStop(message.id ?? i)} - /> - ) : ( - <> - } - onClick={() => onResend(message)} - /> +
+ {isContext + ? Locale.Chat.IsContext + : message.date.toLocaleString()} +
- } - onClick={() => onDelete(message.id ?? i)} - /> + {/*{showActions && (*/} + {/*
*/} + {/*
*/} + {/* {message.streaming ? (*/} + {/* }*/} + {/* onClick={() => onUserStop(message.id ?? i)}*/} + {/* />*/} + {/* ) : (*/} + {/* <>*/} + {/* }*/} + {/* onClick={() => onResend(message)}*/} + {/* />*/} - } - onClick={() => onPinMessage(message)} - /> - } - onClick={() => copyToClipboard(message.content)} - /> - - )} -
-
- )} + {/* }*/} + {/* onClick={() => onDelete(message.id ?? i)}*/} + {/* />*/} + + {/* }*/} + {/* onClick={() => onPinMessage(message)}*/} + {/* />*/} + {/* }*/} + {/* onClick={() => copyToClipboard(message.content)}*/} + {/* />*/} + {/* */} + {/* )}*/} + {/*
*/} + {/*
*/} + {/*)}*/} {showTyping && (
@@ -1413,11 +1419,56 @@ function _Chat() {
)} -
- {isContext - ? Locale.Chat.IsContext - : message.date.toLocaleString()} -
+ {/*
*/} + {/* {isContext*/} + {/* ? Locale.Chat.IsContext*/} + {/* : message.date.toLocaleString()}*/} + {/*
*/} + + {showActions && ( +
+
+ {message.streaming ? ( + } + onClick={() => onUserStop(message.id ?? i)} + /> + ) : ( + <> + } + onClick={() => onResend(message)} + /> + + } + onClick={() => onDelete(message.id ?? i)} + /> + + } + onClick={() => onPinMessage(message)} + /> + } + onClick={() => copyToClipboard(message.content)} + /> + + )} +
+
+ )} {shouldShowClearContextDivider && } From d701e63a526f9b04ebf2f7839183f723629cd37e Mon Sep 17 00:00:00 2001 From: sijinhui Date: Thu, 15 Feb 2024 10:52:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=EF=BC=8C=E6=9A=82=E5=81=9C=E6=8C=89=E9=92=AE=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/chat.tsx | 45 ----------------------------------------- 1 file changed, 45 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 0bef821b6..48b16e2b0 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1263,45 +1263,6 @@ function _Chat() { ? Locale.Chat.IsContext : message.date.toLocaleString()} - - {/*{showActions && (*/} - {/*
*/} - {/*
*/} - {/* {message.streaming ? (*/} - {/* }*/} - {/* onClick={() => onUserStop(message.id ?? i)}*/} - {/* />*/} - {/* ) : (*/} - {/* <>*/} - {/* }*/} - {/* onClick={() => onResend(message)}*/} - {/* />*/} - - {/* }*/} - {/* onClick={() => onDelete(message.id ?? i)}*/} - {/* />*/} - - {/* }*/} - {/* onClick={() => onPinMessage(message)}*/} - {/* />*/} - {/* }*/} - {/* onClick={() => copyToClipboard(message.content)}*/} - {/* />*/} - {/* */} - {/* )}*/} - {/*
*/} - {/*
*/} - {/*)}*/} {showTyping && (
@@ -1419,12 +1380,6 @@ function _Chat() {
)} - {/*
*/} - {/* {isContext*/} - {/* ? Locale.Chat.IsContext*/} - {/* : message.date.toLocaleString()}*/} - {/*
*/} - {showActions && (