mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-26 21:22:48 +00:00
Some checks failed
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
* perf: init shell * fix: tool run select * border radius
28 lines
880 B
TypeScript
28 lines
880 B
TypeScript
import { Box, HStack, type StackProps } from '@chakra-ui/react';
|
|
import { type SourceMemberType } from '@fastgpt/global/support/user/type';
|
|
import React from 'react';
|
|
import Avatar from '../Avatar';
|
|
import { useTranslation } from 'next-i18next';
|
|
import Tag from '../Tag';
|
|
|
|
export type UserBoxProps = {
|
|
sourceMember: SourceMemberType;
|
|
avatarSize?: string;
|
|
} & StackProps;
|
|
|
|
function UserBox({ sourceMember, avatarSize = '1.25rem', ...props }: UserBoxProps) {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<HStack space="1" {...props}>
|
|
<Avatar src={sourceMember.avatar} w={avatarSize} borderRadius={'xs'} />
|
|
<Box maxW={'150px'} whiteSpace={'nowrap'} overflow={'hidden'}>
|
|
{sourceMember.name}
|
|
</Box>
|
|
{sourceMember.status === 'leave' && <Tag color="gray">{t('common:user_leaved')}</Tag>}
|
|
</HStack>
|
|
);
|
|
}
|
|
|
|
export default React.memo(UserBox);
|