From 3af7d573ccc72e2b6cd5f6829fd830be360676b4 Mon Sep 17 00:00:00 2001 From: Vidyoot Senthil Date: Mon, 29 Jul 2024 12:49:29 -0500 Subject: [PATCH] feature: add group, create, upload links to dashboard --- .../dashboard/src/components/Sidebar.tsx | 88 +++++++++++++++---- frontends/dashboard/src/pages/Home.tsx | 33 +------ 2 files changed, 76 insertions(+), 45 deletions(-) diff --git a/frontends/dashboard/src/components/Sidebar.tsx b/frontends/dashboard/src/components/Sidebar.tsx index 99dc292892..af7da73bbd 100644 --- a/frontends/dashboard/src/components/Sidebar.tsx +++ b/frontends/dashboard/src/components/Sidebar.tsx @@ -1,8 +1,16 @@ -import { For, createMemo, createSignal, useContext } from "solid-js"; +import { + For, + createMemo, + createSignal, + useContext, + Show, + createEffect, +} from "solid-js"; import { UserContext } from "../contexts/UserContext"; import { useNavigate } from "@solidjs/router"; import { IoLogOutOutline, IoOpenOutline } from "solid-icons/io"; import { AiOutlinePlus, AiOutlineUser } from "solid-icons/ai"; +import { FaSolidAngleDown, FaSolidAngleRight } from "solid-icons/fa"; import CreateNewOrgModal from "./CreateNewOrgModal"; import { DatasetContext } from "../contexts/DatasetContext"; @@ -18,6 +26,16 @@ export const Sidebar = () => { const datasetContext = useContext(DatasetContext); const [showNewOrgModal, setShowNewOrgModal] = createSignal(false); + const [showSubMenu, setShowSubMenu] = createSignal( + localStorage.getItem("showSubMenu") !== "false", + ); + + createEffect(() => { + return localStorage.setItem( + "showSubMenu", + showSubMenu() ? "true" : "false", + ); + }); const sortedOrgs = createMemo( () => @@ -74,31 +92,71 @@ export const Sidebar = () => {
Admin Tools
-
- - Search playground{" "} - - +
+
+ + + Search playground + + +
+ + +
-