From 3893ff1604cf41682413444671c595803619a8bd Mon Sep 17 00:00:00 2001 From: shel Date: Sat, 11 Feb 2017 16:47:01 -0500 Subject: [PATCH 1/3] Add privacy disclaimer Add variable for text of privacy disclaimer --- app/assets/javascripts/components/locales/en.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/components/locales/en.jsx b/app/assets/javascripts/components/locales/en.jsx index ac1c1a7d..d1357227 100644 --- a/app/assets/javascripts/components/locales/en.jsx +++ b/app/assets/javascripts/components/locales/en.jsx @@ -41,6 +41,7 @@ const en = { "compose_form.sensitive": "Mark media as sensitive", "compose_form.spoiler": "Hide text behind warning", "compose_form.private": "Mark as private", + "compose_form.privacy_disclaimer": "Warning: Private posts are not encrypted, and could be read or boosted by instances or people who do not respect post privacy. This is not true privacy. Do not post senstive information." "compose_form.unlisted": "Do not display in public timeline", "navigation_bar.edit_profile": "Edit profile", "navigation_bar.preferences": "Preferences", From 968fae26035e03304b620079271b2b65628fb7ef Mon Sep 17 00:00:00 2001 From: shel Date: Sat, 11 Feb 2017 17:42:19 -0500 Subject: [PATCH 2/3] Add privacy disclaimer I haven't had a chance to test this, because I don't currently have a fully functioning computer I can set up a dev-environment on, but this *should* make it so when a user toggles a post to be private, a disclaimer appears clarifying what "private" really means. --- .../features/compose/components/compose_form.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/assets/javascripts/components/features/compose/components/compose_form.jsx b/app/assets/javascripts/components/features/compose/components/compose_form.jsx index 46b62964..8019382c 100644 --- a/app/assets/javascripts/components/features/compose/components/compose_form.jsx +++ b/app/assets/javascripts/components/features/compose/components/compose_form.jsx @@ -175,6 +175,13 @@ const ComposeForm = React.createClass({ + + + + } + {({ opacity, height }) => From ec521e6bfc9d74cba363682665903638103babaa Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 13 Feb 2017 18:38:00 +0100 Subject: [PATCH 3/3] Add remote mentions warning when composing a private status --- .../compose/components/compose_form.jsx | 33 ++++++++++++------- .../containers/compose_form_container.jsx | 4 +++ .../javascripts/components/locales/en.jsx | 2 +- app/assets/stylesheets/components.scss | 15 +++++++++ 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/components/features/compose/components/compose_form.jsx b/app/assets/javascripts/components/features/compose/components/compose_form.jsx index 166c5fdc..9edc01ed 100644 --- a/app/assets/javascripts/components/features/compose/components/compose_form.jsx +++ b/app/assets/javascripts/components/features/compose/components/compose_form.jsx @@ -36,6 +36,8 @@ const ComposeForm = React.createClass({ in_reply_to: ImmutablePropTypes.map, media_count: React.PropTypes.number, me: React.PropTypes.number, + needsPrivacyWarning: React.PropTypes.bool, + mentionedDomains: React.PropTypes.array.isRequired, onChange: React.PropTypes.func.isRequired, onSubmit: React.PropTypes.func.isRequired, onCancelReply: React.PropTypes.func.isRequired, @@ -117,16 +119,29 @@ const ComposeForm = React.createClass({ }, render () { - const { intl } = this.props; - let replyArea = ''; - let publishText = ''; - const disabled = this.props.is_submitting || this.props.is_uploading; + const { intl, needsPrivacyWarning, mentionedDomains } = this.props; + const disabled = this.props.is_submitting || this.props.is_uploading; + + let replyArea = ''; + let publishText = ''; + let privacyWarning = ''; + let reply_to_other = !!this.props.in_reply_to && (this.props.in_reply_to.getIn(['account', 'id']) !== this.props.me); if (this.props.in_reply_to) { replyArea = ; } - let reply_to_other = !!this.props.in_reply_to && (this.props.in_reply_to.getIn(['account', 'id']) !== this.props.me); + if (needsPrivacyWarning) { + privacyWarning = ( +
+ {mentionedDomains.join(', ')}, domainsCount: mentionedDomains.length }} + /> +
+ ); + } if (this.props.private) { publishText = {intl.formatMessage(messages.publish)}; @@ -142,6 +157,7 @@ const ComposeForm = React.createClass({ + {privacyWarning} {replyArea} - - - - } -