import { Kbd, getOS } from '@labelu/components-react'; import { i18n } from '@labelu/i18n'; import { ReactComponent as MouseRightClick } from './assets/mouse-right.svg'; import { ReactComponent as MouseLeftClick } from './assets/mouse-left.svg'; const os = getOS(); export default [ { label: i18n.t('general'), key: 'common', hotkeys: [ { name: i18n.t('save'), content: os === 'MacOS' ? ( <> + S ) : ( <> Ctrl + S ), }, { name: i18n.t('skip'), content: os === 'MacOS' ? ( <> + Space ) : ( <> Ctrl + Space ), }, { name: i18n.t('undo'), content: os === 'MacOS' ? ( <> + Z ) : ( <> Ctrl + Z ), }, { name: i18n.t('redo'), content: os === 'MacOS' ? ( <> + + Z ) : ( <> Ctrl + Shift + Z ), }, { name: i18n.t('prevImage'), content: A, }, { name: i18n.t('nextImage'), content: D, }, { name: i18n.t('select9'), content: ( <> 1 ~ 9 ), }, ], }, { label: i18n.t('basicAction'), key: 'actions', hotkeys: [ { name: i18n.t('rotate'), content: R, }, { name: i18n.t('moveCanvas'), content: ( <> {i18n.t('longPress')} ), }, { name: i18n.t('selectLabel'), content: , }, { name: i18n.t('deleteLabel'), content: ( <> {i18n.t('selectLabelAndPress')} Del {i18n.t('or')} Backspace ), }, { name: i18n.t('editAttribute'), content: ( <> {os === 'MacOS' ? : Shift} + ), }, { name: i18n.t('prevLabel'), content: , }, { name: i18n.t('nextLabel'), content: , }, { name: i18n.t('cancel'), content: Esc, }, ], }, { label: i18n.t('tools'), key: 'tools', children: [ { label: i18n.t('plainPoint'), key: 'point', hotkeys: [ { name: i18n.t('point'), content: , }, { name: i18n.t('movePoint'), content: ( <> {i18n.t('selectPointAndLongPress')} {i18n.t('dragPoint')} ), }, ], }, { label: i18n.t('plainLine'), key: 'line', hotkeys: [ { name: i18n.t('line'), content: , }, { name: i18n.t('shiftLine'), content: ( <> Shift + ), }, { name: i18n.t('movePoint'), content: ( <> {i18n.t('selectPointAndLongPress')} {i18n.t('dragPoint')} ), }, { name: i18n.t('insertPoint'), content: ( <> {i18n.t('edgePress')} Alt, {i18n.t('thenClick')} ), }, { name: i18n.t('deletePoint'), content: ( <> {i18n.t('pointPress')} Alt, {i18n.t('thenClick')} ), }, ], }, { label: i18n.t('plainRect'), key: 'rect', hotkeys: [ { name: i18n.t('rect'), content: , }, { name: i18n.t('moveEdge'), content: ( <> {i18n.t('selectEdgeAndLongPress')} {i18n.t('dragEdge')} ), }, { name: i18n.t('movePoint'), content: ( <> {i18n.t('selectPointAndLongPress')} {i18n.t('dragPoint')} ), }, { name: i18n.t('cancel'), content: Esc, }, ], }, { label: i18n.t('plainPolygon'), key: 'polygon', hotkeys: [ { name: i18n.t('polygon'), content: , }, { name: i18n.t('moveEdge'), content: ( <> {i18n.t('selectEdgeAndLongPress')} {i18n.t('dragEdge')} ), }, { name: i18n.t('movePoint'), content: ( <> {i18n.t('selectPointAndLongPress')} {i18n.t('dragPoint')} ), }, { name: i18n.t('insertPoint'), content: ( <> {i18n.t('edgePress')} Alt, {i18n.t('thenClick')} ), }, { name: i18n.t('deletePoint'), content: ( <> {i18n.t('pointPress')} Alt, {i18n.t('thenClick')} ), }, { name: i18n.t('cropOverlap'), content: ( <> Alt + X ), }, { name: i18n.t('cancel'), content: Esc, }, ], }, { label: i18n.t('cuboid'), key: 'cuboid', hotkeys: [ { name: i18n.t('makeCuboid'), content: , }, { name: i18n.t('moveEdge'), content: ( <> {i18n.t('selectEdgeAndLongPress')} {i18n.t('dragEdge')} ), }, { name: i18n.t('movePoint'), content: ( <> {i18n.t('selectPointAndLongPress')} {i18n.t('dragPoint')} ), }, { name: i18n.t('cancel'), content: Esc, }, ], }, ], }, ];