🆙 Added timestamp in Private Chat

This commit is contained in:
duckietm 2024-08-12 16:15:16 +02:00
parent b742d65ae5
commit 7e8f6254f9

View File

@ -58,10 +58,16 @@ export const FriendsMessengerThreadGroup: FC<{ thread: MessengerThread, group: M
</Base> </Base>
<Base className={ 'bg-light text-black border-radius mb-2 rounded py-1 px-2 messages-group-' + (isOwnChat ? 'right' : 'left') }> <Base className={ 'bg-light text-black border-radius mb-2 rounded py-1 px-2 messages-group-' + (isOwnChat ? 'right' : 'left') }>
<Base className="fw-bold"> <Base className="fw-bold">
<Base className="small text-muted">{ group.chats[0].date.toLocaleTimeString() }</Base>
{ isOwnChat && GetSessionDataManager().userName } { isOwnChat && GetSessionDataManager().userName }
{ !isOwnChat && (groupChatData ? groupChatData.username : thread.participant.name) } { !isOwnChat && (groupChatData ? groupChatData.username : thread.participant.name) }
</Base> </Base>
{ group.chats.map((chat, index) => <Base key={ index } className="text-break">{ chat.message }</Base>) } { group.chats.map((chat, index) => (
<Base key={ index } className="text-break">
{ chat.message }
</Base>
)) }
</Base> </Base>
{ isOwnChat && { isOwnChat &&
<Base shrink className="message-avatar"> <Base shrink className="message-avatar">
@ -69,4 +75,4 @@ export const FriendsMessengerThreadGroup: FC<{ thread: MessengerThread, group: M
</Base> } </Base> }
</Flex> </Flex>
); );
} }