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
@@ -52,8 +52,8 @@ describe('ServiceApi', () => {
|
||||
|
||||
expect(screen.getByText('https://api.example.com')).toBeInTheDocument()
|
||||
expect(
|
||||
screen.getByRole('link', { name: 'dataset.serviceApi.card.apiReference' }),
|
||||
).toHaveAttribute('href', 'https://docs.dify.ai/api-reference/datasets')
|
||||
screen.queryByRole('link', { name: 'dataset.serviceApi.card.apiReference' }),
|
||||
).not.toBeInTheDocument()
|
||||
await user.click(screen.getByRole('button', { name: 'dataset.serviceApi.card.apiKey' }))
|
||||
|
||||
const dialog = await screen.findByRole('dialog', { name: 'appApi.apiKeyModal.apiSecretKey' })
|
||||
|
||||
@@ -6,6 +6,7 @@ import { StatusDot } from '@langgenius/dify-ui/status-dot'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { CopyFeedback } from '@/app/components/base/copy-feedback'
|
||||
import { useDatasetApiAccessUrl } from '@/hooks/use-api-access-url'
|
||||
import { isOfficialDifyUrl } from '@/utils/official-link'
|
||||
import Link from '@/next/link'
|
||||
|
||||
type CardProps = {
|
||||
@@ -74,17 +75,19 @@ export function ServiceApiCard({ apiBaseUrl, apiReferenceUrl, canManageApiKey }:
|
||||
{t(($) => $['serviceApi.card.apiKey'], { ns: 'dataset' })}
|
||||
</span>
|
||||
</PopoverClose>
|
||||
<Link
|
||||
href={referenceUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={cn(buttonVariants({ variant: 'ghost', size: 'small' }), 'text-text-tertiary')}
|
||||
>
|
||||
<span aria-hidden className="i-ri-book-open-line size-3.5 shrink-0" />
|
||||
<span className="system-xs-medium">
|
||||
{t(($) => $['serviceApi.card.apiReference'], { ns: 'dataset' })}
|
||||
</span>
|
||||
</Link>
|
||||
{referenceUrl && !isOfficialDifyUrl(referenceUrl) ? (
|
||||
<Link
|
||||
href={referenceUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={cn(buttonVariants({ variant: 'ghost', size: 'small' }), 'text-text-tertiary')}
|
||||
>
|
||||
<span aria-hidden className="i-ri-book-open-line size-3.5 shrink-0" />
|
||||
<span className="system-xs-medium">
|
||||
{t(($) => $['serviceApi.card.apiReference'], { ns: 'dataset' })}
|
||||
</span>
|
||||
</Link>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user