bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/audio/permissions-overlay/component.jsx

53 lines
1.4 KiB
React
Raw Normal View History

2018-06-22 00:33:40 +08:00
import React from 'react';
import { injectIntl, defineMessages } from 'react-intl';
import PropTypes from 'prop-types';
import Styled from './styles';
import browserInfo from '/imports/utils/browserInfo';
import { getSettingsSingletonInstance } from '/imports/ui/services/settings';
2017-11-09 02:41:15 +08:00
const propTypes = {
intl: PropTypes.object.isRequired,
closeModal: PropTypes.func.isRequired,
};
const intlMessages = defineMessages({
title: {
id: 'app.audio.permissionsOverlay.title',
description: 'Title for the overlay',
},
hint: {
id: 'app.audio.permissionsOverlay.hint',
description: 'Hint for the overlay',
},
});
const { isChrome, isFirefox, isSafari } = browserInfo;
const PermissionsOverlay = ({ intl, closeModal }) => {
const Settings = getSettingsSingletonInstance();
const { animations } = Settings.application;
return (
<Styled.PermissionsOverlayModal
overlayClassName={"permissionsOverlay"}
onRequestClose={closeModal}
hideBorder
isFirefox={isFirefox}
isChrome={isChrome}
isSafari={isSafari}
animations={animations}
>
<Styled.Content>
{intl.formatMessage(intlMessages.title)}
<small>
{intl.formatMessage(intlMessages.hint)}
</small>
</Styled.Content>
</Styled.PermissionsOverlayModal>
)
};
PermissionsOverlay.propTypes = propTypes;
export default injectIntl(PermissionsOverlay);