Add option to hide action bar in collapsed toots

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
Spencer Alves 2018-09-29 16:44:02 -07:00 committed by ThibG
parent c065717b67
commit 4e60a0d543
4 changed files with 15 additions and 1 deletions

View File

@ -566,7 +566,7 @@ export default class Status extends ImmutablePureComponent {
parseClick={parseClick} parseClick={parseClick}
disabled={!router} disabled={!router}
/> />
{!isCollapsed || !muted ? ( {!isCollapsed || !(muted || !settings.getIn(['collapsed', 'show_action_bar'])) ? (
<StatusActionBar <StatusActionBar
{...other} {...other}
status={status} status={status}

View File

@ -269,6 +269,18 @@ export default class LocalSettingsPage extends React.PureComponent {
<FormattedMessage id='settings.image_backgrounds_media' defaultMessage='Preview collapsed toot media' /> <FormattedMessage id='settings.image_backgrounds_media' defaultMessage='Preview collapsed toot media' />
</LocalSettingsPageItem> </LocalSettingsPageItem>
</section> </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> </div>
), ),
({ onChange, settings }) => ( ({ onChange, settings }) => (

View File

@ -18,6 +18,7 @@ const messages = {
'settings.auto_collapse_notifications': 'Notifications', 'settings.auto_collapse_notifications': 'Notifications',
'settings.auto_collapse_reblogs': 'Boosts', 'settings.auto_collapse_reblogs': 'Boosts',
'settings.auto_collapse_replies': 'Replies', 'settings.auto_collapse_replies': 'Replies',
'settings.show_action_bar': 'Show action buttons in collapsed toots',
'settings.close': 'Close', 'settings.close': 'Close',
'settings.collapsed_statuses': 'Collapsed toots', 'settings.collapsed_statuses': 'Collapsed toots',
'settings.enable_collapsed': 'Enable collapsed toots', 'settings.enable_collapsed': 'Enable collapsed toots',

View File

@ -33,6 +33,7 @@ const initialState = ImmutableMap({
user_backgrounds : false, user_backgrounds : false,
preview_images : false, preview_images : false,
}), }),
show_action_bar : true,
}), }),
media : ImmutableMap({ media : ImmutableMap({
letterbox : true, letterbox : true,