diff --git a/app/soapbox/features/compose/components/compose_form.js b/app/soapbox/features/compose/components/compose_form.js index 0cb9eb98c..08c5e7ae6 100644 --- a/app/soapbox/features/compose/components/compose_form.js +++ b/app/soapbox/features/compose/components/compose_form.js @@ -36,6 +36,7 @@ const messages = defineMessages({ spoiler_placeholder: { id: 'compose_form.spoiler_placeholder', defaultMessage: 'Write your warning here' }, publish: { id: 'compose_form.publish', defaultMessage: 'Publish' }, publishLoud: { id: 'compose_form.publish_loud', defaultMessage: '{publish}!' }, + message: { id: 'compose_form.message', defaultMessage: 'Message' }, schedule: { id: 'compose_form.schedule', defaultMessage: 'Schedule' }, }); @@ -257,8 +258,20 @@ export default class ComposeForm extends ImmutablePureComponent { let publishText = ''; - if (this.props.privacy === 'private' || this.props.privacy === 'direct') { - publishText = {intl.formatMessage(messages.publish)}; + if (this.props.privacy === 'direct') { + publishText = ( + <> + + {intl.formatMessage(messages.message)} + + ); + } else if (this.props.privacy === 'private') { + publishText = ( + <> + + {intl.formatMessage(messages.publish)} + + ); } else { publishText = this.props.privacy !== 'unlisted' ? intl.formatMessage(messages.publishLoud, { publish: intl.formatMessage(messages.publish) }) : intl.formatMessage(messages.publish); } diff --git a/app/soapbox/features/ui/components/compose_modal.js b/app/soapbox/features/ui/components/compose_modal.js index 61d82a89b..9b24f9429 100644 --- a/app/soapbox/features/ui/components/compose_modal.js +++ b/app/soapbox/features/ui/components/compose_modal.js @@ -19,6 +19,7 @@ const mapStateToProps = state => { return { account: state.getIn(['accounts', me]), composeText: state.getIn(['compose', 'text']), + privacy: state.getIn(['compose', 'privacy']), }; }; @@ -29,6 +30,7 @@ class ComposeModal extends ImmutablePureComponent { intl: PropTypes.object.isRequired, onClose: PropTypes.func.isRequired, composeText: PropTypes.string, + privacy: PropTypes.string, dispatch: PropTypes.func.isRequired, }; @@ -48,13 +50,17 @@ class ComposeModal extends ImmutablePureComponent { }; render() { - const { intl } = this.props; + const { intl, privacy } = this.props; return (

- + {privacy === 'direct' ? ( + + ) : ( + + )}