Streamlined system messages
This commit is contained in:
parent
1973224adb
commit
2b08cbfdfe
57 changed files with 864 additions and 937 deletions
|
@ -4,6 +4,7 @@
|
|||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { Button, ButtonSize, ButtonVariant } from '../Button';
|
||||
import { ContactName } from './ContactName';
|
||||
import { Intl } from '../Intl';
|
||||
import { LocalizerType } from '../../types/Util';
|
||||
|
@ -49,44 +50,51 @@ export const UnsupportedMessage = ({
|
|||
const stringId = isMe ? meStringId : otherStringId;
|
||||
|
||||
return (
|
||||
<div className="module-unsupported-message">
|
||||
<div
|
||||
className={classNames(
|
||||
'module-unsupported-message__icon',
|
||||
canProcessNow ? 'module-unsupported-message__icon--can-process' : null
|
||||
)}
|
||||
/>
|
||||
<div className="module-unsupported-message__text">
|
||||
<Intl
|
||||
id={stringId}
|
||||
components={[
|
||||
<span
|
||||
key="external-1"
|
||||
className="module-unsupported-message__contact"
|
||||
>
|
||||
<ContactName
|
||||
name={contact.name}
|
||||
profileName={contact.profileName}
|
||||
phoneNumber={contact.phoneNumber}
|
||||
title={contact.title}
|
||||
module="module-unsupported-message__contact"
|
||||
i18n={i18n}
|
||||
/>
|
||||
</span>,
|
||||
]}
|
||||
i18n={i18n}
|
||||
<div className="SystemMessage SystemMessage--multiline">
|
||||
<div className="SystemMessage__line SystemMessage__text">
|
||||
<div
|
||||
className={classNames(
|
||||
'SystemMessage__icon',
|
||||
'SystemMessage__icon--unsupported',
|
||||
{
|
||||
'SystemMessage__icon--unsupported--can-process': canProcessNow,
|
||||
}
|
||||
)}
|
||||
/>
|
||||
<span>
|
||||
<Intl
|
||||
id={stringId}
|
||||
components={[
|
||||
<span
|
||||
key="external-1"
|
||||
className="module-unsupported-message__contact"
|
||||
>
|
||||
<ContactName
|
||||
name={contact.name}
|
||||
profileName={contact.profileName}
|
||||
phoneNumber={contact.phoneNumber}
|
||||
title={contact.title}
|
||||
module="module-unsupported-message__contact"
|
||||
i18n={i18n}
|
||||
/>
|
||||
</span>,
|
||||
]}
|
||||
i18n={i18n}
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
{canProcessNow ? null : (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
downloadNewVersion();
|
||||
}}
|
||||
className="module-unsupported-message__button"
|
||||
>
|
||||
{i18n('Message--update-signal')}
|
||||
</button>
|
||||
<div className="SystemMessage__line">
|
||||
<Button
|
||||
onClick={() => {
|
||||
downloadNewVersion();
|
||||
}}
|
||||
size={ButtonSize.Small}
|
||||
variant={ButtonVariant.SystemMessage}
|
||||
>
|
||||
{i18n('Message--update-signal')}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue