Improve icons
This commit is contained in:
parent
f67e304a79
commit
c7da60325c
|
@ -105,6 +105,8 @@ export { FaSortAmountDownAlt as IconSortList } from 'react-icons/fa';
|
|||
export { LuNetwork as IconGenerateStructure } from 'react-icons/lu';
|
||||
export { LuBookCopy as IconInlineSynthesis } from 'react-icons/lu';
|
||||
export { LuWand2 as IconGenerateNames } from 'react-icons/lu';
|
||||
export { GrConnect as IconConnect } from 'react-icons/gr';
|
||||
export { BsPlay as IconExecute } from 'react-icons/bs';
|
||||
|
||||
// ======== Graph UI =======
|
||||
export { BiCollapse as IconGraphCollapse } from 'react-icons/bi';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
import { IconDestroy, IconEdit2, IconNewItem, IconRSForm } from '@/components/Icons';
|
||||
import { IconConnect, IconDestroy, IconEdit2, IconExecute, IconNewItem, IconRSForm } from '@/components/Icons';
|
||||
import Dropdown from '@/components/ui/Dropdown';
|
||||
import DropdownButton from '@/components/ui/DropdownButton';
|
||||
import useClickedOutside from '@/hooks/useClickedOutside';
|
||||
|
@ -63,11 +63,16 @@ function NodeContextMenu({ operation, cursorX, cursorY, onHide, onDelete, onCrea
|
|||
onCreateInput(operation.id);
|
||||
};
|
||||
|
||||
const handleRunSynthesis = () => {
|
||||
toast.error('Not implemented');
|
||||
handleHide();
|
||||
};
|
||||
|
||||
return (
|
||||
<div ref={ref} className='absolute' style={{ top: cursorY, left: cursorX, width: 10, height: 10 }}>
|
||||
<Dropdown isOpen={isOpen} stretchLeft={cursorX >= window.innerWidth - PARAMETER.ossContextMenuWidth}>
|
||||
<DropdownButton
|
||||
text='Свойства операции'
|
||||
text='Редактировать'
|
||||
titleHtml={prepareTooltip('Редактировать операцию', 'Ctrl + клик')}
|
||||
icon={<IconEdit2 size='1rem' className='icon-primary' />}
|
||||
disabled={controller.isProcessing}
|
||||
|
@ -92,15 +97,24 @@ function NodeContextMenu({ operation, cursorX, cursorY, onHide, onDelete, onCrea
|
|||
onClick={handleCreateSchema}
|
||||
/>
|
||||
) : null}
|
||||
{controller.isMutable && operation.operation_type === OperationType.INPUT ? (
|
||||
{controller.isMutable && !operation.result && operation.operation_type === OperationType.INPUT ? (
|
||||
<DropdownButton
|
||||
text='Привязать схему'
|
||||
text='Загрузить схему'
|
||||
title='Выбрать схему для загрузки'
|
||||
icon={<IconRSForm size='1rem' className='icon-primary' />}
|
||||
icon={<IconConnect size='1rem' className='icon-primary' />}
|
||||
disabled={controller.isProcessing}
|
||||
onClick={handleEditSchema}
|
||||
/>
|
||||
) : null}
|
||||
{controller.isMutable && !operation.result && operation.operation_type === OperationType.SYNTHESIS ? (
|
||||
<DropdownButton
|
||||
text='Выполнить синтез'
|
||||
title='Выполнить операцию и получить синтезированную КС'
|
||||
icon={<IconExecute size='1rem' className='icon-green' />}
|
||||
disabled={controller.isProcessing}
|
||||
onClick={handleRunSynthesis}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
<DropdownButton
|
||||
text='Удалить операцию'
|
||||
|
|
Loading…
Reference in New Issue
Block a user