From 9df1ef87c20380634c9ba2dff6f04725d7355c22 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 12 May 2019 21:55:44 +0200 Subject: Hide content-type dropdown by default --- .../glitch/features/compose/components/options.js | 32 ++++++++++++---------- .../compose/containers/options_container.js | 1 + .../glitch/features/local_settings/page/index.js | 8 ++++++ .../flavours/glitch/reducers/local_settings.js | 1 + 4 files changed, 28 insertions(+), 14 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/compose/components/options.js b/app/javascript/flavours/glitch/features/compose/components/options.js index 9bec36a7d..0c94f5514 100644 --- a/app/javascript/flavours/glitch/features/compose/components/options.js +++ b/app/javascript/flavours/glitch/features/compose/components/options.js @@ -140,6 +140,7 @@ class ComposerOptions extends ImmutablePureComponent { contentType: PropTypes.string, resetFileKey: PropTypes.number, spoiler: PropTypes.bool, + showContentTypeChoice: PropTypes.bool, }; // Handles file selection. @@ -197,6 +198,7 @@ class ComposerOptions extends ImmutablePureComponent { privacy, resetFileKey, spoiler, + showContentTypeChoice, } = this.props; // We predefine our privacy items so that we can easily pick the @@ -310,20 +312,22 @@ class ComposerOptions extends ImmutablePureComponent { title={intl.formatMessage(messages.change_privacy)} value={privacy} /> - + {showContentTypeChoice && ( + + )} {onToggleSpoiler && ( item.get('type') === 'video') : true), hasMedia: media && !!media.size, allowPoll: !(media && !!media.size), + showContentTypeChoice: state.getIn(['local_settings', 'show_content_type_choice']), }; }; diff --git a/app/javascript/flavours/glitch/features/local_settings/page/index.js b/app/javascript/flavours/glitch/features/local_settings/page/index.js index a13bffa3a..cd2d86713 100644 --- a/app/javascript/flavours/glitch/features/local_settings/page/index.js +++ b/app/javascript/flavours/glitch/features/local_settings/page/index.js @@ -151,6 +151,14 @@ export default class LocalSettingsPage extends React.PureComponent { > + + +