🐛 fix action bar

Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>
This commit is contained in:
Baptiste Lemoine 2020-02-12 10:10:58 +01:00
parent b872c1c7c0
commit 198d0cf677
3 changed files with 26 additions and 21 deletions

View File

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

View File

@ -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 >

View File

@ -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