|
|
|
@ -20,6 +20,8 @@ import { ReactComponent as StarBorderIcon } from '@material-symbols/svg-600/outl
|
|
|
|
|
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'flavours/glitch/permissions';
|
|
|
|
|
import { accountAdminLink, statusAdminLink } from 'flavours/glitch/utils/backend_links';
|
|
|
|
|
import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router';
|
|
|
|
|
import { ReactComponent as RepeatDisabledIcon } from 'mastodon/../svg-icons/repeat_disabled.svg';
|
|
|
|
|
import { ReactComponent as RepeatPrivateIcon } from 'mastodon/../svg-icons/repeat_private.svg';
|
|
|
|
|
|
|
|
|
|
import { IconButton } from '../../../components/icon_button';
|
|
|
|
|
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
|
|
|
|
@ -219,6 +221,7 @@ class ActionBar extends PureComponent {
|
|
|
|
|
|
|
|
|
|
let replyIcon;
|
|
|
|
|
let replyIconComponent;
|
|
|
|
|
|
|
|
|
|
if (status.get('in_reply_to_id', null) === null) {
|
|
|
|
|
replyIcon = 'reply';
|
|
|
|
|
replyIconComponent = ReplyIcon;
|
|
|
|
@ -229,21 +232,26 @@ class ActionBar extends PureComponent {
|
|
|
|
|
|
|
|
|
|
const reblogPrivate = status.getIn(['account', 'id']) === me && status.get('visibility') === 'private';
|
|
|
|
|
|
|
|
|
|
let reblogTitle;
|
|
|
|
|
let reblogTitle, reblogIconComponent;
|
|
|
|
|
|
|
|
|
|
if (status.get('reblogged')) {
|
|
|
|
|
reblogTitle = intl.formatMessage(messages.cancel_reblog_private);
|
|
|
|
|
reblogIconComponent = publicStatus ? RepeatIcon : RepeatPrivateIcon;
|
|
|
|
|
} else if (publicStatus) {
|
|
|
|
|
reblogTitle = intl.formatMessage(messages.reblog);
|
|
|
|
|
reblogIconComponent = RepeatIcon;
|
|
|
|
|
} else if (reblogPrivate) {
|
|
|
|
|
reblogTitle = intl.formatMessage(messages.reblog_private);
|
|
|
|
|
reblogIconComponent = RepeatPrivateIcon;
|
|
|
|
|
} else {
|
|
|
|
|
reblogTitle = intl.formatMessage(messages.cannot_reblog);
|
|
|
|
|
reblogIconComponent = RepeatDisabledIcon;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className='detailed-status__action-bar'>
|
|
|
|
|
<div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon={replyIcon} iconComponent={replyIconComponent} onClick={this.handleReplyClick} /></div>
|
|
|
|
|
<div className='detailed-status__button'><IconButton className={classNames({ reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} title={reblogTitle} icon='retweet' iconComponent={RepeatIcon} onClick={this.handleReblogClick} /></div>
|
|
|
|
|
<div className='detailed-status__button'><IconButton className={classNames({ reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} title={reblogTitle} icon='retweet' iconComponent={reblogIconComponent} 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' iconComponent={status.get('favourited') ? StarIcon : StarBorderIcon} onClick={this.handleFavouriteClick} /></div>
|
|
|
|
|
<div className='detailed-status__button'><IconButton className='bookmark-icon' disabled={!signedIn} active={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' iconComponent={status.get('bookmarked') ? BookmarkIcon : BookmarkBorderIcon} onClick={this.handleBookmarkClick} /></div>
|
|
|
|
|
|
|
|
|
|