drag and drop, better demo images
This commit is contained in:
+16
@@ -106,6 +106,11 @@ function App() {
|
||||
}
|
||||
}, [roster]);
|
||||
|
||||
const handleDrag = (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className="App"
|
||||
@@ -141,6 +146,17 @@ function App() {
|
||||
htmlFor="rosterUpload"
|
||||
className={"rosterUpload " + (roster ? "rosterUploaded" : "")}
|
||||
id="rosterUploadContainer"
|
||||
onDrop={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (e.dataTransfer.files && e.dataTransfer.files[0]) {
|
||||
e.target.files = e.dataTransfer.files;
|
||||
handleFileSelect(e);
|
||||
}
|
||||
}}
|
||||
onDragEnter={handleDrag}
|
||||
onDragLeave={handleDrag}
|
||||
onDragOver={handleDrag}
|
||||
>
|
||||
<div id="preloadContainer">
|
||||
<span>Upload roster file (.ros, .rosz)</span>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 366 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 210 KiB After Width: | Height: | Size: 286 KiB |
Reference in New Issue
Block a user