From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +0800
Subject: [PATCH] 修改
---
app/components/base/chat/chat-with-history/sidebar/item.tsx | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/app/components/base/chat/chat-with-history/sidebar/item.tsx b/app/components/base/chat/chat-with-history/sidebar/item.tsx
index ea17f3f..90458cb 100644
--- a/app/components/base/chat/chat-with-history/sidebar/item.tsx
+++ b/app/components/base/chat/chat-with-history/sidebar/item.tsx
@@ -5,8 +5,8 @@
} from 'react'
import { useHover } from 'ahooks'
import type { ConversationItem } from '@/models/share'
-import Operation from '@/app/components/base/chat/chat-with-history/sidebar/operation'
-import cn from '@/utils/classnames'
+import { MessageDotsCircle } from '@/app/components/base/icons/src/vender/solid/communication'
+import ItemOperation from '@/app/components/explore/item-operation'
type ItemProps = {
isPin?: boolean
@@ -24,23 +24,23 @@
}) => {
const ref = useRef(null)
const isHovering = useHover(ref)
- const isSelected = currentConversationId === item.id
return (
<div
ref={ref}
key={item.id}
- className={cn(
- 'system-sm-medium group flex cursor-pointer rounded-lg p-1 pl-3 text-components-menu-item-text hover:bg-state-base-hover',
- isSelected && 'bg-state-accent-active text-text-accent hover:bg-state-accent-active',
- )}
+ className={`
+ flex mb-0.5 last-of-type:mb-0 py-1.5 pl-3 pr-1.5 text-sm font-medium text-gray-700
+ rounded-lg cursor-pointer hover:bg-gray-50 group
+ ${currentConversationId === item.id && 'text-primary-600 bg-primary-50'}
+ `}
onClick={() => onChangeConversation(item.id)}
>
- <div className='grow truncate p-1 pl-0' title={item.name}>{item.name}</div>
+ <MessageDotsCircle className={`shrink-0 mt-1 mr-2 w-4 h-4 text-gray-400 ${currentConversationId === item.id && 'text-primary-600'}`} />
+ <div className='grow py-0.5 break-all' title={item.name}>{item.name}</div>
{item.id !== '' && (
- <div className='shrink-0' onClick={e => e.stopPropagation()}>
- <Operation
- isActive={isSelected}
+ <div className='shrink-0 h-6' onClick={e => e.stopPropagation()}>
+ <ItemOperation
isPinned={!!isPin}
isItemHovering={isHovering}
togglePin={() => onOperate(isPin ? 'unpin' : 'pin', item)}
--
Gitblit v1.8.0