Skip to content

Commit 9b73d3f

Browse files
authored
fix: ui (#4979)
1 parent 7494ce8 commit 9b73d3f

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@
3838
},
3939
"lint-staged": {
4040
"./**/**/*.{ts,tsx,scss}": [
41-
"npm run format-code",
42-
"npm run lint:fix"
41+
"pnpm format-code"
4342
],
44-
"./docSite/**/**/*.md": "npm run format-doc && npm run gen:llms"
43+
"./**/**/*.{ts,tsx}": [
44+
"pnpm lint:fix"
45+
],
46+
"./docSite/**/**/*.md": "pnpm format-doc && pnpm gen:llms"
4547
},
4648
"resolutions": {
4749
"mdast-util-gfm-autolink-literal": "2.0.0"

projects/app/src/pageComponents/app/detail/Workflow/components/SaveButton.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, Button, Flex, useDisclosure } from '@chakra-ui/react';
1+
import { Box, Button, HStack, useDisclosure } from '@chakra-ui/react';
22
import MyPopover from '@fastgpt/web/components/common/MyPopover';
33
import React, { useState } from 'react';
44
import MyIcon from '@fastgpt/web/components/common/Icon';
@@ -59,9 +59,9 @@ const SaveButton = ({
5959
<Box p={1.5}>
6060
<MyBox
6161
display={'flex'}
62-
size={'md'}
63-
px={1}
64-
py={1.5}
62+
alignItems={'center'}
63+
gap={2}
64+
p={1.5}
6565
rounded={'4px'}
6666
_hover={{ color: 'primary.600', bg: 'rgba(17, 24, 36, 0.05)' }}
6767
cursor={'pointer'}
@@ -78,12 +78,11 @@ const SaveButton = ({
7878
setIsSave(false);
7979
}}
8080
>
81-
<MyIcon name={'core/workflow/upload'} w={'16px'} mr={2} />
81+
<MyIcon name={'core/workflow/upload'} w={'1rem'} />
8282
<Box fontSize={'sm'}>{t('common:core.workflow.Save to cloud')}</Box>
8383
</MyBox>
84-
<Flex
85-
px={1}
86-
py={1.5}
84+
<HStack
85+
p={1.5}
8786
rounded={'4px'}
8887
_hover={{ color: 'primary.600', bg: 'rgba(17, 24, 36, 0.05)' }}
8988
cursor={'pointer'}
@@ -96,7 +95,7 @@ const SaveButton = ({
9695
setIsSave(false);
9796
}}
9897
>
99-
<MyIcon name={'core/workflow/publish'} w={'16px'} mr={2} />
98+
<MyIcon name={'core/workflow/publish'} w={'1rem'} />
10099
<Box fontSize={'sm'}>{t('common:core.workflow.Save and publish')}</Box>
101100
{isSaveAndPublishModalOpen && (
102101
<SaveAndPublishModal
@@ -105,7 +104,7 @@ const SaveButton = ({
105104
onClickSave={onClickSave}
106105
/>
107106
)}
108-
</Flex>
107+
</HStack>
109108
</Box>
110109
)}
111110
</MyPopover>

projects/app/src/web/styles/chakraui.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ body select {
66
.chakra-tooltip {
77
font-size: var(--chakra-fontSizes-xs) !important;
88
}
9+
10+
.chakra-popover__popper > section {
11+
width: auto !important;
12+
}

0 commit comments

Comments
 (0)