diff --git a/frontend/src/layouts/ProjectGeneralLayout/ProjectGeneralLayout.tsx b/frontend/src/layouts/ProjectGeneralLayout/ProjectGeneralLayout.tsx index c1f8701d1..fe9e88f74 100644 --- a/frontend/src/layouts/ProjectGeneralLayout/ProjectGeneralLayout.tsx +++ b/frontend/src/layouts/ProjectGeneralLayout/ProjectGeneralLayout.tsx @@ -1,137 +1,54 @@ -import { useTranslation } from "react-i18next"; -import { faMobile } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Link, Outlet } from "@tanstack/react-router"; import { motion } from "framer-motion"; -import { Badge, Menu, MenuItem } from "@app/components/v2"; +import { Menu, MenuItem } from "@app/components/v2"; import { useWorkspace } from "@app/context"; -import { - useGetAccessRequestsCount, - useGetSecretApprovalRequestCount, - useGetSecretRotations -} from "@app/hooks/api"; -import { ProjectType } from "@app/hooks/api/workspace/types"; -// This is a generic layout shared by all types of projects. -// If the product layout differs significantly, create a new layout as needed. export const ProjectGeneralLayout = () => { const { currentWorkspace } = useWorkspace(); - const { t } = useTranslation(); - const workspaceId = currentWorkspace?.id || ""; - const projectSlug = currentWorkspace?.slug || ""; - - const { data: secretApprovalReqCount } = useGetSecretApprovalRequestCount({ - workspaceId - }); - const { data: accessApprovalRequestCount } = useGetAccessRequestsCount({ - projectSlug - }); - - // we only show the secret rotations v1 tab if they have existing rotations - const { data: secretRotations } = useGetSecretRotations({ - workspaceId, - options: { - refetchOnMount: false - } - }); - - const pendingRequestsCount = - (secretApprovalReqCount?.open || 0) + (accessApprovalRequestCount?.pendingCount || 0); - return ( - <> -
-
- - - -
- -
+
+
+ + + +
+
-
- -

- {` ${t("common.no-mobile")} `} -

-
- +
); -}; \ No newline at end of file +}; + diff --git a/frontend/src/layouts/ProjectGeneralLayout/index.tsx b/frontend/src/layouts/ProjectGeneralLayout/index.tsx index 417259a7d..56a93994a 100644 --- a/frontend/src/layouts/ProjectGeneralLayout/index.tsx +++ b/frontend/src/layouts/ProjectGeneralLayout/index.tsx @@ -1 +1,2 @@ -export { ProjectGeneralLayout } from "./ProjectGeneralLayout"; \ No newline at end of file +export { ProjectGeneralLayout } from "./ProjectGeneralLayout"; + diff --git a/frontend/src/layouts/ProjectLayout/ProjectLayout.tsx b/frontend/src/layouts/ProjectLayout/ProjectLayout.tsx index 15b191972..de9f1ab26 100644 --- a/frontend/src/layouts/ProjectLayout/ProjectLayout.tsx +++ b/frontend/src/layouts/ProjectLayout/ProjectLayout.tsx @@ -189,6 +189,32 @@ export const ProjectLayout = () => { + + + {({ isActive }) => ( + + } + > + {isActive && ( +
+ )} + Access Control + + )} + + { position="right" > {({ isActive }) => ( diff --git a/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx b/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx index 2a1743339..62f8abfd5 100644 --- a/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx +++ b/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx @@ -51,7 +51,7 @@ export const SecretManagerLayout = () => { >