diff --git a/src/components/FileBrowser.tsx b/src/components/FileBrowser.tsx index 4f8f0ec..e1889ed 100644 --- a/src/components/FileBrowser.tsx +++ b/src/components/FileBrowser.tsx @@ -2,6 +2,7 @@ import React from "react" import { useState } from "react" import { useOpenDirQuery } from "../generated/graphql" import Breadcrum from "./Breadcrum" +import DragAndDrop from "./DragAndDrop" import FileBrowserElement from "./FileBrowserElement" import FileOpen from "./FileOpen" @@ -16,46 +17,57 @@ const FileBrowser: React.FC = () => { } }) + function handleDrop(files:FileList) { + for (let i = 0; i < files.length; i++) { + const file = files[i] + console.debug(file) // TODO + } + } + return (
- { - setPath(newPath) - }}/> -
- {loading && -
// TODO: center - } - - - - - - - - + + { + setPath(newPath) + }}/> +
+ {loading && +
// TODO: center + } +
NameSize
+ + + + + + + - { data?.directorys.map(v => ({ - setPath(dir.id) - }} - />))} - - { data?.files.map(v => ({ - setOpenFileId(file.id) - setShowFile(true) - }} - />))} - -
NameSize
-
- {{ - setShowFile(false) - }} />} + { data?.directorys.map(v => ({ + setPath(dir.id) + }} + />))} + + { data?.files.map(v => ({ + setOpenFileId(file.id) + setShowFile(true) + }} + />))} + + +
+ {{ + setShowFile(false) + }} />} + ) }