mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
smaller images in chat
This commit is contained in:
parent
ca208dfc39
commit
6884dccd6e
2 changed files with 3 additions and 2 deletions
|
@ -517,6 +517,7 @@ export default class Chat extends React.Component {
|
|||
{this.renderLoadMore()}
|
||||
{selectedMsgs.reduce((acc, currMessage, i) => {
|
||||
const { date, sender, unread } = currMessage
|
||||
const msgStyle = sender === user ? styles.ownMsg : styles.partnerMsg
|
||||
const timeString = new Date(date).toLocaleString()
|
||||
if (prevMsg && prevMsg.unread === 0 && unread === 1) {
|
||||
if (sender === selectedUser) {
|
||||
|
@ -530,7 +531,7 @@ export default class Chat extends React.Component {
|
|||
key={i}
|
||||
title={timeString}
|
||||
className={`${styles.messageContainer} ${
|
||||
sender === user ? styles.ownMsg : styles.partnerMsg
|
||||
currMessage.type !== 'img' ? msgStyle : ''
|
||||
}`}
|
||||
>
|
||||
{this.renderMsg(currMessage, i)}
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
}
|
||||
|
||||
.messageContainer img {
|
||||
max-width: 100%;
|
||||
max-width: 150px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 5px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue