Skip to content

Commit

Permalink
fix: fix command panel cannot click problem
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Apr 9, 2024
1 parent 4b1da29 commit 5c259d7
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions client/web/src/components/QuickSwitcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,27 @@ const QuickSwitcher: React.FC = React.memo(() => {
{filteredActions.map((action, i) => (
<div
key={action.key}
className={clsx('truncate px-2 py-1 rounded', {
'bg-black bg-opacity-20 dark:bg-white dark:bg-opacity-20':
selectedIndex === i,
})}
className={clsx(
'truncate px-2 py-1 rounded cursor-pointer mb-0.5 group transition-all',
'hover:bg-black hover:bg-opacity-20 dark:hover:bg-white dark:hover:bg-opacity-20',
{
'bg-black bg-opacity-20 dark:bg-white dark:bg-opacity-20':
selectedIndex === i,
}
)}
onClick={() => {
action.action(actionContext);
handleClose();
}}
>
<div className="text-lg">{action.label}</div>
<div
className={clsx('opacity-0 text-gray-400 text-xs', {
'opacity-100': selectedIndex === i,
})}
className={clsx(
'opacity-0 text-gray-400 text-xs group-hover:opacity-100 transition-all',
{
'opacity-100': selectedIndex === i,
}
)}
>
{action.source}
</div>
Expand Down

0 comments on commit 5c259d7

Please sign in to comment.