fix: Remove / as hotkey for add node and add tooltip

This commit is contained in:
blessedcoolant 2023-08-22 23:56:08 +12:00 committed by psychedelicious
parent d4463674cf
commit 5cf9b75d77
3 changed files with 12 additions and 5 deletions

View File

@ -140,7 +140,7 @@ const AddNodePopover = () => {
onClose();
}, [onClose]);
useHotkeys(['shift+a', 'space', '/'], handleHotkeyOpen);
useHotkeys(['shift+a', 'space'], handleHotkeyOpen);
useHotkeys(['escape'], handleHotkeyClose);
return (

View File

@ -1,3 +1,4 @@
import { Tooltip } from '@chakra-ui/react';
import { useAppDispatch } from 'app/store/storeHooks';
import IAIButton from 'common/components/IAIButton';
import { addNodePopoverOpened } from 'features/nodes/store/nodesSlice';
@ -13,9 +14,15 @@ const TopLeftPanel = () => {
return (
<Panel position="top-left">
<IAIButton aria-label="Add Node" onClick={handleOpenAddNodePopover}>
Add Node
</IAIButton>
<Tooltip label="Add New Node (Shift+A, Space)">
<IAIButton
size="sm"
aria-label="Add Node"
onClick={handleOpenAddNodePopover}
>
Add Node
</IAIButton>
</Tooltip>
</Panel>
);
};

View File

@ -290,7 +290,7 @@ export default function HotkeysModal({ children }: HotkeysModalProps) {
{
title: t('hotkeys.addNodes.title'),
desc: t('hotkeys.addNodes.desc'),
hotkey: 'Shift + A',
hotkey: 'Shift + A / Space',
},
];