diff --git a/app/javascript/gabsocial/components/popover/status_share_popover.js b/app/javascript/gabsocial/components/popover/status_share_popover.js index e8ba3ac0..1068858a 100644 --- a/app/javascript/gabsocial/components/popover/status_share_popover.js +++ b/app/javascript/gabsocial/components/popover/status_share_popover.js @@ -6,19 +6,14 @@ import { connect } from 'react-redux' import { defineMessages, injectIntl } from 'react-intl' import { openModal } from '../../actions/modal' import { closePopover } from '../../actions/popover' -import { - MODAL_EMBED, -} from '../../constants' import PopoverLayout from './popover_layout' +import Button from '../button' +import Heading from '../heading' +import Text from '../text' import List from '../list' class StatusSharePopover extends ImmutablePureComponent { - handleOnOpenEmbedModal = () => { - this.props.onOpenEmbedModal(this.props.status.get('url')) - this.props.onClosePopover() - } - handleCopy = () => { const url = this.props.status.get('url') const textarea = document.createElement('textarea') @@ -49,49 +44,105 @@ class StatusSharePopover extends ImmutablePureComponent { const mailToHref = !status ? undefined : `mailto:?subject=Gab&body=${status.get('url')}` return ( - - + +
+ + Share Gab + +
+
+
+
+ +
) } } const messages = defineMessages({ - embed: { id: 'status.embed', defaultMessage: 'Embed' }, email: { id: 'status.email', defaultMessage: 'Email this gab' }, copy: { id: 'status.copy', defaultMessage: 'Copy link to status' }, }) const mapDispatchToProps = (dispatch) => ({ - onOpenEmbedModal(url) { - dispatch(closePopover()) - dispatch(openModal(MODAL_EMBED, { - url, - })) - }, onClosePopover: () => dispatch(closePopover()), }) StatusSharePopover.propTypes = { intl: PropTypes.object.isRequired, - onOpenEmbedModal: PropTypes.func.isRequired, onClosePopover: PropTypes.func.isRequired, status: ImmutablePropTypes.map.isRequired, }