wip quote post composing
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -18,6 +18,7 @@ const checkComposeContent = compose => {
|
||||
compose.get('spoiler_text').length > 0,
|
||||
compose.get('media_attachments').size > 0,
|
||||
compose.get('in_reply_to') !== null,
|
||||
compose.get('quote') !== null,
|
||||
compose.get('poll') !== null,
|
||||
].some(check => check === true);
|
||||
};
|
||||
|
||||
@ -10,7 +10,7 @@ import { Link, NavLink } from 'react-router-dom';
|
||||
import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper';
|
||||
import Icon from 'soapbox/components/icon';
|
||||
import PlaceholderCard from 'soapbox/features/placeholder/components/placeholder_card';
|
||||
import QuotedStatus from 'soapbox/features/status/components/quoted_status';
|
||||
import QuotedStatus from 'soapbox/features/status/containers/quoted_status_container';
|
||||
import { getDomain } from 'soapbox/utils/accounts';
|
||||
|
||||
import Card from '../features/status/components/card';
|
||||
@ -71,6 +71,7 @@ class Status extends ImmutablePureComponent {
|
||||
onReply: PropTypes.func,
|
||||
onFavourite: PropTypes.func,
|
||||
onReblog: PropTypes.func,
|
||||
onQuote: PropTypes.func,
|
||||
onDelete: PropTypes.func,
|
||||
onDirect: PropTypes.func,
|
||||
onChat: PropTypes.func,
|
||||
|
||||
@ -78,6 +78,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
||||
onFavourite: PropTypes.func,
|
||||
onBookmark: PropTypes.func,
|
||||
onReblog: PropTypes.func,
|
||||
onQuote: PropTypes.func,
|
||||
onDelete: PropTypes.func,
|
||||
onDirect: PropTypes.func,
|
||||
onChat: PropTypes.func,
|
||||
@ -203,6 +204,15 @@ class StatusActionBar extends ImmutablePureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
handleQuoteClick = () => {
|
||||
const { me, onQuote, onOpenUnauthorizedModal, status } = this.props;
|
||||
if (me) {
|
||||
onQuote(status, this.context.router.history);
|
||||
} else {
|
||||
onOpenUnauthorizedModal('REBLOG');
|
||||
}
|
||||
}
|
||||
|
||||
handleDeleteClick = () => {
|
||||
this.props.onDelete(this.props.status, this.context.router.history);
|
||||
}
|
||||
@ -557,6 +567,9 @@ class StatusActionBar extends ImmutablePureComponent {
|
||||
<IconButton className='status__action-bar-button' disabled={!publicStatus} active={status.get('reblogged')} pressed={status.get('reblogged')} title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} src={reblogIcon} onClick={this.handleReblogClick} />
|
||||
{reblogCount !== 0 && <span className='detailed-status__link' type='button' role='presentation' onClick={this.handleOpenReblogsModal}>{reblogCount}</span>}
|
||||
</div>
|
||||
<div className='status__action-bar__counter'>
|
||||
<IconButton className='status__action-bar-button' disabled={!publicStatus} title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} src={require('@tabler/icons/icons/quote.svg')} onClick={this.handleQuoteClick} />
|
||||
</div>
|
||||
<div
|
||||
className='status__action-bar__counter status__action-bar__counter--favourite'
|
||||
onMouseEnter={this.handleLikeButtonHover}
|
||||
|
||||
Reference in New Issue
Block a user