bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/about/component.jsx

74 lines
1.8 KiB
React
Raw Normal View History

2017-10-06 20:50:01 +08:00
import React from 'react';
2016-12-08 23:40:11 +08:00
import { defineMessages, injectIntl } from 'react-intl';
2022-02-15 23:54:55 +08:00
import Modal 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
},
version_label: {
id: 'app.about.version_label',
description: 'label for version bbb',
},
2016-12-08 23:40:11 +08:00
});
const AboutComponent = ({ intl, settings }) => {
const {
html5ClientBuild,
copyright,
bbbServerVersion,
displayBbbServerVersion,
} = settings;
const showLabelVersion = () => (
<>
<br />
{`${intl.formatMessage(intlMessages.version_label)} ${bbbServerVersion}`}
</>
);
return (
<Modal
title={intl.formatMessage(intlMessages.title)}
dismiss={{
label: intl.formatMessage(intlMessages.dismissLabel),
description: intl.formatMessage(intlMessages.dismissDesc),
}}
>
{`${intl.formatMessage(intlMessages.copyright)} ${copyright}`}
<br />
{`${intl.formatMessage(intlMessages.version)} ${html5ClientBuild}`}
{displayBbbServerVersion ? showLabelVersion() : null}
</Modal>
);
};
2016-12-08 23:40:11 +08:00
export default injectIntl(AboutComponent);