2017-10-06 20:50:01 +08:00
|
|
|
import React from 'react';
|
2024-05-16 21:12:23 +08:00
|
|
|
import { defineMessages, injectIntl, useIntl } from 'react-intl';
|
2023-03-20 21:08:35 +08:00
|
|
|
import ModalSimple from '/imports/ui/components/common/modal/simple/component';
|
2016-12-08 23:40:11 +08:00
|
|
|
|
|
|
|
const intlMessages = defineMessages({
|
|
|
|
title: {
|
|
|
|
id: 'app.about.title',
|
2017-04-10 23:50:03 +08:00
|
|
|
description: 'About title label',
|
2016-12-08 23:40:11 +08:00
|
|
|
},
|
|
|
|
version: {
|
|
|
|
id: 'app.about.version',
|
2017-04-10 23:50:03 +08:00
|
|
|
description: 'Client version label',
|
2016-12-08 23:40:11 +08:00
|
|
|
},
|
|
|
|
copyright: {
|
|
|
|
id: 'app.about.copyright',
|
|
|
|
defaultMessage: (new Date().getFullYear()),
|
2017-04-10 23:50:03 +08:00
|
|
|
description: 'Client copyright label',
|
2016-12-08 23:40:11 +08:00
|
|
|
},
|
|
|
|
confirmLabel: {
|
|
|
|
id: 'app.about.confirmLabel',
|
2017-04-10 23:50:03 +08:00
|
|
|
description: 'Confirmation button label',
|
2016-12-08 23:40:11 +08:00
|
|
|
},
|
|
|
|
confirmDesc: {
|
|
|
|
id: 'app.about.confirmDesc',
|
2017-04-11 05:28:07 +08:00
|
|
|
description: 'adds descriptive context to confirmLabel',
|
2016-12-08 23:40:11 +08:00
|
|
|
},
|
|
|
|
dismissLabel: {
|
|
|
|
id: 'app.about.dismissLabel',
|
2017-04-10 23:50:03 +08:00
|
|
|
description: 'Dismiss button label',
|
2016-12-08 23:40:11 +08:00
|
|
|
},
|
|
|
|
dismissDesc: {
|
|
|
|
id: 'app.about.dismissDesc',
|
2017-04-11 05:28:07 +08:00
|
|
|
description: 'adds descriptive context to dissmissLabel',
|
2016-12-08 23:40:11 +08:00
|
|
|
},
|
2022-02-05 03:41:46 +08:00
|
|
|
version_label: {
|
|
|
|
id: 'app.about.version_label',
|
|
|
|
description: 'label for version bbb',
|
|
|
|
},
|
2016-12-08 23:40:11 +08:00
|
|
|
});
|
|
|
|
|
2023-03-21 21:00:46 +08:00
|
|
|
const AboutComponent = (props) => {
|
2024-05-16 21:12:23 +08:00
|
|
|
const {
|
|
|
|
settings, isOpen, onRequestClose, priority,
|
|
|
|
} = props;
|
|
|
|
const intl = useIntl();
|
2022-02-05 03:41:46 +08:00
|
|
|
const {
|
|
|
|
html5ClientBuild,
|
|
|
|
copyright,
|
|
|
|
bbbServerVersion,
|
|
|
|
displayBbbServerVersion,
|
|
|
|
} = settings;
|
|
|
|
|
|
|
|
const showLabelVersion = () => (
|
|
|
|
<>
|
|
|
|
<br />
|
|
|
|
{`${intl.formatMessage(intlMessages.version_label)} ${bbbServerVersion}`}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
|
|
|
|
return (
|
2023-03-20 21:08:35 +08:00
|
|
|
<ModalSimple
|
2022-08-18 19:46:31 +08:00
|
|
|
data-test="aboutModalTitleLabel"
|
2022-02-05 03:41:46 +08:00
|
|
|
title={intl.formatMessage(intlMessages.title)}
|
|
|
|
dismiss={{
|
|
|
|
label: intl.formatMessage(intlMessages.dismissLabel),
|
|
|
|
description: intl.formatMessage(intlMessages.dismissDesc),
|
|
|
|
}}
|
2023-04-12 23:51:23 +08:00
|
|
|
{...{
|
|
|
|
isOpen,
|
|
|
|
onRequestClose,
|
|
|
|
priority,
|
|
|
|
}}
|
2022-02-05 03:41:46 +08:00
|
|
|
>
|
|
|
|
{`${intl.formatMessage(intlMessages.copyright)} ${copyright}`}
|
|
|
|
<br />
|
|
|
|
{`${intl.formatMessage(intlMessages.version)} ${html5ClientBuild}`}
|
|
|
|
{displayBbbServerVersion ? showLabelVersion() : null}
|
|
|
|
|
2023-03-20 21:08:35 +08:00
|
|
|
</ModalSimple>
|
2022-02-05 03:41:46 +08:00
|
|
|
);
|
|
|
|
};
|
2016-12-08 23:40:11 +08:00
|
|
|
|
|
|
|
export default injectIntl(AboutComponent);
|