|
|
|
@ -1,7 +1,24 @@
|
|
|
|
|
import classNames from 'classnames';
|
|
|
|
|
import React = require('react');
|
|
|
|
|
import { ContactName } from '../../../ContactName';
|
|
|
|
|
import { PubKey } from '../../../../../session/types';
|
|
|
|
|
import styled from 'styled-components';
|
|
|
|
|
|
|
|
|
|
const StyledQuoteAuthor = styled.div<{ isIncoming: boolean }>`
|
|
|
|
|
color: ${props =>
|
|
|
|
|
props.isIncoming
|
|
|
|
|
? 'var(--message-bubbles-received-text-color)'
|
|
|
|
|
: 'var(--message-bubbles-sent-text-color)'};
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
line-height: 18px;
|
|
|
|
|
margin-bottom: 5px;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
.module-contact-name {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
type QuoteAuthorProps = {
|
|
|
|
|
author: string;
|
|
|
|
@ -16,12 +33,7 @@ export const QuoteAuthor = (props: QuoteAuthorProps) => {
|
|
|
|
|
const { authorProfileName, author, authorName, isFromMe, isIncoming } = props;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
className={classNames(
|
|
|
|
|
'module-quote__primary__author',
|
|
|
|
|
isIncoming ? 'module-quote__primary__author--incoming' : null
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
<StyledQuoteAuthor isIncoming={isIncoming}>
|
|
|
|
|
{isFromMe ? (
|
|
|
|
|
window.i18n('you')
|
|
|
|
|
) : (
|
|
|
|
@ -33,6 +45,6 @@ export const QuoteAuthor = (props: QuoteAuthorProps) => {
|
|
|
|
|
shouldShowPubkey={Boolean(props.showPubkeyForAuthor)}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</StyledQuoteAuthor>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|