mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-24 06:48:42 +03:00
3681 avatars are not appearing in the messages and people name should be bold (#3692)
* update font weight * fix picture not appearing
This commit is contained in:
parent
1838d8e6fb
commit
8b9d62e425
@ -24,6 +24,7 @@ const StyledAvatar = styled(Avatar)`
|
|||||||
|
|
||||||
const StyledSenderName = styled.span`
|
const StyledSenderName = styled.span`
|
||||||
font-size: ${({ theme }) => theme.font.size.sm};
|
font-size: ${({ theme }) => theme.font.size.sm};
|
||||||
|
font-weight: ${({ theme }) => theme.font.weight.medium};
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
`;
|
`;
|
||||||
@ -35,6 +36,10 @@ const StyledThreadMessageSentAt = styled.div`
|
|||||||
font-size: ${({ theme }) => theme.font.size.sm};
|
font-size: ${({ theme }) => theme.font.size.sm};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const StyledRecordChip = styled(RecordChip)`
|
||||||
|
font-weight: ${({ theme }) => theme.font.weight.medium};
|
||||||
|
`;
|
||||||
|
|
||||||
type EmailThreadMessageSenderProps = {
|
type EmailThreadMessageSenderProps = {
|
||||||
sender: EmailThreadMessageParticipant;
|
sender: EmailThreadMessageParticipant;
|
||||||
sentAt: string;
|
sentAt: string;
|
||||||
@ -57,7 +62,7 @@ export const EmailThreadMessageSender = ({
|
|||||||
<StyledEmailThreadMessageSender>
|
<StyledEmailThreadMessageSender>
|
||||||
<StyledEmailThreadMessageSenderUser>
|
<StyledEmailThreadMessageSenderUser>
|
||||||
{person ? (
|
{person ? (
|
||||||
<RecordChip
|
<StyledRecordChip
|
||||||
objectNameSingular={CoreObjectNameSingular.Person}
|
objectNameSingular={CoreObjectNameSingular.Person}
|
||||||
record={person}
|
record={person}
|
||||||
/>
|
/>
|
||||||
|
@ -52,10 +52,13 @@ export const getObjectRecordIdentifier = ({
|
|||||||
? 'squared'
|
? 'squared'
|
||||||
: 'rounded';
|
: 'rounded';
|
||||||
|
|
||||||
|
// TODO: This is a temporary solution before we seed imageIdentifierFieldMetadataId in the database
|
||||||
const avatarUrl =
|
const avatarUrl =
|
||||||
(objectMetadataItem.nameSingular === CoreObjectNameSingular.Company
|
(objectMetadataItem.nameSingular === CoreObjectNameSingular.Company
|
||||||
? getLogoUrlFromDomainName(record['domainName'] ?? '')
|
? getLogoUrlFromDomainName(record['domainName'] ?? '')
|
||||||
: imageIdentifierFieldValue) ?? '';
|
: objectMetadataItem.nameSingular === CoreObjectNameSingular.Person
|
||||||
|
? record['avatarUrl'] ?? ''
|
||||||
|
: imageIdentifierFieldValue) ?? '';
|
||||||
|
|
||||||
const basePathToShowPage = getBasePathToShowPage({
|
const basePathToShowPage = getBasePathToShowPage({
|
||||||
objectMetadataItem,
|
objectMetadataItem,
|
||||||
|
@ -9,12 +9,14 @@ export type RecordChipProps = {
|
|||||||
objectNameSingular: string;
|
objectNameSingular: string;
|
||||||
record: ObjectRecord;
|
record: ObjectRecord;
|
||||||
maxWidth?: number;
|
maxWidth?: number;
|
||||||
|
className?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const RecordChip = ({
|
export const RecordChip = ({
|
||||||
objectNameSingular,
|
objectNameSingular,
|
||||||
record,
|
record,
|
||||||
maxWidth,
|
maxWidth,
|
||||||
|
className,
|
||||||
}: RecordChipProps) => {
|
}: RecordChipProps) => {
|
||||||
const { objectMetadataItem } = useObjectMetadataItemOnly({
|
const { objectMetadataItem } = useObjectMetadataItemOnly({
|
||||||
objectNameSingular,
|
objectNameSingular,
|
||||||
@ -34,6 +36,7 @@ export const RecordChip = ({
|
|||||||
avatarUrl={objectRecordIdentifier.avatarUrl}
|
avatarUrl={objectRecordIdentifier.avatarUrl}
|
||||||
linkToEntity={objectRecordIdentifier.linkToShowPage}
|
linkToEntity={objectRecordIdentifier.linkToShowPage}
|
||||||
maxWidth={maxWidth}
|
maxWidth={maxWidth}
|
||||||
|
className={className}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user