Updae theme and fix some bug (#1711)

This commit is contained in:
Archer
2024-06-07 12:54:30 +08:00
committed by GitHub
parent 19c8a06d51
commit b20d075d35
153 changed files with 1587 additions and 1436 deletions

View File

@@ -9,6 +9,8 @@ import { Permission } from '@fastgpt/global/support/permission/controller';
const PermissionIconText = ({
permission,
defaultPermission,
w = '1rem',
fontSize = 'mini',
...props
}: {
permission?: `${PermissionTypeEnum}`;
@@ -25,9 +27,9 @@ const PermissionIconText = ({
}, [defaultPermission, permission]);
return PermissionTypeMap[per] ? (
<Flex alignItems={'center'} {...props}>
<MyIcon name={PermissionTypeMap[per]?.iconLight as any} w={'14px'} />
<Box ml={'2px'} lineHeight={1}>
<Flex alignItems={'center'} fontSize={fontSize} {...props}>
<MyIcon name={PermissionTypeMap[per]?.iconLight as any} w={w} />
<Box ml={'2px'} lineHeight={1} fontSize={'xs'}>
{t(PermissionTypeMap[per]?.label)}
</Box>
</Flex>

View File

@@ -93,13 +93,12 @@ export function AddMemberModal({ onClose }: AddModalPropsType) {
p="4"
minH="200px"
>
<InputGroup alignItems="center" h="32px" my="2" py="1">
<InputGroup alignItems="center" size="sm">
<InputLeftElement>
<MyIcon name="common/searchLight" w="16px" color={'myGray.500'} />
</InputLeftElement>
<Input
placeholder="搜索用户名"
fontSize="lg"
bgColor="myGray.50"
onChange={(e) => setSearchText(e.target.value)}
/>
@@ -128,7 +127,6 @@ export function AddMemberModal({ onClose }: AddModalPropsType) {
}}
>
<Checkbox
size="lg"
mr="3"
isChecked={selectedMemberIdList.includes(member.tmbId)}
onChange={onChange}
@@ -167,9 +165,7 @@ export function AddMemberModal({ onClose }: AddModalPropsType) {
_notLast={{ mb: 2 }}
>
<Avatar src={member.avatar} w="24px" />
<Box w="full" fontSize="lg">
{member.memberName}
</Box>
<Box w="full">{member.memberName}</Box>
<MyIcon
name="common/closeLight"
w="16px"
@@ -202,7 +198,7 @@ export function AddMemberModal({ onClose }: AddModalPropsType) {
h={'32px'}
>
{perLabel}
<ChevronDownIcon fontSize={'lg'} />
<ChevronDownIcon fontSize={'md'} />
</Flex>
}
onChange={(v) => setSelectedPermission(v)}

View File

@@ -64,10 +64,13 @@ function ManageModal({ onClose }: ManageModalProps) {
<Tr>
<Th border="none"></Th>
<Th border="none"></Th>
<Th border="none"></Th>
<Th border="none" w={'40px'}>
</Th>
</Tr>
</Thead>
<Tbody>
<Tr h={'10px'} />
{collaboratorList?.map((item) => {
return (
<Tr

View File

@@ -143,6 +143,7 @@ function PermissionSelect({
}
zIndex={99}
overflowY={'auto'}
whiteSpace={'pre-wrap'}
>
{/* The list of single select permissions */}
{permissionSelectList.singleCheckBoxList.map((item) => {
@@ -164,12 +165,14 @@ function PermissionSelect({
: {})}
{...MenuStyle}
onClick={change}
maxW={['70vw', '300px']}
maxW={['70vw', '260px']}
>
<Radio size="lg" isChecked={selectedSingleValue === item.value} />
<Radio isChecked={selectedSingleValue === item.value} />
<Box ml={4}>
<Box>{item.name}</Box>
<Box color={'myGray.500'}>{item.description}</Box>
<Box color={'myGray.500'} fontSize={'mini'}>
{item.description}
</Box>
</Box>
</Flex>
);

View File

@@ -34,7 +34,7 @@ function MemberManger() {
return (
<>
<Flex alignItems="center" flexDirection="row" justifyContent="space-between" w="full">
<Box></Box>
<Box fontSize={'sm'}></Box>
<Flex flexDirection="row" gap="2">
<Button
size="sm"