diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index d9defb9e..1f57fee3 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -206,7 +206,7 @@ export default function Conversation() { onClick={() => { setShareModalState(true); }} - className="fixed top-4 right-20 z-30 rounded-full hover:bg-bright-gray dark:hover:bg-[#28292E]" + className="fixed top-4 right-20 z-0 rounded-full hover:bg-bright-gray dark:hover:bg-[#28292E]" > { - setOpen(false); - setIsHovered(true); - }} - onMouseLeave={() => { - setIsHovered(false); - }} - onClick={() => { - conversationId !== conversation.id && - selectConversation(conversation.id); - }} - className={`my-auto mx-4 mt-4 flex h-9 cursor-pointer items-center justify-between gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-[#28292E] ${ - conversationId === conversation.id || isOpen - ? 'bg-gray-100 dark:bg-[#28292E]' - : '' - }`} - > -
- - {isEdit ? ( - setConversationsName(e.target.value)} + <> +
{ + setIsHovered(true); + }} + onMouseLeave={() => { + setIsHovered(false); + }} + onClick={() => { + conversationId !== conversation.id && + selectConversation(conversation.id); + }} + className={`my-auto mx-4 mt-4 flex h-9 cursor-pointer items-center justify-between gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-[#28292E] ${ + conversationId === conversation.id || isOpen || isHovered + ? 'bg-gray-100 dark:bg-[#28292E]' + : '' + }`} + > +
+ - ) : ( -

- {conversationName} -

- )} -
- {(conversationId === conversation.id || isHovered || isOpen) && ( -
{isEdit ? ( -
- Edit { - event.stopPropagation(); - handleSaveConversation({ - id: conversation.id, - name: conversationName, - }); - }} - /> - Exit { - event.stopPropagation(); - onClear(); - }} - /> -
+ setConversationsName(e.target.value)} + /> ) : ( - - )} - {isOpen && ( -
- - - -
+

+ {conversationName} +

)}
- )} + {(conversationId === conversation.id || isHovered || isOpen) && ( +
+ {isEdit ? ( +
+ Edit { + event.stopPropagation(); + handleSaveConversation({ + id: conversation.id, + name: conversationName, + }); + }} + /> + Exit { + event.stopPropagation(); + onClear(); + }} + /> +
+ ) : ( + + )} + {isOpen && ( +
+ + + +
+ )} +
+ )} +
)} -
+ ); } diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index ce44b713..c7651f8b 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -108,7 +108,7 @@ "label": "Create a public page to share", "note": "Source document, personal information and further conversation will remain private", "create": "Create", - "option":"Allow users to prompt further" + "option": "Allow users to prompt further" } }, "sharedConv": { diff --git a/frontend/src/locale/es.json b/frontend/src/locale/es.json index a68d440c..d368749f 100644 --- a/frontend/src/locale/es.json +++ b/frontend/src/locale/es.json @@ -108,7 +108,7 @@ "label": "Crear una página pública para compartir", "note": "El documento original, la información personal y las conversaciones posteriores permanecerán privadas", "create": "Crear", - "option":"Permitir a los usuarios realizar más consultas." + "option": "Permitir a los usuarios realizar más consultas." } }, "sharedConv": { diff --git a/frontend/src/locale/jp.json b/frontend/src/locale/jp.json index f4e2980f..350faf09 100644 --- a/frontend/src/locale/jp.json +++ b/frontend/src/locale/jp.json @@ -108,7 +108,7 @@ "label": "共有ページを作成して共有する", "note": "ソースドキュメント、個人情報、および以降の会話は非公開のままになります", "create": "作成", - "option":"ユーザーがより多くのクエリを実行できるようにします。" + "option": "ユーザーがより多くのクエリを実行できるようにします。" } }, "sharedConv": { diff --git a/frontend/src/locale/zh.json b/frontend/src/locale/zh.json index a3ff940b..db93dcfc 100644 --- a/frontend/src/locale/zh.json +++ b/frontend/src/locale/zh.json @@ -108,7 +108,7 @@ "label": "创建用于分享的公共页面", "note": "源文档、个人信息和后续对话将保持私密", "create": "创建", - "option":"允许用户进行更多查询。" + "option": "允许用户进行更多查询。" } }, "sharedConv": { diff --git a/frontend/src/modals/ConfirmationModal.tsx b/frontend/src/modals/ConfirmationModal.tsx index f1bb4549..0b39440b 100644 --- a/frontend/src/modals/ConfirmationModal.tsx +++ b/frontend/src/modals/ConfirmationModal.tsx @@ -1,4 +1,3 @@ -import { SyntheticEvent } from 'react'; import Exit from '../assets/exit.svg'; import { ActiveState } from '../models/misc'; import { useTranslation } from 'react-i18next'; @@ -22,7 +21,6 @@ function ConfirmationModal({ const { t } = useTranslation(); return (
event.stopPropagation()} className={`${ modalState === 'ACTIVE' ? 'visible' : 'hidden' } fixed top-0 left-0 z-30 h-screen w-screen bg-gray-alpha`} diff --git a/frontend/src/modals/ShareConversationModal.tsx b/frontend/src/modals/ShareConversationModal.tsx index 939a4efc..c7ef0ad6 100644 --- a/frontend/src/modals/ShareConversationModal.tsx +++ b/frontend/src/modals/ShareConversationModal.tsx @@ -1,4 +1,4 @@ -import { SyntheticEvent, useState } from 'react'; +import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useSelector } from 'react-redux'; import { @@ -117,10 +117,7 @@ export const ShareConversationModal = ({ }; return ( -
event.stopPropagation()} - className="z-100 fixed top-0 left-0 flex h-screen w-screen items-center justify-center bg-gray-alpha bg-opacity-50 text-chinese-black dark:text-silver" - > +
) : (