about summary refs log tree commit diff
diff options
context:
space:
mode:
authorshel <Yiskah.Raphen@gmail.com>2017-02-11 17:42:19 -0500
committerGitHub <noreply@github.com>2017-02-11 17:42:19 -0500
commit968fae26035e03304b620079271b2b65628fb7ef (patch)
tree5af574180e5d94552c3e72d6c87d2d8d67061c5d
parent3893ff1604cf41682413444671c595803619a8bd (diff)
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.
-rw-r--r--app/assets/javascripts/components/features/compose/components/compose_form.jsx7
1 files changed, 7 insertions, 0 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 46b62964a..8019382cd 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({
           <Toggle checked={this.props.private} onChange={this.handleChangeVisibility} />
           <span className='compose-form__label__text'><FormattedMessage id='compose_form.private' defaultMessage='Mark as private' /></span>
         </label>
+       
+        <Motion defaultStyle={{ opacity: 0, height: 0 }}, style={{ opacity: spring((this.props.private || reply_to_other) ? 0 : 100), height: spring((this.props.private || reply_to_other) ? 0 : 39.5) }}>
+            <label className='compose-form__label' style={{ height: `${height}px`, overflow: 'hidden', opacity: opacity / 100 }}>
+              <span className='compose-form__label__text'><FormattedMessage id='compose_form.privacy_disclaimer' defaultMessage='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.' /></span>
+            </label>
+          }
+        </Motion>
 
         <Motion defaultStyle={{ opacity: (this.props.private || reply_to_other) ? 0 : 100, height: (this.props.private || reply_to_other) ? 39.5 : 0 }} style={{ opacity: spring((this.props.private || reply_to_other) ? 0 : 100), height: spring((this.props.private || reply_to_other) ? 0 : 39.5) }}>
           {({ opacity, height }) =>