feat: ui fixed

This commit is contained in:
butterfly
2024-04-28 12:49:06 +08:00
parent 1a636b0f50
commit 9569888b0e
13 changed files with 180 additions and 99 deletions

View File

@@ -182,7 +182,7 @@ export function ChatActions(props: {
return (
<div
key={act.text}
className={`flex items-center gap-3 p-3 rounded-action-btn leading-6`}
className={`flex items-center gap-3 p-3 rounded-action-btn leading-6 cursor-pointer`}
onClick={act.onClick}
>
{act.icon}

View File

@@ -180,7 +180,7 @@ export default function ChatMessagePanel(props: ChatMessagePanelProps) {
)}
</div>
<div
className={`group relative flex-1 flex ${
className={`group relative flex flex ${
isUser ? "flex-row-reverse" : ""
}`}
>

View File

@@ -261,17 +261,13 @@ export default function MessageActions(props: MessageActionsProps) {
showActions && (
<div
className={`
absolute z-10
absolute z-10 w-[100%]
${isUser ? "right-0" : "left-0"}
transition-all duration-300
opacity-0
pointer-events-none
group-hover:opacity-100
group-hover:pointer-events-auto
bg-chat-message-actions
rounded-md
shadow-message-actions-bar
dark:bg-none
${className}
`}
>
@@ -285,7 +281,13 @@ export default function MessageActions(props: MessageActionsProps) {
onUserStop,
})}
groups={groupsTypes[groupsType]}
className="flex flex-row gap-1 p-1"
className={`
float-right flex flex-row gap-1 p-1
bg-chat-message-actions
rounded-md
shadow-message-actions-bar
dark:bg-none
`}
/>
</div>
)

View File

@@ -54,12 +54,17 @@ export function SessionItem(props: {
<Draggable draggableId={`${props.id}`} index={props.index}>
{(provided) => (
<div
className={`group/chat-menu-list relative flex p-3 items-center gap-2 self-stretch rounded-md mb-2 ${
props.selected &&
(currentPath === Path.Chat || currentPath === Path.Home)
? `bg-chat-menu-session-selected border-chat-menu-session-selected border `
: `bg-chat-menu-session-unselected hover:bg-chat-menu-session-hovered`
}`}
className={`
group/chat-menu-list relative flex p-3 items-center gap-2 self-stretch rounded-md mb-2
border
bg-chat-menu-session-unselected border-chat-menu-session-unselected
${
props.selected &&
(currentPath === Path.Chat || currentPath === Path.Home)
? `!bg-chat-menu-session-selected !border-chat-menu-session-selected`
: `hover:bg-chat-menu-session-hovered hover:chat-menu-session-hovered`
}
`}
onClick={props.onClick}
ref={(ele) => {
draggableRef.current = ele;
@@ -94,7 +99,7 @@ export function SessionItem(props: {
<Popover
content={
<div
className={`flex items-center gap-3 p-3 rounded-action-btn leading-6`}
className={`flex items-center gap-3 p-3 rounded-action-btn leading-6 cursor-pointer`}
onClickCapture={(e) => {
props.onDelete?.();
e.preventDefault();
@@ -208,12 +213,12 @@ export default MenuLayout(function SessionList(props) {
</div>
<div
className={`flex-1 overflow-y-auto overflow-x-hidden`}
onClick={(e) => {
if (e.target === e.currentTarget) {
navigate(Path.Home);
}
}}
className={`flex-1 overflow-y-auto`}
// onClick={(e) => {
// if (e.target === e.currentTarget) {
// navigate(Path.Home);
// }
// }}
>
<DragDropContext onDragEnd={onDragEnd}>
<Droppable droppableId="chat-list">