2018-06-22 00:33:40 +08:00
|
|
|
import React from 'react';
|
2020-05-26 04:00:13 +08:00
|
|
|
import { injectIntl, defineMessages } from 'react-intl';
|
2019-06-05 01:43:58 +08:00
|
|
|
import PropTypes from 'prop-types';
|
2021-11-10 00:55:45 +08:00
|
|
|
import Styled from './styles';
|
|
|
|
import browserInfo from '/imports/utils/browserInfo';
|
2024-05-29 21:26:11 +08:00
|
|
|
import { getSettingsSingletonInstance } from '/imports/ui/services/settings';
|
2017-11-09 02:41:15 +08:00
|
|
|
|
2017-11-18 03:01:52 +08:00
|
|
|
const propTypes = {
|
2020-05-26 04:00:13 +08:00
|
|
|
intl: PropTypes.object.isRequired,
|
2019-06-05 01:43:58 +08:00
|
|
|
closeModal: PropTypes.func.isRequired,
|
2017-11-18 03:01:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
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',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2021-11-10 00:55:45 +08:00
|
|
|
const { isChrome, isFirefox, isSafari } = browserInfo;
|
|
|
|
|
2024-05-29 21:26:11 +08:00
|
|
|
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>
|
|
|
|
)
|
|
|
|
};
|
2017-11-18 03:01:52 +08:00
|
|
|
|
|
|
|
PermissionsOverlay.propTypes = propTypes;
|
|
|
|
|
|
|
|
export default injectIntl(PermissionsOverlay);
|