mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 17:41:33 +03:00
chat: support hideAvatars and hideNicknames
This commit is contained in:
parent
c7f5220d18
commit
dd57147189
@ -15,7 +15,9 @@ export const ChatMessage = (props) => {
|
|||||||
group,
|
group,
|
||||||
association,
|
association,
|
||||||
contacts,
|
contacts,
|
||||||
unreadRef
|
unreadRef,
|
||||||
|
hideAvatars,
|
||||||
|
hideNicknames
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
// Render sigil if previous message is not by the same sender
|
// Render sigil if previous message is not by the same sender
|
||||||
@ -42,6 +44,8 @@ export const ChatMessage = (props) => {
|
|||||||
group={group}
|
group={group}
|
||||||
contacts={contacts}
|
contacts={contacts}
|
||||||
association={association}
|
association={association}
|
||||||
|
hideNicknames={hideNicknames}
|
||||||
|
hideAvatars={hideAvatars}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -180,7 +180,10 @@ export class ChatWindow extends Component {
|
|||||||
nextMsg={messages[i + 1]}
|
nextMsg={messages[i + 1]}
|
||||||
association={props.association}
|
association={props.association}
|
||||||
group={props.group}
|
group={props.group}
|
||||||
contacts={props.contacts} />
|
contacts={props.contacts}
|
||||||
|
hideAvatars={props.hideAvatars}
|
||||||
|
hideNicknames={props.hideNicknames}
|
||||||
|
/>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</ChatScrollContainer>
|
</ChatScrollContainer>
|
||||||
|
@ -51,7 +51,7 @@ const renderWithSigil = (props, timestamp) => {
|
|||||||
let color = '#000000';
|
let color = '#000000';
|
||||||
let sigilClass = 'mix-blend-diff';
|
let sigilClass = 'mix-blend-diff';
|
||||||
if (contact) {
|
if (contact) {
|
||||||
name = (contact.nickname.length > 0 && !hideNicknames)
|
name = (contact.nickname.length > 0 && !props.hideNicknames)
|
||||||
? contact.nickname : `~${props.msg.author}`;
|
? contact.nickname : `~${props.msg.author}`;
|
||||||
color = `#${uxToHex(contact.color)}`;
|
color = `#${uxToHex(contact.color)}`;
|
||||||
sigilClass = '';
|
sigilClass = '';
|
||||||
@ -70,7 +70,7 @@ const renderWithSigil = (props, timestamp) => {
|
|||||||
sigilClass={sigilClass}
|
sigilClass={sigilClass}
|
||||||
association={props.association}
|
association={props.association}
|
||||||
group={props.group}
|
group={props.group}
|
||||||
hideAvatars={hideAvatars}
|
hideAvatars={props.hideAvatars}
|
||||||
className="fl pr3 v-top bg-white bg-gray0-d"
|
className="fl pr3 v-top bg-white bg-gray0-d"
|
||||||
/>
|
/>
|
||||||
<div className="fr clamp-message white-d"
|
<div className="fr clamp-message white-d"
|
||||||
|
Loading…
Reference in New Issue
Block a user