diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-08-22 15:58:57 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-08-29 14:29:36 +0200 |
commit | 171e54eb469ac48830eba2349b3298c004ec19f5 (patch) | |
tree | ac71fec646a6faecd0297d38f2d586101a9a57ae /app/javascript/flavours/glitch/features/composer/options/index.js | |
parent | 1b479f08c56f2a4c291ccfffcb8e1217f0ca3686 (diff) |
Add opt-in feature to have the spoilers field always on (fixes #634)
Diffstat (limited to 'app/javascript/flavours/glitch/features/composer/options/index.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/composer/options/index.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/javascript/flavours/glitch/features/composer/options/index.js b/app/javascript/flavours/glitch/features/composer/options/index.js index c129622bc..05cbe24c9 100644 --- a/app/javascript/flavours/glitch/features/composer/options/index.js +++ b/app/javascript/flavours/glitch/features/composer/options/index.js @@ -285,13 +285,15 @@ export default class ComposerOptions extends React.PureComponent { title={intl.formatMessage(messages.change_privacy)} value={privacy} /> - <TextIconButton - active={spoiler} - ariaControls='glitch.composer.spoiler.input' - label='CW' - onClick={onToggleSpoiler} - title={intl.formatMessage(messages.spoiler)} - /> + {onToggleSpoiler && ( + <TextIconButton + active={spoiler} + ariaControls='glitch.composer.spoiler.input' + label='CW' + onClick={onToggleSpoiler} + title={intl.formatMessage(messages.spoiler)} + /> + )} <Dropdown active={advancedOptions && advancedOptions.some(value => !!value)} disabled={disabled} |