feat: optimize conversation operation (#479)

This commit is contained in:
Joel
2023-06-28 17:53:23 +08:00
committed by GitHub
parent a87f6f2837
commit 838825d747
4 changed files with 59 additions and 33 deletions

View File

@@ -56,16 +56,14 @@ export default function AppNavItem({
<div className='overflow-hidden text-ellipsis whitespace-nowrap'>{name}</div>
</div>
{
!isSelected && (
<div className={cn(s.opBtn, 'shrink-0')} onClick={e => e.stopPropagation()}>
<ItemOperation
isPinned={isPinned}
togglePin={togglePin}
isShowDelete={!uninstallable}
onDelete={() => onDelete(id)}
/>
</div>
)
<div className={cn(s.opBtn, 'shrink-0')} onClick={e => e.stopPropagation()}>
<ItemOperation
isPinned={isPinned}
togglePin={togglePin}
isShowDelete={!uninstallable && !isSelected}
onDelete={() => onDelete(id)}
/>
</div>
}
</div>
)