fix minor ui bugs
This commit is contained in:
		
							parent
							
								
									cb4a3861ec
								
							
						
					
					
						commit
						fa4e27a164
					
				|  | @ -27,7 +27,7 @@ export const Chat: FC<Props> = ({ model, messages, loading, lightMode, onSend, o | |||
| 
 | ||||
|   return ( | ||||
|     <div className="h-full w-full flex flex-col dark:bg-[#343541]"> | ||||
|       <div className="flex-1 overflow-y-auto"> | ||||
|       <div className="flex-1 overflow-auto"> | ||||
|         {messages.length === 0 ? ( | ||||
|           <> | ||||
|             <div className="flex justify-center pt-8 overflow-auto"> | ||||
|  |  | |||
|  | @ -11,7 +11,7 @@ interface Props { | |||
| export const ChatMessage: FC<Props> = ({ message, lightMode }) => { | ||||
|   return ( | ||||
|     <div | ||||
|       className={`flex justify-center py-[30px] whitespace-pre-wrap ${message.role === "assistant" ? "dark:bg-[#444654] dark:text-neutral-100 bg-neutral-100 text-neutral-900 border border-neutral-300 dark:border-none" : "dark:bg-[#343541] dark:text-white text-neutral-900"}`} | ||||
|       className={`flex justify-center py-[30px] ${message.role === "assistant" ? "dark:bg-[#444654] dark:text-neutral-100 bg-neutral-100 text-neutral-900 border border-neutral-300 dark:border-none" : "dark:bg-[#343541] dark:text-white text-neutral-900"}`} | ||||
|       style={{ overflowWrap: "anywhere" }} | ||||
|     > | ||||
|       <div className="w-full px-4 sm:px-0 sm:w-2/3 md:w-1/2 flex"> | ||||
|  |  | |||
|  | @ -42,7 +42,7 @@ export const Conversations: FC<Props> = ({ loading, conversations, selectedConve | |||
|       {conversations.map((conversation, index) => ( | ||||
|         <button | ||||
|           key={index} | ||||
|           className={`flex items-center justify-start h-[40px] px-2 text-sm rounded-lg hover:bg-neutral-700 cursor-pointer ${loading ? "disabled:cursor-not-allowed" : ""} ${selectedConversation.id === conversation.id ? "bg-slate-600" : ""}`} | ||||
|           className={`flex items-center justify-start min-h-[40px] px-2 text-sm rounded-lg hover:bg-neutral-700 cursor-pointer ${loading ? "disabled:cursor-not-allowed" : ""} ${selectedConversation.id === conversation.id ? "bg-slate-600" : ""}`} | ||||
|           onClick={() => onSelectConversation(conversation)} | ||||
|           disabled={loading} | ||||
|         > | ||||
|  |  | |||
|  | @ -19,7 +19,7 @@ interface Props { | |||
| 
 | ||||
| export const Sidebar: FC<Props> = ({ loading, conversations, lightMode, selectedConversation, onNewConversation, onToggleLightMode, onSelectConversation, onDeleteConversation, onToggleSidebar, onRenameConversation }) => { | ||||
|   return ( | ||||
|     <div className="flex flex-col bg-[#202123] min-w-[260px]"> | ||||
|     <div className="flex flex-col bg-[#202123] w-[260px]"> | ||||
|       <div className="flex items-center h-[60px] pl-2"> | ||||
|         <button | ||||
|           className="flex items-center w-[220px] h-[40px] rounded-lg bg-[#202123] border border-neutral-600 text-sm hover:bg-neutral-700" | ||||
|  | @ -38,7 +38,7 @@ export const Sidebar: FC<Props> = ({ loading, conversations, lightMode, selected | |||
|         /> | ||||
|       </div> | ||||
| 
 | ||||
|       <div className="flex flex-1 justify-center pb-2 overflow-y-auto"> | ||||
|       <div className="flex flex-1 justify-center overflow-auto"> | ||||
|         <Conversations | ||||
|           loading={loading} | ||||
|           conversations={conversations} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue