From 48580cb5b02962c8f6b1186aea37c64664ea44ee Mon Sep 17 00:00:00 2001 From: jialin Date: Thu, 10 Apr 2025 17:28:24 +0800 Subject: [PATCH] feat: add api access info modal --- src/components/modal-footer/index.tsx | 19 +- src/config/hotkeys.ts | 2 - src/locales/en-US/models.ts | 11 +- src/locales/ja-JP/models.ts | 22 +- src/locales/ru-RU/models.ts | 21 +- src/locales/zh-CN/models.ts | 11 +- .../llmodels/components/api-access-info.tsx | 197 ++++++++++++++++++ src/pages/llmodels/components/table-list.tsx | 31 ++- src/pages/llmodels/config/button-actions.ts | 9 +- src/pages/llmodels/hooks/index.ts | 14 +- 10 files changed, 313 insertions(+), 24 deletions(-) create mode 100644 src/pages/llmodels/components/api-access-info.tsx diff --git a/src/components/modal-footer/index.tsx b/src/components/modal-footer/index.tsx index 55ff0301..ae561ad0 100644 --- a/src/components/modal-footer/index.tsx +++ b/src/components/modal-footer/index.tsx @@ -5,7 +5,7 @@ import styled from 'styled-components'; type ModalFooterProps = { onOk?: () => void; - onCancel: () => void; + onCancel?: () => void; cancelText?: string; okText?: string; htmlType?: 'button' | 'submit'; @@ -40,6 +40,7 @@ const ModalFooter: React.FC = ({ showOkBtn = true, description, extra, + showCancelBtn = true, form }) => { const intl = useIntl(); @@ -47,13 +48,15 @@ const ModalFooter: React.FC = ({
{description}
- + {showCancelBtn && ( + + )} {extra} {showOkBtn && (