mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-24 17:22:34 +01:00
maintenance (dead): remove dead code
This commit is contained in:
parent
65246cb280
commit
c20572c790
4 changed files with 1 additions and 59 deletions
|
|
@ -9,7 +9,6 @@ export { Card } from './card';
|
|||
export { Loader } from './loader';
|
||||
export { Fab } from './fab';
|
||||
export { Icon } from './icon';
|
||||
export { Uploader } from './uploader';
|
||||
export { Bundle } from './bundle';
|
||||
export { Modal } from './modal';
|
||||
export { ModalPrompt } from './prompt';
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { DropTarget, DragSource } from 'react-dnd';
|
||||
import { NgIf } from './';
|
||||
|
||||
import './uploader.scss';
|
||||
|
||||
const FileTarget = {
|
||||
drop(props, monitor) {
|
||||
props.onUpload(props.path, monitor.getItem().files);
|
||||
}
|
||||
}
|
||||
|
||||
@DropTarget('__NATIVE_FILE__', FileTarget, (connect, monitor) => ({
|
||||
connectDropTarget: connect.dropTarget(),
|
||||
isOver: monitor.isOver(),
|
||||
canDrop: monitor.canDrop()
|
||||
}))
|
||||
export class Uploader extends React.Component {
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state = {
|
||||
drop: false,
|
||||
dragging: false
|
||||
};
|
||||
}
|
||||
|
||||
render(){
|
||||
return this.props.connectDropTarget(
|
||||
<div>
|
||||
<NgIf cond={this.props.isOver && this.props.canDrop}>
|
||||
DRAG FILE HERE
|
||||
</NgIf>
|
||||
<div className="component_uploader">
|
||||
{this.props.children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
Uploader.PropTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
onUpload: PropTypes.func.isRequired
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
.component_uploader{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(0,0,0,0.2);
|
||||
padding: 50% 0;
|
||||
text-align: center;
|
||||
}
|
||||
*/
|
||||
|
|
@ -6,7 +6,7 @@ import './filespage.scss';
|
|||
import './error.scss';
|
||||
import { Files } from '../model/';
|
||||
import { sort, onCreate, onRename, onDelete, onUpload, onSearch } from './filespage.helper';
|
||||
import { NgIf, Loader, Uploader, EventReceiver } from '../components/';
|
||||
import { NgIf, Loader, EventReceiver } from '../components/';
|
||||
import { notify, debounce, goToFiles, goToViewer, event, settings_get, settings_put } from '../helpers/';
|
||||
import { BreadCrumb, FileSystem, FrequentlyAccess, Submenu } from './filespage/';
|
||||
import InfiniteScroll from 'react-infinite-scroller';
|
||||
|
|
@ -224,7 +224,6 @@ export class FilesPage extends React.Component {
|
|||
files={this.state.files.slice(0, this.state.page_number * LOAD_PER_SCROLL)}
|
||||
metadata={this.state.metadata} onSort={this.onSort.bind(this)} onView={this.onView.bind(this)} />
|
||||
</NgIf>
|
||||
<Uploader path={this.state.path} />
|
||||
</NgIf>
|
||||
</InfiniteScroll>
|
||||
<NgIf cond={this.state.loading && this.state.error === null}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue