2016-11-14 03:08:52 +09:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2017-09-28 22:31:31 +09:00
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
2023-05-24 00:15:17 +09:00
|
|
|
|
2019-05-03 11:34:55 +09:00
|
|
|
import SensitiveButtonContainer from '../containers/sensitive_button_container';
|
2023-05-24 00:15:17 +09:00
|
|
|
import UploadContainer from '../containers/upload_container';
|
|
|
|
import UploadProgressContainer from '../containers/upload_progress_container';
|
2016-11-18 23:36:16 +09:00
|
|
|
|
2017-09-28 22:31:31 +09:00
|
|
|
export default class UploadForm extends ImmutablePureComponent {
|
2016-11-14 03:08:52 +09:00
|
|
|
|
2017-05-12 21:44:10 +09:00
|
|
|
static propTypes = {
|
2017-09-28 22:31:31 +09:00
|
|
|
mediaIds: ImmutablePropTypes.list.isRequired,
|
2017-05-12 21:44:10 +09:00
|
|
|
};
|
|
|
|
|
2016-11-14 03:08:52 +09:00
|
|
|
render () {
|
2017-09-28 22:31:31 +09:00
|
|
|
const { mediaIds } = this.props;
|
2016-11-14 03:08:52 +09:00
|
|
|
|
|
|
|
return (
|
2017-04-23 11:26:55 +09:00
|
|
|
<div className='compose-form__upload-wrapper'>
|
2022-10-30 03:05:53 +09:00
|
|
|
<UploadProgressContainer />
|
2017-09-28 22:31:31 +09:00
|
|
|
|
|
|
|
<div className='compose-form__uploads-wrapper'>
|
|
|
|
{mediaIds.map(id => (
|
|
|
|
<UploadContainer id={id} key={id} />
|
|
|
|
))}
|
|
|
|
</div>
|
2019-05-03 11:34:55 +09:00
|
|
|
|
|
|
|
{!mediaIds.isEmpty() && <SensitiveButtonContainer />}
|
2016-11-14 03:08:52 +09:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-04-22 03:05:35 +09:00
|
|
|
}
|