优化会话列表显示效果
This commit is contained in:
@@ -117,9 +117,10 @@ export const SidebarConversationCard = memo(function SidebarConversationCard({
|
||||
onClick={handleClick}
|
||||
onDoubleClick={handleDblClick}
|
||||
className={cn(
|
||||
"w-full text-left px-3 py-2.5 rounded-md transition-colors",
|
||||
"hover:bg-sidebar-accent/50",
|
||||
isSelected && "bg-sidebar-accent text-sidebar-accent-foreground"
|
||||
"w-full text-left px-3 py-2.5 mb-1 rounded-md transition-colors",
|
||||
isSelected
|
||||
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
||||
: "hover:bg-sidebar-accent/50"
|
||||
)}
|
||||
>
|
||||
<div className="flex items-center gap-1.5 min-w-0">
|
||||
|
||||
@@ -72,7 +72,7 @@ type FlatItem =
|
||||
| { type: "conversation"; conversation: DbConversationSummary }
|
||||
|
||||
const HEADER_HEIGHT = 32
|
||||
const CARD_HEIGHT = 58
|
||||
const CARD_HEIGHT = 62
|
||||
|
||||
const GroupHeader = memo(function GroupHeader({
|
||||
status,
|
||||
@@ -102,9 +102,7 @@ const GroupHeader = memo(function GroupHeader({
|
||||
className={cn("w-2 h-2 rounded-full shrink-0", STATUS_COLORS[status])}
|
||||
/>
|
||||
<span>{tStatus(status)}</span>
|
||||
<span className="ml-auto text-muted-foreground/60 tabular-nums">
|
||||
{count}
|
||||
</span>
|
||||
<span className="text-muted-foreground/60 tabular-nums">({count})</span>
|
||||
</button>
|
||||
)
|
||||
})
|
||||
@@ -148,8 +146,8 @@ const PendingReviewHeader = memo(function PendingReviewHeader({
|
||||
)}
|
||||
/>
|
||||
<span>{tStatus("pending_review")}</span>
|
||||
<span className="ml-auto text-muted-foreground/60 tabular-nums">
|
||||
{count}
|
||||
<span className="text-muted-foreground/60 tabular-nums">
|
||||
({count})
|
||||
</span>
|
||||
</button>
|
||||
</ContextMenuTrigger>
|
||||
|
||||
Reference in New Issue
Block a user