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
+2
-2
@@ -72,8 +72,8 @@ describe('Dataset API access', () => {
|
||||
await user.keyboard('{Enter}')
|
||||
expect(await screen.findByText('dataset.serviceApi.enabled')).toBeInTheDocument()
|
||||
expect(
|
||||
screen.getByRole('link', { name: 'appOverview.overview.apiInfo.doc' }),
|
||||
).toHaveAttribute('href', 'https://docs.dify.ai/api-reference/datasets')
|
||||
screen.queryByRole('link', { name: 'appOverview.overview.apiInfo.doc' }),
|
||||
).not.toBeInTheDocument()
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'
|
||||
import { workspacePermissionKeysAtom } from '@/context/permission-state'
|
||||
import { userProfileQueryOptions } from '@/features/account-profile/client'
|
||||
import { useDatasetApiAccessUrl } from '@/hooks/use-api-access-url'
|
||||
import { isOfficialDifyUrl } from '@/utils/official-link'
|
||||
import Link from '@/next/link'
|
||||
import { consoleQuery } from '@/service/console'
|
||||
import { getDatasetACLCapabilities } from '@/utils/permission'
|
||||
@@ -85,20 +86,22 @@ const Card = ({ apiEnabled }: CardProps) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="h-px bg-divider-subtle"></div>
|
||||
<div className="p-1">
|
||||
<Link
|
||||
href={apiReferenceUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex h-8 items-center space-x-1.75 rounded-lg px-2 text-text-tertiary hover:bg-state-base-hover"
|
||||
>
|
||||
<span className="i-ri-book-open-line size-3.5 shrink-0" />
|
||||
<div className="grow truncate system-sm-regular">
|
||||
{t(($) => $['overview.apiInfo.doc'], { ns: 'appOverview' })}
|
||||
</div>
|
||||
<span className="i-ri-arrow-right-up-line size-3.5 shrink-0" />
|
||||
</Link>
|
||||
</div>
|
||||
{apiReferenceUrl && !isOfficialDifyUrl(apiReferenceUrl) ? (
|
||||
<div className="p-1">
|
||||
<Link
|
||||
href={apiReferenceUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex h-8 items-center space-x-1.75 rounded-lg px-2 text-text-tertiary hover:bg-state-base-hover"
|
||||
>
|
||||
<span className="i-ri-book-open-line size-3.5 shrink-0" />
|
||||
<div className="grow truncate system-sm-regular">
|
||||
{t(($) => $['overview.apiInfo.doc'], { ns: 'appOverview' })}
|
||||
</div>
|
||||
<span className="i-ri-arrow-right-up-line size-3.5 shrink-0" />
|
||||
</Link>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user