feat: 优化记忆面板的 SectionHeader 组件样式,增强用户交互体验
This commit is contained in:
parent
ef274e0387
commit
4c2a2ebf28
@ -139,7 +139,7 @@ function SectionHeader({ config, count, isCollapsed, onClick }:
|
||||
{ config: NamespaceConfig; count: number; isCollapsed: boolean; onClick: () => void }) {
|
||||
const Icon = config.icon
|
||||
return (
|
||||
<button onClick={onClick} className="group flex items-center gap-2 w-full py-1.5 rounded-lg transition-colors hover:bg-[var(--overlay-hover)]">
|
||||
<button onClick={onClick} className="sticky top-0 z-10 group flex items-center gap-2 w-full py-1.5 rounded-lg transition-colors hover:bg-[var(--overlay-hover)] bg-[var(--bg-secondary)]/90 backdrop-blur-sm -mx-3 px-3">
|
||||
{isCollapsed ? <ChevronRight className="h-3 w-3 text-[var(--text-muted)]" /> : <ChevronDown className="h-3 w-3 text-[var(--text-muted)]" />}
|
||||
<div className={`flex items-center justify-center w-5 h-5 rounded-md bg-[var(--overlay-hover)] ${config.accent}`}>
|
||||
<Icon className="h-3 w-3" />
|
||||
@ -224,7 +224,7 @@ export function MemoryPanel({ memories, onRefresh, onClose, onCreateMemory, onUp
|
||||
|
||||
{/* list */}
|
||||
{memories.length > 0 && (
|
||||
<div className="flex-1 overflow-y-auto px-3 py-2 space-y-3">
|
||||
<div className="flex-1 overflow-y-auto px-3 pt-0 pb-2 space-y-3">
|
||||
{sorted.map(ns => {
|
||||
const c = cfg(ns)
|
||||
const items = grouped.get(ns)!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user