| | |
| | | <FloatingPortal root={containerElement}> |
| | | <div |
| | | className={cn( |
| | | 'nodrag nopan z-10 inline-flex w-max items-center rounded-md border-[0.5px] border-components-actionbar-border bg-components-actionbar-bg', |
| | | 'nodrag nopan inline-flex items-center w-max rounded-md border-[0.5px] border-components-actionbar-border bg-components-actionbar-bg z-10', |
| | | !linkOperatorShow && 'p-1 shadow-md', |
| | | linkOperatorShow && 'system-xs-medium p-0.5 text-text-tertiary shadow-sm', |
| | | linkOperatorShow && 'p-0.5 shadow-sm system-xs-medium text-text-tertiary', |
| | | )} |
| | | style={floatingStyles} |
| | | ref={refs.setFloating} |
| | |
| | | !linkOperatorShow && ( |
| | | <> |
| | | <input |
| | | className='mr-0.5 h-6 w-[196px] appearance-none rounded-sm bg-transparent p-1 text-[13px] text-components-input-text-filled outline-none' |
| | | className='mr-0.5 p-1 w-[196px] h-6 rounded-sm text-[13px] appearance-none outline-none bg-transparent text-components-input-text-filled' |
| | | value={url} |
| | | onChange={e => setUrl(e.target.value)} |
| | | placeholder={t('workflow.nodes.note.editor.enterUrl') || ''} |
| | |
| | | linkOperatorShow && ( |
| | | <> |
| | | <a |
| | | className='flex h-6 items-center rounded-md px-2 hover:bg-state-base-hover' |
| | | className='flex items-center px-2 h-6 rounded-md hover:bg-state-base-hover' |
| | | href={escape(url)} |
| | | target='_blank' |
| | | rel='noreferrer' |
| | | > |
| | | <RiExternalLinkLine className='mr-1 h-3 w-3' /> |
| | | <RiExternalLinkLine className='mr-1 w-3 h-3' /> |
| | | <div className='mr-1'> |
| | | {t('workflow.nodes.note.editor.openLink')} |
| | | </div> |
| | | <div |
| | | title={escape(url)} |
| | | className='max-w-[140px] truncate text-text-accent' |
| | | className='text-text-accent max-w-[140px] truncate' |
| | | > |
| | | {escape(url)} |
| | | </div> |
| | | </a> |
| | | <div className='mx-1 h-3.5 w-[1px] bg-divider-regular'></div> |
| | | <div className='mx-1 w-[1px] h-3.5 bg-divider-regular'></div> |
| | | <div |
| | | className='mr-0.5 flex h-6 cursor-pointer items-center rounded-md px-2 hover:bg-state-base-hover' |
| | | className='flex items-center mr-0.5 px-2 h-6 rounded-md cursor-pointer hover:bg-state-base-hover' |
| | | onClick={(e) => { |
| | | e.stopPropagation() |
| | | setLinkOperatorShow(false) |
| | | }} |
| | | > |
| | | <RiEditLine className='mr-1 h-3 w-3' /> |
| | | <RiEditLine className='mr-1 w-3 h-3' /> |
| | | {t('common.operation.edit')} |
| | | </div> |
| | | <div |
| | | className='flex h-6 cursor-pointer items-center rounded-md px-2 hover:bg-state-base-hover' |
| | | className='flex items-center px-2 h-6 rounded-md cursor-pointer hover:bg-state-base-hover' |
| | | onClick={handleUnlink} |
| | | > |
| | | <RiLinkUnlinkM className='mr-1 h-3 w-3' /> |
| | | <RiLinkUnlinkM className='mr-1 w-3 h-3' /> |
| | | {t('workflow.nodes.note.editor.unlink')} |
| | | </div> |
| | | </> |