mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-20 02:34:52 +00:00
perf: add docs entries in the publish page (#2449)
This commit is contained in:
@@ -10,7 +10,8 @@ import {
|
|||||||
Th,
|
Th,
|
||||||
Td,
|
Td,
|
||||||
Tbody,
|
Tbody,
|
||||||
useDisclosure
|
useDisclosure,
|
||||||
|
Link
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||||
import { useLoading } from '@fastgpt/web/hooks/useLoading';
|
import { useLoading } from '@fastgpt/web/hooks/useLoading';
|
||||||
@@ -26,6 +27,7 @@ import dynamic from 'next/dynamic';
|
|||||||
import MyMenu from '@fastgpt/web/components/common/MyMenu';
|
import MyMenu from '@fastgpt/web/components/common/MyMenu';
|
||||||
import EmptyTip from '@fastgpt/web/components/common/EmptyTip';
|
import EmptyTip from '@fastgpt/web/components/common/EmptyTip';
|
||||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||||
|
import { getDocPath } from '@/web/common/system/doc';
|
||||||
|
|
||||||
const FeiShuEditModal = dynamic(() => import('./FeiShuEditModal'));
|
const FeiShuEditModal = dynamic(() => import('./FeiShuEditModal'));
|
||||||
const ShowShareLinkModal = dynamic(() => import('../components/showShareLinkModal'));
|
const ShowShareLinkModal = dynamic(() => import('../components/showShareLinkModal'));
|
||||||
@@ -64,9 +66,26 @@ const FeiShu = ({ appId }: { appId: string }) => {
|
|||||||
return (
|
return (
|
||||||
<Box position={'relative'} pt={3} px={5} minH={'50vh'}>
|
<Box position={'relative'} pt={3} px={5} minH={'50vh'}>
|
||||||
<Flex justifyContent={'space-between'} flexDirection="row">
|
<Flex justifyContent={'space-between'} flexDirection="row">
|
||||||
|
<Flex alignItems={'center'}>
|
||||||
<Box fontWeight={'bold'} fontSize={['md', 'lg']}>
|
<Box fontWeight={'bold'} fontSize={['md', 'lg']}>
|
||||||
{t('common:core.app.publish.Fei shu bot publish')}
|
{t('common:core.app.publish.Fei shu bot publish')}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
{feConfigs?.docUrl && (
|
||||||
|
<Link
|
||||||
|
href={feConfigs.openAPIDocUrl || getDocPath('/docs/course/feishu')}
|
||||||
|
target={'_blank'}
|
||||||
|
ml={2}
|
||||||
|
color={'primary.500'}
|
||||||
|
fontSize={'sm'}
|
||||||
|
>
|
||||||
|
<Flex alignItems={'center'}>
|
||||||
|
<MyIcon name="book" mr="1" />
|
||||||
|
{t('common:common.Read document')}
|
||||||
|
</Flex>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
</Flex>
|
||||||
<Button
|
<Button
|
||||||
variant={'primary'}
|
variant={'primary'}
|
||||||
colorScheme={'blue'}
|
colorScheme={'blue'}
|
||||||
|
@@ -10,7 +10,8 @@ import {
|
|||||||
Th,
|
Th,
|
||||||
Td,
|
Td,
|
||||||
Tbody,
|
Tbody,
|
||||||
useDisclosure
|
useDisclosure,
|
||||||
|
Link
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import MyIcon from '@fastgpt/web/components/common/Icon';
|
import MyIcon from '@fastgpt/web/components/common/Icon';
|
||||||
import { useLoading } from '@fastgpt/web/hooks/useLoading';
|
import { useLoading } from '@fastgpt/web/hooks/useLoading';
|
||||||
@@ -26,6 +27,7 @@ import dynamic from 'next/dynamic';
|
|||||||
import MyMenu from '@fastgpt/web/components/common/MyMenu';
|
import MyMenu from '@fastgpt/web/components/common/MyMenu';
|
||||||
import EmptyTip from '@fastgpt/web/components/common/EmptyTip';
|
import EmptyTip from '@fastgpt/web/components/common/EmptyTip';
|
||||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||||
|
import { getDocPath } from '@/web/common/system/doc';
|
||||||
|
|
||||||
const OffiAccountEditModal = dynamic(() => import('./OffiAccountEditModal'));
|
const OffiAccountEditModal = dynamic(() => import('./OffiAccountEditModal'));
|
||||||
const ShowShareLinkModal = dynamic(() => import('../components/showShareLinkModal'));
|
const ShowShareLinkModal = dynamic(() => import('../components/showShareLinkModal'));
|
||||||
@@ -65,9 +67,26 @@ const OffiAccount = ({ appId }: { appId: string }) => {
|
|||||||
return (
|
return (
|
||||||
<Box position={'relative'} pt={3} px={5} minH={'50vh'}>
|
<Box position={'relative'} pt={3} px={5} minH={'50vh'}>
|
||||||
<Flex justifyContent={'space-between'} flexDirection="row">
|
<Flex justifyContent={'space-between'} flexDirection="row">
|
||||||
|
<Flex alignItems={'center'}>
|
||||||
<Box fontWeight={'bold'} fontSize={['md', 'lg']}>
|
<Box fontWeight={'bold'} fontSize={['md', 'lg']}>
|
||||||
{t('publish:official_account.name')}
|
{t('publish:official_account.name')}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
{feConfigs?.docUrl && (
|
||||||
|
<Link
|
||||||
|
href={feConfigs.openAPIDocUrl || getDocPath('/docs/course/official_account')}
|
||||||
|
target={'_blank'}
|
||||||
|
ml={2}
|
||||||
|
color={'primary.500'}
|
||||||
|
fontSize={'sm'}
|
||||||
|
>
|
||||||
|
<Flex alignItems={'center'}>
|
||||||
|
<MyIcon name="book" mr="1" />
|
||||||
|
{t('common:common.Read document')}
|
||||||
|
</Flex>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
</Flex>
|
||||||
<Button
|
<Button
|
||||||
variant={'primary'}
|
variant={'primary'}
|
||||||
colorScheme={'blue'}
|
colorScheme={'blue'}
|
||||||
|
Reference in New Issue
Block a user