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

View File

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
## script must be run with the mastodon user ## 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/ cd /home/mastodon/live/
echo "ruby version is": echo "ruby version is":
ruby -v ruby -v