From 5e7169079c0b5728bfcf4efd7687d2a440d06539 Mon Sep 17 00:00:00 2001 From: Niklas Date: Fri, 27 Aug 2021 21:50:14 +0200 Subject: [PATCH] added loading spinner --- src/assets/spinner.svg | 4 ++++ src/components/FileBrowser.tsx | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 src/assets/spinner.svg diff --git a/src/assets/spinner.svg b/src/assets/spinner.svg new file mode 100644 index 0000000..f5d043b --- /dev/null +++ b/src/assets/spinner.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/components/FileBrowser.tsx b/src/components/FileBrowser.tsx index 100087f..ec16c5b 100644 --- a/src/components/FileBrowser.tsx +++ b/src/components/FileBrowser.tsx @@ -14,6 +14,7 @@ import FileBrowserContextMenu, { Action, CONTEXT_MENU_DIR, CONTEXT_MENU_FILE } f import FileBrowserElement from "./FileBrowserElement" import FileOpen from "./FileOpen" import FileUploadButton from "./FileUploadButton" +import { ReactComponent as Spinner } from "./../assets/spinner.svg" function uriToPath(pathname:string) { // strip the "/f" from e.g. "/f/dir1/dir2" @@ -147,11 +148,7 @@ const FileBrowser: React.FC = (props) => { -
- {loading && -
Loading...
// TODO: center - } @@ -161,7 +158,6 @@ const FileBrowser: React.FC = (props) => { - { data?.directorys.map(v => ( = (props) => { />))}
+ {loading && +
+ +
+ }
{{ setShowFile(false)