When iOS device has been linked, use iOS color scheme

This commit is contained in:
Scott Nonnenberg 2018-08-13 17:06:50 -07:00
parent 0eb2c958a5
commit a247ffe5cf
12 changed files with 556 additions and 82 deletions

View file

@ -125,7 +125,7 @@ export class Quote extends React.Component<Props> {
}
public renderGenericFile() {
const { attachment } = this.props;
const { attachment, isIncoming } = this.props;
if (!attachment) {
return;
@ -144,7 +144,14 @@ export class Quote extends React.Component<Props> {
return (
<div className="module-quote__generic-file">
<div className="module-quote__generic-file__icon" />
<div className="module-quote__generic-file__text">{fileName}</div>
<div
className={classNames(
'module-quote__generic-file__text',
isIncoming ? 'module-quote__generic-file__text--incoming' : null
)}
>
{fileName}
</div>
</div>
);
}
@ -176,11 +183,17 @@ export class Quote extends React.Component<Props> {
}
public renderText() {
const { i18n, text, attachment } = this.props;
const { i18n, text, attachment, isIncoming } = this.props;
if (text) {
return (
<div dir="auto" className="module-quote__primary__text">
<div
dir="auto"
className={classNames(
'module-quote__primary__text',
isIncoming ? 'module-quote__primary__text--incoming' : null
)}
>
<MessageBody text={text} i18n={i18n} />
</div>
);
@ -195,7 +208,14 @@ export class Quote extends React.Component<Props> {
const typeLabel = getTypeLabel({ i18n, contentType, isVoiceMessage });
if (typeLabel) {
return (
<div className="module-quote__primary__type-label">{typeLabel}</div>
<div
className={classNames(
'module-quote__primary__type-label',
isIncoming ? 'module-quote__primary__type-label--incoming' : null
)}
>
{typeLabel}
</div>
);
}
@ -236,13 +256,15 @@ export class Quote extends React.Component<Props> {
authorColor,
i18n,
isFromMe,
isIncoming,
} = this.props;
return (
<div
className={classNames(
'module-quote__primary__author',
!isFromMe ? `module-quote__primary__author--${authorColor}` : null
!isFromMe ? `module-quote__primary__author--${authorColor}` : null,
isIncoming ? 'module-quote__primary__author--incoming' : null
)}
>
{isFromMe ? (