diff --git a/packages/web/components/common/MyMenu/index.tsx b/packages/web/components/common/MyMenu/index.tsx index d7aa6309ef81..565a75d0be6c 100644 --- a/packages/web/components/common/MyMenu/index.tsx +++ b/packages/web/components/common/MyMenu/index.tsx @@ -23,7 +23,7 @@ export type Props = { trigger?: 'hover' | 'click'; iconSize?: string; iconRadius?: string; - menuItemStyles?: MenuItemProps; + placement?: PlacementWithLogical; menuList: { label?: string; @@ -34,6 +34,7 @@ export type Props = { label: string | React.ReactNode; description?: string; onClick?: () => any; + menuItemStyles?: MenuItemProps; }[]; }[]; }; @@ -46,15 +47,7 @@ const MyMenu = ({ Button, menuList, iconRadius, - placement = 'bottom-start', - menuItemStyles = { - borderRadius: 'sm', - py: 2, - px: 3, - display: 'flex', - alignItems: 'center', - fontSize: 'sm' - } + placement = 'bottom-start' }: Props) => { const typeMapStyle: Record = { primary: { @@ -167,7 +160,7 @@ const MyMenu = ({ {item.children.map((child, index) => ( { e.stopPropagation(); if (child.onClick) { @@ -175,10 +168,15 @@ const MyMenu = ({ child.onClick(); } }} + py={2} + px={3} + alignItems={'center'} + fontSize={'sm'} color={child.isActive ? 'primary.700' : 'myGray.600'} whiteSpace={'pre-wrap'} _notLast={{ mb: 0.5 }} {...typeMapStyle[child.type || 'primary']} + {...child.menuItemStyles} > {!!child.icon && ( void; closeOnOverlayClick?: boolean; + size?: 'md' | 'lg'; } const MyModal = ({ @@ -35,6 +36,7 @@ const MyModal = ({ maxW = ['90vw', '600px'], closeOnOverlayClick = true, iconColor, + size = 'md', ...props }: MyModalProps) => { const { isPc } = useSystem(); @@ -43,6 +45,7 @@ const MyModal = ({ onClose && onClose()} + size={size} autoFocus={false} isCentered={isPc ? isCentered : true} blockScrollOnMount={false} diff --git a/packages/web/styles/theme.ts b/packages/web/styles/theme.ts index ff5b58f61175..e07a7cadd3a4 100644 --- a/packages/web/styles/theme.ts +++ b/packages/web/styles/theme.ts @@ -470,15 +470,29 @@ const Checkbox = checkBoxMultiStyle({ }); const Modal = modalMultiStyle({ - baseStyle: modalPart({ - body: { - py: 4, - px: 7 - }, - footer: { - pt: 2 - } - }) + sizes: { + md: modalPart({ + body: { + py: 4, + px: 7 + }, + footer: { + pt: 2 + } + }), + lg: modalPart({ + body: { + pt: 8, + pb: 6, + px: '3.25rem' + }, + footer: { + pb: 8, + px: '3.25rem', + pt: 0 + } + }) + } }); const Table = tableMultiStyle({ diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/AppCard.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/AppCard.tsx index 3a345db8d00f..d1c19cb5d4ec 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/AppCard.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/AppCard.tsx @@ -74,7 +74,11 @@ const AppCard = ({ label: ExportPopover({ chatConfig: appDetail.chatConfig, appName: appDetail.name - }) + }), + menuItemStyles: { + p: 0, + cursor: 'default' + } } ] } @@ -213,12 +217,12 @@ function ExportPopover({ return ( + {t('app:export_configs')} @@ -232,7 +236,8 @@ function ExportPopover({ color={'myGray.600'} _hover={{ bg: 'myGray.05', - color: 'primary.600' + color: 'primary.600', + cursor: 'pointer' }} borderRadius={'xs'} onClick={onExportWorkflow} @@ -246,7 +251,8 @@ function ExportPopover({ color={'myGray.600'} _hover={{ bg: 'myGray.05', - color: 'primary.600' + color: 'primary.600', + cursor: 'pointer' }} borderRadius={'xs'} onClick={() => { diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/ImportSettings.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/ImportSettings.tsx index 72bb482178ea..d0df23eeca2f 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/ImportSettings.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/ImportSettings.tsx @@ -73,7 +73,6 @@ const ImportSettings = ({ onClose }: Props) => { return ( @@ -81,15 +80,16 @@ const ImportSettings = ({ onClose }: Props) => { {appT('import_configs')} } + size={isPc ? 'lg' : 'md'} > - + {isDragging ? ( { ) : ( - + {t('common:common.json_config')} @@ -141,36 +141,36 @@ const ImportSettings = ({ onClose }: Props) => { onChange={(e) => setValue(e.target.value)} /> - - - )} + + + ); }; diff --git a/projects/app/src/pages/dataset/detail/components/InputDataModal.tsx b/projects/app/src/pages/dataset/detail/components/InputDataModal.tsx index 7ea9ccacc38d..718c2906d942 100644 --- a/projects/app/src/pages/dataset/detail/components/InputDataModal.tsx +++ b/projects/app/src/pages/dataset/detail/components/InputDataModal.tsx @@ -353,7 +353,7 @@ const InputTab = ({ return ( <> - + * @@ -435,7 +435,7 @@ const DataIndex = ({ return ( <> - +