import React from 'react';
import { defineMessages, injectIntl, useIntl } from 'react-intl';
import ModalSimple from '/imports/ui/components/common/modal/simple/component';
const intlMessages = defineMessages({
title: {
id: 'app.about.title',
description: 'About title label',
},
version: {
id: 'app.about.version',
description: 'Client version label',
},
copyright: {
id: 'app.about.copyright',
defaultMessage: (new Date().getFullYear()),
description: 'Client copyright label',
},
confirmLabel: {
id: 'app.about.confirmLabel',
description: 'Confirmation button label',
},
confirmDesc: {
id: 'app.about.confirmDesc',
description: 'adds descriptive context to confirmLabel',
},
dismissLabel: {
id: 'app.about.dismissLabel',
description: 'Dismiss button label',
},
dismissDesc: {
id: 'app.about.dismissDesc',
description: 'adds descriptive context to dissmissLabel',
},
version_label: {
id: 'app.about.version_label',
description: 'label for version bbb',
},
});
const AboutComponent = (props) => {
const {
settings, isOpen, onRequestClose, priority,
} = props;
const intl = useIntl();
const {
html5ClientBuild,
copyright,
bbbServerVersion,
displayBbbServerVersion,
} = settings;
const showLabelVersion = () => (
<>
{`${intl.formatMessage(intlMessages.version_label)} ${bbbServerVersion}`}
>
);
return (
{`${intl.formatMessage(intlMessages.copyright)} ${copyright}`}
{`${intl.formatMessage(intlMessages.version)} ${html5ClientBuild}`}
{displayBbbServerVersion ? showLabelVersion() : null}
);
};
export default injectIntl(AboutComponent);