diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-08-19 20:53:28 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-08-19 21:56:25 +0200 |
commit | 066034c62e87412c1e351fd89d98f3ad706d00a3 (patch) | |
tree | f8871b0744f2dffae94ea2309963a12e7cc9b932 /app/javascript/flavours/glitch/features/compose/components/upload_progress.js | |
parent | ab019800f8862a84eab679ea5848c3df0531ddc9 (diff) |
Refactor character counter to match upstream
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/components/upload_progress.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/components/upload_progress.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/upload_progress.js b/app/javascript/flavours/glitch/features/compose/components/upload_progress.js index 264c563f2..b00612983 100644 --- a/app/javascript/flavours/glitch/features/compose/components/upload_progress.js +++ b/app/javascript/flavours/glitch/features/compose/components/upload_progress.js @@ -2,7 +2,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import Motion from 'flavours/glitch/util/optional_motion'; import spring from 'react-motion/lib/spring'; -import { FormattedMessage } from 'react-intl'; import Icon from 'flavours/glitch/components/icon'; export default class UploadProgress extends React.PureComponent { @@ -10,10 +9,12 @@ export default class UploadProgress extends React.PureComponent { static propTypes = { active: PropTypes.bool, progress: PropTypes.number, + icon: PropTypes.string.isRequired, + message: PropTypes.node.isRequired, }; render () { - const { active, progress } = this.props; + const { active, progress, icon, message } = this.props; if (!active) { return null; @@ -21,10 +22,10 @@ export default class UploadProgress extends React.PureComponent { return ( <div className='composer--upload_form--progress'> - <Icon icon='upload' /> + <Icon icon={icon} /> <div className='message'> - <FormattedMessage id='upload_progress.label' defaultMessage='Uploading...' /> + {message} <div className='backdrop'> <Motion defaultStyle={{ width: 0 }} style={{ width: spring(progress) }}> |