This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2020-09-28 04:29:43 -07:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Icon from 'flavours/glitch/components/icon';
|
|
|
|
import { removePictureInPicture } from 'flavours/glitch/actions/picture_in_picture';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
|
|
|
|
class PictureInPicturePlaceholder extends React.PureComponent {
|
|
|
|
|
|
|
|
static propTypes = {
|
|
|
|
dispatch: PropTypes.func.isRequired,
|
|
|
|
};
|
|
|
|
|
|
|
|
handleClick = () => {
|
|
|
|
const { dispatch } = this.props;
|
|
|
|
dispatch(removePictureInPicture());
|
2023-02-03 11:52:07 -08:00
|
|
|
};
|
2020-09-28 04:29:43 -07:00
|
|
|
|
|
|
|
render () {
|
|
|
|
return (
|
2023-05-02 04:58:48 -07:00
|
|
|
<div className='picture-in-picture-placeholder' role='button' tabIndex={0} onClick={this.handleClick}>
|
2020-09-28 04:29:43 -07:00
|
|
|
<Icon id='window-restore' />
|
|
|
|
<FormattedMessage id='picture_in_picture.restore' defaultMessage='Put it back' />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2023-03-24 15:15:25 -07:00
|
|
|
|
|
|
|
export default connect()(PictureInPicturePlaceholder);
|