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
+1
-13
@@ -1,12 +1,9 @@
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { STEP_BY_STEP_TOUR_TARGETS } from '@/app/components/step-by-step-tour/target-registry'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
|
||||
export function Empty() {
|
||||
const { t } = useTranslation(['common'])
|
||||
const docLink = useDocLink()
|
||||
|
||||
return (
|
||||
return (
|
||||
<div
|
||||
className="mb-2 flex flex-col items-start gap-3 rounded-xl bg-background-section p-6"
|
||||
data-step-by-step-tour-target={STEP_BY_STEP_TOUR_TARGETS.integrationCustomEndpointEmpty}
|
||||
@@ -21,15 +18,6 @@ export function Empty() {
|
||||
<div className="system-xs-regular text-text-primary">
|
||||
{t(($) => $['apiBasedExtension.title'], { ns: 'common' })}
|
||||
</div>
|
||||
<a
|
||||
className="flex items-center gap-1 system-xs-regular text-text-accent"
|
||||
href={docLink('/use-dify/workspace/api-extension/api-extension')}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{t(($) => $['apiBasedExtension.link'], { ns: 'common' })}
|
||||
<span aria-hidden className="i-ri-external-link-line size-3" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
+2
-18
@@ -12,12 +12,11 @@ import {
|
||||
DialogHeaderCloseButton,
|
||||
DialogTitle,
|
||||
} from '@langgenius/dify-ui/dialog'
|
||||
import { Field, FieldDescription, FieldError, FieldLabel } from '@langgenius/dify-ui/field'
|
||||
import { Field, FieldError, FieldLabel } from '@langgenius/dify-ui/field'
|
||||
import { Form } from '@langgenius/dify-ui/form'
|
||||
import { Input } from '@langgenius/dify-ui/input'
|
||||
import { useMutation } from '@tanstack/react-query'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
import { consoleQuery } from '@/service/console'
|
||||
|
||||
type ApiBasedExtensionModalProps = {
|
||||
@@ -37,8 +36,7 @@ type ApiBasedExtensionModalProps = {
|
||||
export function ApiBasedExtensionModal(props: ApiBasedExtensionModalProps) {
|
||||
const { open, mode, onOpenChange, onSaved } = props
|
||||
const { t } = useTranslation(['common'])
|
||||
const docLink = useDocLink()
|
||||
const createApiBasedExtensionMutation = useMutation(
|
||||
const createApiBasedExtensionMutation = useMutation(
|
||||
consoleQuery.apiBasedExtension.post.mutationOptions(),
|
||||
)
|
||||
const updateApiBasedExtensionMutation = useMutation(
|
||||
@@ -127,20 +125,6 @@ export function ApiBasedExtensionModal(props: ApiBasedExtensionModalProps) {
|
||||
ns: 'common',
|
||||
})}
|
||||
/>
|
||||
<FieldDescription>
|
||||
<a
|
||||
href={docLink('/use-dify/workspace/api-extension/api-extension')}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex w-fit items-center text-text-accent focus-visible:ring-1 focus-visible:ring-components-input-border-active focus-visible:outline-hidden"
|
||||
>
|
||||
<span
|
||||
className="me-1 i-custom-vender-line-education-book-open-01 size-3"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{t(($) => $['apiBasedExtension.link'], { ns: 'common' })}
|
||||
</a>
|
||||
</FieldDescription>
|
||||
<FieldError match="valueMissing">
|
||||
{t(($) => $['errorMsg.fieldRequired'], { ns: 'common', field: apiEndpointLabel })}
|
||||
</FieldError>
|
||||
|
||||
Reference in new issue
Block a user