You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

backend-service-api.tsx 829B

1234567891011121314151617181920212223242526272829303132333435
  1. import { Button, Card, Flex, Space, Typography } from 'antd';
  2. import { useTranslate } from '@/hooks/common-hooks';
  3. import styles from './index.less';
  4. const { Paragraph } = Typography;
  5. const BackendServiceApi = ({ show }: { show(): void }) => {
  6. const { t } = useTranslate('chat');
  7. return (
  8. <Card
  9. title={
  10. <Space size={'large'}>
  11. <span>RAGFlow API</span>
  12. <Button onClick={show} type="primary">
  13. {t('apiKey')}
  14. </Button>
  15. </Space>
  16. }
  17. >
  18. <Flex gap={8} align="center">
  19. <b>{t('backendServiceApi')}</b>
  20. <Paragraph
  21. copyable={{ text: `${location.origin}` }}
  22. className={styles.apiLinkText}
  23. >
  24. {location.origin}
  25. </Paragraph>
  26. </Flex>
  27. </Card>
  28. );
  29. };
  30. export default BackendServiceApi;