|
|
@ -67,7 +67,6 @@ class StatusActionBar extends ImmutablePureComponent {
|
|
|
|
onFilter: PropTypes.func,
|
|
|
|
onFilter: PropTypes.func,
|
|
|
|
withDismiss: PropTypes.bool,
|
|
|
|
withDismiss: PropTypes.bool,
|
|
|
|
showReplyCount: PropTypes.bool,
|
|
|
|
showReplyCount: PropTypes.bool,
|
|
|
|
directMessage: PropTypes.bool,
|
|
|
|
|
|
|
|
scrollKey: PropTypes.string,
|
|
|
|
scrollKey: PropTypes.string,
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -197,7 +196,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render () {
|
|
|
|
render () {
|
|
|
|
const { status, intl, withDismiss, showReplyCount, directMessage, scrollKey } = this.props;
|
|
|
|
const { status, intl, withDismiss, showReplyCount, scrollKey } = this.props;
|
|
|
|
|
|
|
|
|
|
|
|
const anonymousAccess = !me;
|
|
|
|
const anonymousAccess = !me;
|
|
|
|
const mutingConversation = status.get('muted');
|
|
|
|
const mutingConversation = status.get('muted');
|
|
|
@ -311,25 +310,24 @@ class StatusActionBar extends ImmutablePureComponent {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className='status__action-bar'>
|
|
|
|
<div className='status__action-bar'>
|
|
|
|
{replyButton}
|
|
|
|
{replyButton}
|
|
|
|
{!directMessage && [
|
|
|
|
<IconButton className={classNames('status__action-bar-button', { reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} pressed={status.get('reblogged')} title={reblogTitle} icon={reblogIcon} onClick={this.handleReblogClick} />
|
|
|
|
<IconButton key='reblog-button' className={classNames('status__action-bar-button', { reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} pressed={status.get('reblogged')} title={reblogTitle} icon={reblogIcon} onClick={this.handleReblogClick} />,
|
|
|
|
<IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} />
|
|
|
|
<IconButton key='favourite-button' className='status__action-bar-button star-icon' animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} />,
|
|
|
|
{shareButton}
|
|
|
|
shareButton,
|
|
|
|
<IconButton className='status__action-bar-button bookmark-icon' disabled={anonymousAccess} active={status.get('bookmarked')} pressed={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' onClick={this.handleBookmarkClick} />
|
|
|
|
<IconButton key='bookmark-button' className='status__action-bar-button bookmark-icon' disabled={anonymousAccess} active={status.get('bookmarked')} pressed={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' onClick={this.handleBookmarkClick} />,
|
|
|
|
{filterButton}
|
|
|
|
filterButton,
|
|
|
|
|
|
|
|
<div key='dropdown-button' className='status__action-bar-dropdown'>
|
|
|
|
<div className='status__action-bar-dropdown'>
|
|
|
|
<DropdownMenuContainer
|
|
|
|
<DropdownMenuContainer
|
|
|
|
scrollKey={scrollKey}
|
|
|
|
scrollKey={scrollKey}
|
|
|
|
disabled={anonymousAccess}
|
|
|
|
disabled={anonymousAccess}
|
|
|
|
status={status}
|
|
|
|
status={status}
|
|
|
|
items={menu}
|
|
|
|
items={menu}
|
|
|
|
icon='ellipsis-h'
|
|
|
|
icon='ellipsis-h'
|
|
|
|
size={18}
|
|
|
|
size={18}
|
|
|
|
direction='right'
|
|
|
|
direction='right'
|
|
|
|
ariaLabel={intl.formatMessage(messages.more)}
|
|
|
|
ariaLabel={intl.formatMessage(messages.more)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>,
|
|
|
|
</div>
|
|
|
|
]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener'>
|
|
|
|
<a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener'>
|
|
|
|
<RelativeTimestamp timestamp={status.get('created_at')} />{status.get('edited_at') && <abbr title={intl.formatMessage(messages.edited, { date: intl.formatDate(status.get('edited_at'), { hour12: false, year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) })}> *</abbr>}
|
|
|
|
<RelativeTimestamp timestamp={status.get('created_at')} />{status.get('edited_at') && <abbr title={intl.formatMessage(messages.edited, { date: intl.formatDate(status.get('edited_at'), { hour12: false, year: 'numeric', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }) })}> *</abbr>}
|
|
|
|