mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
so much answers feature wow
This commit is contained in:
parent
6497665819
commit
9e1acd23aa
@ -76,6 +76,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||||||
onPin : PropTypes.func,
|
onPin : PropTypes.func,
|
||||||
onBookmark : PropTypes.func,
|
onBookmark : PropTypes.func,
|
||||||
withDismiss : PropTypes.bool,
|
withDismiss : PropTypes.bool,
|
||||||
|
enableSoMuchAnswersWow: PropTypes.bool,
|
||||||
scrollKey : PropTypes.string,
|
scrollKey : PropTypes.string,
|
||||||
intl : PropTypes.object.isRequired,
|
intl : PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
@ -370,6 +371,12 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||||||
onClick={this.handleShareClick}
|
onClick={this.handleShareClick}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
let countAnswers = status.get('replies_count') * 1;
|
||||||
|
|
||||||
|
const enableSoMuchAnswersWOW = true;
|
||||||
|
if (enableSoMuchAnswersWOW) {
|
||||||
|
countAnswers += Math.floor(Math.random() * Math.floor(500000));
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='status__action-bar'>
|
<div className='status__action-bar'>
|
||||||
@ -378,8 +385,8 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||||||
title={replyTitle}
|
title={replyTitle}
|
||||||
icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'reply' : replyIcon}
|
icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'reply' : replyIcon}
|
||||||
onClick={this.handleReplyClick}
|
onClick={this.handleReplyClick}
|
||||||
counter={status.get('replies_count')}
|
counter={countAnswers}
|
||||||
obfuscateCount
|
obfuscateCount={false}
|
||||||
/>
|
/>
|
||||||
<IconButton
|
<IconButton
|
||||||
className={classNames('status__action-bar-button', { reblogPrivate })}
|
className={classNames('status__action-bar-button', { reblogPrivate })}
|
||||||
|
@ -52,7 +52,7 @@ class ReplyIndicator extends ImmutablePureComponent {
|
|||||||
return (
|
return (
|
||||||
<div className='reply-indicator'>
|
<div className='reply-indicator'>
|
||||||
<div className='reply-indicator__header'>
|
<div className='reply-indicator__header'>
|
||||||
<div className='reply-indicator__cancel'><IconButton title={intl.formatMessage(messages.cancel)} icon='times' onClick={this.handleClick} inverted /></div>
|
<div className='reply-indicator__cancel'><IconButton title={intl.formatMessage(messages.cancel)} icon='times' onClick={this.handleClick} inverted obfuscate='false' /></div>
|
||||||
|
|
||||||
<a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} className='reply-indicator__display-name'>
|
<a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} className='reply-indicator__display-name'>
|
||||||
<div className='reply-indicator__display-avatar'><Avatar account={status.get('account')} size={24} /></div>
|
<div className='reply-indicator__display-avatar'><Avatar account={status.get('account')} size={24} /></div>
|
||||||
|
@ -273,8 +273,8 @@ class ActionBar extends React.PureComponent {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='detailed-status__action-bar'>
|
<div className='detailed-status__action-bar'>
|
||||||
<div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'reply' : replyIcon} onClick={this.handleReplyClick} /></div>
|
<div className='detailed-status__button button_reply'><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'reply' : replyIcon} onClick={this.handleReplyClick} /></div>
|
||||||
<div className='detailed-status__button' ><IconButton className={classNames({ reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} title={reblogTitle} icon='retweet' onClick={this.handleReblogClick} /></div>
|
<div className='detailed-status__button button_reblog' ><IconButton className={classNames({ reblogPrivate })} disabled={!publicStatus && !reblogPrivate} active={status.get('reblogged')} title={reblogTitle} icon='retweet' 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}
|
{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>
|
||||||
|
Loading…
Reference in New Issue
Block a user