about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/compose/components/upload_progress.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-08-15 15:13:26 +0200
committerGitHub <noreply@github.com>2019-08-15 15:13:26 +0200
commit28636f43e4b0c04befa243b847c38e81c90f1289 (patch)
treec0c2210eb09026e02dde629cdb6899893c360437 /app/javascript/mastodon/features/compose/components/upload_progress.js
parentf178a01c11a4af077926dd035a0c4c44f6b3985c (diff)
Add OCR tool to media editing modal (#11566)
Diffstat (limited to 'app/javascript/mastodon/features/compose/components/upload_progress.js')
-rw-r--r--app/javascript/mastodon/features/compose/components/upload_progress.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/javascript/mastodon/features/compose/components/upload_progress.js b/app/javascript/mastodon/features/compose/components/upload_progress.js
index cbe58f573..b0bfe0c9a 100644
--- a/app/javascript/mastodon/features/compose/components/upload_progress.js
+++ b/app/javascript/mastodon/features/compose/components/upload_progress.js
@@ -2,7 +2,6 @@ import React from 'react';
 import PropTypes from 'prop-types';
 import Motion from '../../ui/util/optional_motion';
 import spring from 'react-motion/lib/spring';
-import { FormattedMessage } from 'react-intl';
 import Icon from 'mastodon/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;
@@ -22,11 +23,11 @@ export default class UploadProgress extends React.PureComponent {
     return (
       <div className='upload-progress'>
         <div className='upload-progress__icon'>
-          <Icon id='upload' />
+          <Icon id={icon} />
         </div>
 
         <div className='upload-progress__message'>
-          <FormattedMessage id='upload_progress.label' defaultMessage='Uploading...' />
+          {message}
 
           <div className='upload-progress__backdrop'>
             <Motion defaultStyle={{ width: 0 }} style={{ width: spring(progress) }}>