feat(dify): 把本地控制台的中文与去外链改动入库
这些界面改动和专家服务草稿停在工作区,没有随上一笔主分支提交进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
9c7c80e194
commit
c2cb845a32
211 files changed
+3030
-2794
No files matched your search
@@ -3,6 +3,7 @@ import { cn } from '@langgenius/dify-ui/cn'
|
||||
import { Separator } from '@langgenius/dify-ui/separator'
|
||||
import { RiBookOpenLine, RiEqualizer2Line } from '@remixicon/react'
|
||||
import * as React from 'react'
|
||||
import { isOfficialDifyUrl } from '@/utils/official-link'
|
||||
|
||||
type HeaderProps = {
|
||||
isInPipeline?: boolean
|
||||
@@ -43,17 +44,19 @@ const Header = ({
|
||||
{!isInPipeline && <span className="system-xs-medium">{buttonText}</span>}
|
||||
</Button>
|
||||
</div>
|
||||
<a
|
||||
className="flex items-center gap-x-1 overflow-hidden system-xs-medium text-text-accent"
|
||||
href={docLink}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<RiBookOpenLine className="size-3.5 shrink-0" />
|
||||
<span className="grow truncate" title={docTitle}>
|
||||
{docTitle}
|
||||
</span>
|
||||
</a>
|
||||
{docLink && !isOfficialDifyUrl(docLink) && (
|
||||
<a
|
||||
className="flex items-center gap-x-1 overflow-hidden system-xs-medium text-text-accent"
|
||||
href={docLink}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<RiBookOpenLine className="size-3.5 shrink-0" />
|
||||
<span className="grow truncate" title={docTitle}>
|
||||
{docTitle}
|
||||
</span>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import { Button } from '@langgenius/dify-ui/button'
|
||||
import * as React from 'react'
|
||||
import { useCallback, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
import Input from './text-input'
|
||||
|
||||
const I18N_PREFIX = 'stepOne.website'
|
||||
@@ -16,7 +15,6 @@ type Props = Readonly<{
|
||||
|
||||
const UrlInput: FC<Props> = ({ isRunning, onRun }) => {
|
||||
const { t } = useTranslation(['datasetCreation'])
|
||||
const docLink = useDocLink()
|
||||
const [url, setUrl] = useState('')
|
||||
const handleUrlChange = useCallback((url: string | number) => {
|
||||
setUrl(url as string)
|
||||
@@ -28,7 +26,7 @@ const UrlInput: FC<Props> = ({ isRunning, onRun }) => {
|
||||
|
||||
return (
|
||||
<div className="flex items-center justify-between gap-x-2">
|
||||
<Input value={url} onChange={handleUrlChange} placeholder={docLink()} />
|
||||
<Input value={url} onChange={handleUrlChange} placeholder="https://example.com" />
|
||||
<Button variant="primary" onClick={handleOnRun} loading={isRunning}>
|
||||
{t(($) => $[`${I18N_PREFIX}.run`], { ns: 'datasetCreation' })}
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user