Commit 25440279 authored by Joel's avatar Joel

feat: current item support operation

parent 28b793f7
...@@ -56,16 +56,14 @@ export default function AppNavItem({ ...@@ -56,16 +56,14 @@ export default function AppNavItem({
<div className='overflow-hidden text-ellipsis whitespace-nowrap'>{name}</div> <div className='overflow-hidden text-ellipsis whitespace-nowrap'>{name}</div>
</div> </div>
{ {
!isSelected && (
<div className={cn(s.opBtn, 'shrink-0')} onClick={e => e.stopPropagation()}> <div className={cn(s.opBtn, 'shrink-0')} onClick={e => e.stopPropagation()}>
<ItemOperation <ItemOperation
isPinned={isPinned} isPinned={isPinned}
togglePin={togglePin} togglePin={togglePin}
isShowDelete={!uninstallable} isShowDelete={!uninstallable && !isSelected}
onDelete={() => onDelete(id)} onDelete={() => onDelete(id)}
/> />
</div> </div>
)
} }
</div> </div>
) )
......
...@@ -95,8 +95,6 @@ const List: FC<IListProps> = ({ ...@@ -95,8 +95,6 @@ const List: FC<IListProps> = ({
<span>{item.name}</span> <span>{item.name}</span>
</div> </div>
{
!isCurrent && (
<div className={cn(s.opBtn, 'shrink-0')} onClick={e => e.stopPropagation()}> <div className={cn(s.opBtn, 'shrink-0')} onClick={e => e.stopPropagation()}>
<ItemOperation <ItemOperation
isPinned={isPinned} isPinned={isPinned}
...@@ -105,8 +103,6 @@ const List: FC<IListProps> = ({ ...@@ -105,8 +103,6 @@ const List: FC<IListProps> = ({
onDelete={() => onDelete(item.id)} onDelete={() => onDelete(item.id)}
/> />
</div> </div>
)
}
</div> </div>
) )
})} })}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment