Browse Source

🐛 fix action bar

Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>
feature/markdown-support
Baptiste Lemoine 2 years ago
parent
commit
198d0cf677
  1. 2
      app/javascript/mastodon/features/compose/components/action_bar.js
  2. 41
      app/javascript/mastodon/features/status/components/action_bar.js
  3. 4
      update_prod.sh

2
app/javascript/mastodon/features/compose/components/action_bar.js

@ -29,7 +29,7 @@ class ActionBar extends React.PureComponent {
handleLogout = () => {
this.props.onLogout();
}
};
render () {
const { intl } = this.props;

41
app/javascript/mastodon/features/status/components/action_bar.js

@ -19,6 +19,7 @@ const messages = defineMessages({
cannot_reblog : { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' },
favourite : { id: 'status.favourite', defaultMessage: 'Favourite' },
bookmark : { id: 'status.bookmark', defaultMessage: 'Bookmark' },
more : { id: 'status.more', defaultMessage: 'More' },
mute : { id: 'status.mute', defaultMessage: 'Mute @{name}' },
muteConversation : { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' },
unmuteConversation : { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },
@ -304,6 +305,8 @@ class ActionBar extends React.PureComponent {
if (status.get('visibility') === 'direct') reblogIcon = 'envelope';
else if (status.get('visibility') === 'private') reblogIcon = 'lock';
let reblog_disabled = (status.get('visibility') === 'direct' || status.get('visibility') === 'private');
return (
<div className='detailed-status__action-bar'>
<div className='detailed-status__button'><IconButton
@ -312,30 +315,28 @@ class ActionBar extends React.PureComponent {
onClick={this.handleReplyClick}
/></div >
<div className='detailed-status__button'><IconButton
disabled={reblog_disabled}
disabled={!publicStatus}
active={status.get('reblogged')}
title={reblog_disabled ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)}
title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)}
icon={reblogIcon}
onClick={this.handleReblogClick}
/></div >
<div className='detailed-status__button'>
<IconButton
className='star-icon'
animate
active={status.get('favourited')}
title={intl.formatMessage(messages.favourite)}
icon='star'
onClick={this.handleFavouriteClick}
/></div >
<div className='detailed-status__button'><IconButton
className='star-icon'
animate
active={status.get('favourited')}
title={intl.formatMessage(messages.favourite)}
icon='star'
onClick={this.handleFavouriteClick}
/></div >
{shareButton}
<div className='detailed-status__button'>
<IconButton
className='bookmark-icon'
active={status.get('bookmarked')}
title={intl.formatMessage(messages.bookmark)}
icon='bookmark'
onClick={this.handleBookmarkClick}
/></div >
<div className='detailed-status__button'><IconButton
className='bookmark-icon'
active={status.get('bookmarked')}
title={intl.formatMessage(messages.bookmark)}
icon='bookmark'
onClick={this.handleBookmarkClick}
/></div >
<div className='detailed-status__action-bar-dropdown'>
<DropdownMenuContainer
@ -344,7 +345,7 @@ class ActionBar extends React.PureComponent {
status={status}
items={menu}
direction='left'
title='More'
title={intl.formatMessage(messages.more)}
/>
</div >
</div >

4
update_prod.sh

@ -1,5 +1,9 @@
#!/bin/bash
## script must be run with the mastodon user
echo "dumping database before update":
cd && pg_dump -Fc mastodon -f mastodon-prod-db-$(date +%y-%m-%d).dump
echo "dumping database is done ":
ls -lArtH
cd /home/mastodon/live/
echo "ruby version is":
ruby -v

Loading…
Cancel
Save