diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-01-25 05:23:05 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-01-25 10:36:27 +0100 |
commit | f1e4738f8111a11005b1f00affb6678c16059ee5 (patch) | |
tree | c441cb104b88cb0f6e45c4cd4c7568a9b6c0ca6d /app/javascript/flavours/glitch/features/status/components | |
parent | 3c4bd039495ed542d8f928c051f51e8bcd5e3392 (diff) |
[Glitch] Add number animations
Port 76f1ed834efd3b58b6ebc8e951b661bbc1b7bf9b to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/status/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/status/components/detailed_status.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.js b/app/javascript/flavours/glitch/features/status/components/detailed_status.js index 898011c88..c4ac8f0a6 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js @@ -7,7 +7,7 @@ import StatusContent from 'flavours/glitch/components/status_content'; import MediaGallery from 'flavours/glitch/components/media_gallery'; import AttachmentList from 'flavours/glitch/components/attachment_list'; import { Link } from 'react-router-dom'; -import { FormattedDate, FormattedNumber } from 'react-intl'; +import { FormattedDate } from 'react-intl'; import Card from './card'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Video from 'flavours/glitch/features/video'; @@ -17,6 +17,7 @@ import scheduleIdleTask from 'flavours/glitch/util/schedule_idle_task'; import classNames from 'classnames'; import PollContainer from 'flavours/glitch/containers/poll_container'; import Icon from 'flavours/glitch/components/icon'; +import AnimatedNumber from 'flavours/glitch/components/animated_number'; export default class DetailedStatus extends ImmutablePureComponent { @@ -204,7 +205,7 @@ export default class DetailedStatus extends ImmutablePureComponent { <Link to={`/statuses/${status.get('id')}/reblogs`} className='detailed-status__link'> <Icon id={reblogIcon} /> <span className='detailed-status__reblogs'> - <FormattedNumber value={status.get('reblogs_count')} /> + <AnimatedNumber value={status.get('reblogs_count')} /> </span> </Link> ); @@ -213,7 +214,7 @@ export default class DetailedStatus extends ImmutablePureComponent { <a href={`/interact/${status.get('id')}?type=reblog`} className='detailed-status__link' onClick={this.handleModalLink}> <Icon id={reblogIcon} /> <span className='detailed-status__reblogs'> - <FormattedNumber value={status.get('reblogs_count')} /> + <AnimatedNumber value={status.get('reblogs_count')} /> </span> </a> ); @@ -224,7 +225,7 @@ export default class DetailedStatus extends ImmutablePureComponent { <Link to={`/statuses/${status.get('id')}/favourites`} className='detailed-status__link'> <Icon id='star' /> <span className='detailed-status__favorites'> - <FormattedNumber value={status.get('favourites_count')} /> + <AnimatedNumber value={status.get('favourites_count')} /> </span> </Link> ); @@ -233,7 +234,7 @@ export default class DetailedStatus extends ImmutablePureComponent { <a href={`/interact/${status.get('id')}?type=favourite`} className='detailed-status__link' onClick={this.handleModalLink}> <Icon id='star' /> <span className='detailed-status__favorites'> - <FormattedNumber value={status.get('favourites_count')} /> + <AnimatedNumber value={status.get('favourites_count')} /> </span> </a> ); |