mirror of
https://github.com/langgenius/dify.git
synced 2026-05-10 05:56:31 +08:00
chore: open in editor tooltip
This commit is contained in:
parent
733c8a0d76
commit
befefb04b4
@ -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}
|
||||
|
||||
@ -1110,6 +1110,7 @@
|
||||
"skill.startTab.useThisSkill": "Use this Skill",
|
||||
"skillEditor.authorizationBadge": "Auth",
|
||||
"skillEditor.authorizationRequired": "Authorization required before use.",
|
||||
"skillEditor.openInSkillEditor": "Open in Skill Editor",
|
||||
"skillEditor.previewUnavailable": "Preview unavailable",
|
||||
"skillEditor.referenceFiles": "Reference files",
|
||||
"skillEditor.unsupportedPreview": "This file type is not supported for preview",
|
||||
|
||||
@ -1102,6 +1102,7 @@
|
||||
"skill.startTab.useThisSkill": "使用此 Skill",
|
||||
"skillEditor.authorizationBadge": "Auth",
|
||||
"skillEditor.authorizationRequired": "使用前需要授权。",
|
||||
"skillEditor.openInSkillEditor": "在技能编辑器中打开",
|
||||
"skillEditor.previewUnavailable": "无法预览",
|
||||
"skillEditor.referenceFiles": "引用文件",
|
||||
"skillEditor.unsupportedPreview": "该文件类型不支持预览",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user