From 301c185878c30edfeaac40d9e7ebbd23b9acbed3 Mon Sep 17 00:00:00 2001 From: Surinna Curtis Date: Sun, 2 Jul 2017 23:34:14 -0500 Subject: [PATCH] =?UTF-8?q?highlight=20=E2=80=A6=20button=20if=20any=20opt?= =?UTF-8?q?ions=20enabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compose/components/advanced_options_dropdown.js | 6 ++++-- app/javascript/styles/components.scss | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js b/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js index da2d37767..129f7803d 100644 --- a/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js +++ b/app/javascript/mastodon/features/compose/components/advanced_options_dropdown.js @@ -71,6 +71,8 @@ export default class AdvancedOptionsDropdown extends React.PureComponent { const options = [ { icon: 'wifi', shortText: messages.local_only_short, longText: messages.local_only_long, key: 'do_not_federate' }, ]; + + const anyEnabled = values.some((enabled) => enabled); const optionElems = options.map((option) => { const active = values.get(option.key) ? 'active' : ''; return ( @@ -86,11 +88,11 @@ export default class AdvancedOptionsDropdown extends React.PureComponent { ); }); - return
+ return
diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index c9d5a2841..fcab01b01 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -2941,7 +2941,9 @@ button.icon-button.active i.fa-retweet { border-radius: 4px 4px 0 0; box-shadow: 0 -4px 4px rgba($base-shadow-color, 0.1); } +} +.advanced-options-dropdown.open { .advanced-options-dropdown__dropdown { display: block; box-shadow: 2px 4px 6px rgba($base-shadow-color, 0.1);