Fix/update broken doc links (#2187)

Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
Chenhe Gu
2024-01-26 15:20:03 +08:00
committed by GitHub
parent 20bd33fada
commit c9e65f4221
12 changed files with 40 additions and 15 deletions

View File

@@ -35,6 +35,7 @@ import FloatPopoverContainer from '@/app/components/base/float-popover-container
import DatasetDetailContext from '@/context/dataset-detail'
import { DataSourceType } from '@/models/datasets'
import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
import { LanguagesSupported, getModelRuntimeSupported } from '@/utils/language'
export type IAppDetailLayoutProps = {
children: React.ReactNode
@@ -104,6 +105,7 @@ type IExtraInfoProps = {
const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => {
const locale = getLocaleOnClient()
const language = getModelRuntimeSupported(locale)
const [isShowTips, { toggle: toggleTips, set: setShowTips }] = useBoolean(!isMobile)
const { t } = useTranslation()
@@ -147,7 +149,11 @@ const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => {
<div className='text-xs text-gray-500 mt-2'>{t('common.datasetMenus.emptyTip')}</div>
<a
className='inline-flex items-center text-xs text-primary-600 mt-2 cursor-pointer'
href={`https://docs.dify.ai/${locale === 'zh-Hans' ? 'v/zh-hans' : ''}/application/prompt-engineering`}
href={
language === LanguagesSupported[1]
? 'https://docs.dify.ai/v/zh-hans/guides/application-design/prompt-engineering'
: 'https://docs.dify.ai/user-guide/creating-dify-apps/prompt-engineering'
}
target='_blank'
>
<BookOpenIcon className='mr-1' />