diff options
author | Spencer Alves <impiaaa@gmail.com> | 2018-09-29 16:44:02 -0700 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-09-30 08:31:50 +0200 |
commit | 4e60a0d5433f5dfa4f71a452cc5c6ceb0f21ceab (patch) | |
tree | 1316be5ae22312e4ad5f21ee0a0f8b09e2b38a1b /app/javascript | |
parent | c065717b6765435e7374975ae9d71ebaa224f92c (diff) |
Add option to hide action bar in collapsed toots
Diffstat (limited to 'app/javascript')
4 files changed, 15 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 4d47660c2..665aa457a 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -566,7 +566,7 @@ export default class Status extends ImmutablePureComponent { parseClick={parseClick} disabled={!router} /> - {!isCollapsed || !muted ? ( + {!isCollapsed || !(muted || !settings.getIn(['collapsed', 'show_action_bar'])) ? ( <StatusActionBar {...other} status={status} 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 5b4e0cb01..ece80c4da 100644 --- a/app/javascript/flavours/glitch/features/local_settings/page/index.js +++ b/app/javascript/flavours/glitch/features/local_settings/page/index.js @@ -269,6 +269,18 @@ export default class LocalSettingsPage extends React.PureComponent { <FormattedMessage id='settings.image_backgrounds_media' defaultMessage='Preview collapsed toot media' /> </LocalSettingsPageItem> </section> + <section> + <h2></h2> + <LocalSettingsPageItem + settings={settings} + item={['collapsed', 'show_action_bar']} + id='mastodon-settings--collapsed-show-action-bar' + onChange={onChange} + dependsOn={[['collapsed', 'enabled']]} + > + <FormattedMessage id='settings.show_action_bar' defaultMessage='Show action buttons in collapsed toots' /> + </LocalSettingsPageItem> + </section> </div> ), ({ onChange, settings }) => ( diff --git a/app/javascript/flavours/glitch/locales/en.js b/app/javascript/flavours/glitch/locales/en.js index fb3763ced..90e924d4a 100644 --- a/app/javascript/flavours/glitch/locales/en.js +++ b/app/javascript/flavours/glitch/locales/en.js @@ -18,6 +18,7 @@ const messages = { 'settings.auto_collapse_notifications': 'Notifications', 'settings.auto_collapse_reblogs': 'Boosts', 'settings.auto_collapse_replies': 'Replies', + 'settings.show_action_bar': 'Show action buttons in collapsed toots', 'settings.close': 'Close', 'settings.collapsed_statuses': 'Collapsed toots', 'settings.enable_collapsed': 'Enable collapsed toots', diff --git a/app/javascript/flavours/glitch/reducers/local_settings.js b/app/javascript/flavours/glitch/reducers/local_settings.js index 260a9f08f..19233a963 100644 --- a/app/javascript/flavours/glitch/reducers/local_settings.js +++ b/app/javascript/flavours/glitch/reducers/local_settings.js @@ -33,6 +33,7 @@ const initialState = ImmutableMap({ user_backgrounds : false, preview_images : false, }), + show_action_bar : true, }), media : ImmutableMap({ letterbox : true, |