mirror of https://github.com/kern/filepizza
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
837 B
JavaScript
38 lines
837 B
JavaScript
import Arrow from './Arrow';
|
|
import React from 'react';
|
|
import UploadActions from '../actions/UploadActions';
|
|
|
|
export default class UploadPage extends React.Component {
|
|
|
|
uploadFile(file) {
|
|
UploadActions.uploadFile(file);
|
|
}
|
|
|
|
render() {
|
|
switch (this.props.status) {
|
|
case 'ready':
|
|
return <div>
|
|
<DropZone onDrop={this.uploadFile.bind(this)} />
|
|
<Arrow dir="up" />
|
|
</div>;
|
|
break;
|
|
|
|
case 'processing':
|
|
return <div>
|
|
<Arrow dir="up" animated />
|
|
<FileDescription file={this.props.file} />
|
|
</div>;
|
|
break;
|
|
|
|
case 'uploading':
|
|
return <div>
|
|
<Arrow dir="up" animated />
|
|
<FileDescription file={this.props.file} />
|
|
<Temaplink token={this.props.token} />
|
|
</div>;
|
|
break;
|
|
}
|
|
}
|
|
|
|
}
|