mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
chore: open in editor tooltip
This commit is contained in:
@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next'
|
||||
import { useStore as useAppStore } from '@/app/components/app/store'
|
||||
import FileTypeIcon from '@/app/components/base/file-uploader/file-type-icon'
|
||||
import Loading from '@/app/components/base/loading'
|
||||
import Tooltip from '@/app/components/base/tooltip'
|
||||
import SkillEditor from '@/app/components/workflow/skill/editor/skill-editor'
|
||||
import { useFileTypeInfo } from '@/app/components/workflow/skill/hooks/use-file-type-info'
|
||||
import { getFileIconType } from '@/app/components/workflow/skill/utils/file-utils'
|
||||
@ -101,18 +102,23 @@ const FilePreviewPanel = ({ resourceId, currentNode, className, style, onClose }
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleOpenInEditor}
|
||||
<Tooltip
|
||||
popupContent={t('skillEditor.openInSkillEditor', { ns: 'workflow' })}
|
||||
disabled={!canOpenInEditor}
|
||||
className={cn(
|
||||
'inline-flex size-6 items-center justify-center rounded-md text-text-tertiary transition hover:bg-state-base-hover',
|
||||
!canOpenInEditor && 'cursor-not-allowed opacity-40 hover:bg-transparent',
|
||||
)}
|
||||
aria-label={t('nodes.note.editor.openLink')}
|
||||
>
|
||||
<RiExternalLinkLine className="size-4" />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleOpenInEditor}
|
||||
disabled={!canOpenInEditor}
|
||||
className={cn(
|
||||
'inline-flex size-6 items-center justify-center rounded-md text-text-tertiary transition hover:bg-state-base-hover',
|
||||
!canOpenInEditor && 'cursor-not-allowed opacity-40 hover:bg-transparent',
|
||||
)}
|
||||
aria-label={t('skillEditor.openInSkillEditor', { ns: 'workflow' })}
|
||||
>
|
||||
<RiExternalLinkLine className="size-4" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onClose}
|
||||
|
||||
Reference in New Issue
Block a user