From 61266f3bedb0723a62c074df04719be437202f90 Mon Sep 17 00:00:00 2001 From: Nils Mechtel Date: Mon, 19 Aug 2024 14:08:35 +0200 Subject: [PATCH] update sidebar --- docs/index.html | 281 +++++++++++++++++++++++++++++------------------- 1 file changed, 170 insertions(+), 111 deletions(-) diff --git a/docs/index.html b/docs/index.html index 1dd306f..3a11db5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,7 +3,7 @@ - Annotation Tool + BioimgeIO Colab @@ -12,36 +12,46 @@ @@ -68,6 +78,7 @@ const [isLoadingAnnotations, setIsLoadingAnnotations] = useState(false); const [annotationURL, setAnnotationURL] = useState(""); const [copyFeedback, setCopyFeedback] = useState(""); + const [activeTab, setActiveTab] = useState("Local Deployment"); useEffect(() => { const workerManager = new PyodideWorkerManager(); @@ -215,102 +226,128 @@ return (
- +

Crowd-sourcing Annotation Tool

- {isLoadingWorker ? (
) : ( <> -
-
1.
- - + {activeTab === "Local Deployment" && ( + <> +
+
1.
+ + -
2.
- - +
2.
+ + -
3.
- -
+
3.
+ +
-
- {isImageFolderMounted && ( -
-
-

Number of Images: ({imageList.length})

- -
- {isLoadingImages ? ( -
-
-
- ) : ( -
    - {imageList.length > 0 ? ( - imageList.map((file, index) => ( -
  • {file}
  • - )) +
    + {isImageFolderMounted && ( +
    +
    +

    Number of Images: ({imageList.length})

    + +
    + {isLoadingImages ? ( +
    +
    +
    ) : ( -
  • No files found.
  • +
      + {imageList.length > 0 ? ( + imageList.map((file, index) => ( +
    • {file}
    • + )) + ) : ( +
    • No files found.
    • + )} +
    )} -
+
)} -
- )} - {annotationsFolderHandle && ( -
-
-

Number of Annotations: ({annotationsList.length})

- -
- {isLoadingAnnotations ? ( -
-
-
- ) : ( -
    - {annotationsList.length > 0 ? ( - annotationsList.map((file, index) => ( -
  • {file}
  • - )) + {annotationsFolderHandle && ( +
    +
    +

    Number of Annotations: ({annotationsList.length})

    + +
    + {isLoadingAnnotations ? ( +
    +
    +
    ) : ( -
  • No files found.
  • +
      + {annotationsList.length > 0 ? ( + annotationsList.map((file, index) => ( +
    • {file}
    • + )) + ) : ( +
    • No files found.
    • + )} +
    )} -
+
)}
- )} -
+ + )} + + {activeTab === "Remote Deployment" && ( +
+
+ + Remote Deployment is coming soon. +
+
+ )} + + {activeTab === "My Deployments" && ( +
+
+ + My Deployments is coming soon. +
+
+ )} )} @@ -318,26 +355,48 @@

Number of Annotations: ({annotationsList.l ); } - function Sidebar({ onLogin, user }) { + function Sidebar({ onLogin, user, activeTab, onTabClick }) { return ( -
-

Navigation

+
+

Navigation

+ +
+ {user.email ? ( + + Welcome, {user.email} + + ) : ( + + )} +
+ +
+ - - {user.email && ( -
-

User: {user.email}

-
- )}
); }