From 5cbb5e7d403653510822a7f59a17f577b92f4009 Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 1 Apr 2025 20:44:19 +0800 Subject: [PATCH] style: check compatibility --- src/components/alert-info/block.less | 10 ++++++ src/components/alert-info/block.tsx | 9 ++++-- src/components/copy-button/index.tsx | 4 ++- src/locales/en-US/models.ts | 7 +++-- src/locales/en-US/resources.ts | 3 +- src/locales/ja-JP/models.ts | 10 +++--- src/locales/ja-JP/resources.ts | 4 ++- src/locales/ru-RU/models.ts | 10 +++--- src/locales/ru-RU/resources.ts | 6 ++-- src/locales/zh-CN/models.ts | 7 +++-- src/locales/zh-CN/resources.ts | 3 +- .../llmodels/components/compatible-alert.tsx | 14 ++++++--- .../llmodels/components/deploy-modal.tsx | 6 +++- .../llmodels/components/hf-model-item.tsx | 26 ++-------------- .../components/incompatiable-info.tsx | 31 ++++++++++++------- src/pages/llmodels/config/types.ts | 2 +- src/pages/llmodels/hooks/index.ts | 4 ++- .../resources/components/model-files.tsx | 7 +++++ 18 files changed, 98 insertions(+), 65 deletions(-) diff --git a/src/components/alert-info/block.less b/src/components/alert-info/block.less index 7e57d71a..41795d20 100644 --- a/src/components/alert-info/block.less +++ b/src/components/alert-info/block.less @@ -21,6 +21,12 @@ background-color: var(--ant-color-warning-bg); } + &.transition { + color: var(--ant-geekblue-7); + background: var(--ant-geekblue-1); + border-color: var(--ant-geekblue-3); + } + .title { position: absolute; left: 0; @@ -38,6 +44,10 @@ &.warning { color: var(--ant-color-warning); } + + &.transition { + color: var(--ant-geekblue-7); + } } .text { diff --git a/src/components/alert-info/block.tsx b/src/components/alert-info/block.tsx index 04ac8988..8f486c8c 100644 --- a/src/components/alert-info/block.tsx +++ b/src/components/alert-info/block.tsx @@ -6,7 +6,7 @@ import styled from 'styled-components'; import OverlayScroller from '../overlay-scroller'; import './block.less'; interface AlertInfoProps { - type: 'danger' | 'warning'; + type: 'danger' | 'warning' | 'transition' | 'info'; message: React.ReactNode; rows?: number; icon?: React.ReactNode; @@ -38,7 +38,8 @@ const AlertInfo: React.FC = (props) => { ellipsis, style, title, - contentStyle + contentStyle, + icon } = props; return ( @@ -57,7 +58,9 @@ const AlertInfo: React.FC = (props) => { } >
- + + {icon ?? } +
{title && {title}} diff --git a/src/components/copy-button/index.tsx b/src/components/copy-button/index.tsx index 42672d55..36e9994b 100644 --- a/src/components/copy-button/index.tsx +++ b/src/components/copy-button/index.tsx @@ -11,6 +11,7 @@ type CopyButtonProps = { type?: 'text' | 'primary' | 'dashed' | 'link' | 'default'; size?: 'small' | 'middle' | 'large'; shape?: 'circle' | 'round' | 'default'; + tips?: string; placement?: | 'top' | 'left' @@ -25,6 +26,7 @@ type CopyButtonProps = { }; const CopyButton: React.FC = ({ + tips, text, disabled, type = 'text', @@ -68,7 +70,7 @@ const CopyButton: React.FC = ({ return (