diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-07-12 13:13:05 +0200 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-09-08 03:37:07 -0500 |
commit | 2d0e20ed990be8e6f537b2b19650a18cad7503c6 (patch) | |
tree | 769c6d6b5b1e76c562fddae221abd05f15d7551b /app/javascript/flavours/glitch/features/compose/containers | |
parent | aff777343055b5b15fb757fda22912dc0fcd2c87 (diff) |
[Port: glitch-soc@b8b6f1d] Change secondary and primary toot button color when it may reduce privacy
Co-authored-by: Fire Demon <firedemon@creature.cafe>
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/containers')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js b/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js index 3c641d7ec..cf953ec3d 100644 --- a/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js +++ b/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js @@ -19,7 +19,7 @@ import { } from 'flavours/glitch/actions/modal'; import { changeLocalSetting } from 'flavours/glitch/actions/local_settings'; -import { privacyPreference } from 'flavours/glitch/util/privacy_preference'; +import { privacyPreference, order as privacyOrder } from 'flavours/glitch/util/privacy_preference'; const messages = defineMessages({ missingDescriptionMessage: { id: 'confirmations.missing_media_description.message', @@ -58,7 +58,9 @@ function mapStateToProps (state) { media: state.getIn(['compose', 'media_attachments']), preselectDate: state.getIn(['compose', 'preselectDate']), privacy: state.getIn(['compose', 'privacy']), + privacyWarning: replyPrivacy && privacyOrder.indexOf(state.getIn(['compose', 'privacy'])) < privacyOrder.indexOf(replyPrivacy), sideArm: sideArmPrivacy, + sideArmWarning: sideArmPrivacy && sideArmRestrictedPrivacy && privacyOrder.indexOf(sideArmPrivacy) < privacyOrder.indexOf(sideArmRestrictedPrivacy), sensitive: state.getIn(['compose', 'sensitive']), showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']), spoiler: spoilersAlwaysOn || state.getIn(['compose', 'spoiler']), |