diff --git a/frontend/src/layouts/ProjectLayout/components/MenuIconButton/MenuIconButton.tsx b/frontend/src/layouts/OrganizationLayout/components/MenuIconButton/MenuIconButton.tsx
similarity index 74%
rename from frontend/src/layouts/ProjectLayout/components/MenuIconButton/MenuIconButton.tsx
rename to frontend/src/layouts/OrganizationLayout/components/MenuIconButton/MenuIconButton.tsx
index a42146bed..4bb06022e 100644
--- a/frontend/src/layouts/ProjectLayout/components/MenuIconButton/MenuIconButton.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/MenuIconButton/MenuIconButton.tsx
@@ -22,7 +22,7 @@ export const MenuIconButton = ({
type="button"
role="menuitem"
className={twMerge(
- "duration-50 group relative flex w-full cursor-pointer flex-col items-center justify-center rounded p-2 font-inter text-sm text-bunker-100 transition-all hover:bg-mineshaft-700",
+ "group relative flex w-full cursor-pointer flex-col items-center justify-center rounded p-2 font-inter text-sm text-bunker-100 transition-all duration-150 hover:bg-mineshaft-700",
isSelected && "bg-bunker-800 hover:bg-mineshaft-600",
isDisabled && "cursor-not-allowed hover:bg-transparent",
className
@@ -34,8 +34,8 @@ export const MenuIconButton = ({
>
{icon && (
@@ -49,7 +49,12 @@ export const MenuIconButton = ({
/>
)}
- {children}
+
+ {children}
+
);
};
diff --git a/frontend/src/layouts/ProjectLayout/components/MenuIconButton/index.tsx b/frontend/src/layouts/OrganizationLayout/components/MenuIconButton/index.tsx
similarity index 100%
rename from frontend/src/layouts/ProjectLayout/components/MenuIconButton/index.tsx
rename to frontend/src/layouts/OrganizationLayout/components/MenuIconButton/index.tsx
diff --git a/frontend/src/layouts/ProjectLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsx b/frontend/src/layouts/OrganizationLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsx
similarity index 62%
rename from frontend/src/layouts/ProjectLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsx
rename to frontend/src/layouts/OrganizationLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsx
index 04d960e00..041fe7dd4 100644
--- a/frontend/src/layouts/ProjectLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsx
@@ -1,23 +1,23 @@
import { useState } from "react";
+import { faGithub, faSlack } from "@fortawesome/free-brands-svg-icons";
import {
faArrowUpRightFromSquare,
faBook,
faCheck,
faCog,
faEllipsis,
+ faEnvelope,
faInfinity,
faInfo,
faInfoCircle,
faMoneyBill,
- faReply,
- faShare,
faSignOut,
+ faUser,
faUsers
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useQueryClient } from "@tanstack/react-query";
-import { Link, useNavigate, useRouter } from "@tanstack/react-router";
-import { motion } from "framer-motion";
+import { Link, linkOptions, useLocation, useNavigate, useRouter } from "@tanstack/react-router";
import { Mfa } from "@app/components/auth/Mfa";
import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
@@ -42,13 +42,41 @@ import {
} from "@app/hooks/api";
import { authKeys } from "@app/hooks/api/auth/queries";
import { MfaMethod } from "@app/hooks/api/auth/types";
+import { SubscriptionPlan } from "@app/hooks/api/types";
import { AuthMethod } from "@app/hooks/api/users/types";
import { ProjectType } from "@app/hooks/api/workspace/types";
-import { INFISICAL_SUPPORT_OPTIONS } from "@app/layouts/OrganizationLayout/components/SidebarFooter/SidebarFooter";
import { navigateUserToOrg } from "@app/pages/auth/LoginPage/Login.utils";
import { MenuIconButton } from "../MenuIconButton";
-import { ProjectSwitcher } from "./ProjectSwitcher";
+
+const getPlan = (subscription: SubscriptionPlan) => {
+ if (subscription.dynamicSecret) return "Enterprise Plan";
+ if (subscription.pitRecovery) return "Pro Plan";
+ return "Free Plan";
+};
+
+export const INFISICAL_SUPPORT_OPTIONS = [
+ [
+ ,
+ "Support Forum",
+ "https://infisical.com/slack"
+ ],
+ [
+ ,
+ "Read Docs",
+ "https://infisical.com/docs/documentation/getting-started/introduction"
+ ],
+ [
+ ,
+ "GitHub Issues",
+ "https://github.com/Infisical/infisical/issues"
+ ],
+ [
+ ,
+ "Email Support",
+ "mailto:support@infisical.com"
+ ]
+];
export const MinimizedOrgSidebar = () => {
const [shouldShowMfa, toggleShowMfa] = useToggle(false);
@@ -66,8 +94,17 @@ export const MinimizedOrgSidebar = () => {
const { mutateAsync: selectOrganization } = useSelectOrganization();
const navigate = useNavigate();
const router = useRouter();
+ const location = useLocation();
const queryClient = useQueryClient();
+ const isMoreSelected = (
+ [
+ linkOptions({ to: "/organization/access-management" }).to,
+ linkOptions({ to: "/organization/settings" }).to,
+ linkOptions({ to: "/organization/audit-logs" }).to
+ ] as string[]
+ ).includes(location.pathname);
+
const handleOrgChange = async (orgId: string) => {
queryClient.removeQueries({ queryKey: authKeys.getAuthToken });
queryClient.removeQueries({ queryKey: workspaceKeys.getAllUserWorkspace() });
@@ -115,11 +152,14 @@ export const MinimizedOrgSidebar = () => {
return (
<>
-