Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

style: implement new navigation

Scott Wilson4af3f6fc3f59
diff --git a/frontend/src/components/v2/Badge/Badge.tsx b/frontend/src/components/v2/Badge/Badge.tsx
index 51bbdaeaaf..bd5ca49746 100644
--- a/frontend/src/components/v2/Badge/Badge.tsx
+++ b/frontend/src/components/v2/Badge/Badge.tsx
@@ -22,7 +22,7 @@ const badgeVariants = cva(
namespace:
"bg-namespace-v1/20 text-namespace-v1 [&_svg]:text-namespace-v1 flex opacity-100 hover:bg-namespace-v1/10 items-center [&_svg]:size-3.5 gap-x-1 w-min whitespace-nowrap",
project:
- "bg-primary/10 text-primary [&_svg]:text-primary opacity-100 hover:bg-primary/10 flex items-center [&_svg]:size-3 gap-x-1 w-min whitespace-nowrap",
+ "bg-primary/10 text-primary [&_svg]:text-primary opacity-100 hover:bg-primary/10 flex items-center [&_svg]:size-3 w-min gap-x-1 whitespace-nowrap",
instance:
"bg-mineshaft-200/20 text-mineshaft-200 [&_svg]:text-mineshaft-200 opacity-100 hover:bg-mineshaft-200/20 flex items-center [&_svg]:size-3 gap-x-1 w-min whitespace-nowrap"
}
diff --git a/frontend/src/components/v2/Breadcrumb/Breadcrumb.tsx b/frontend/src/components/v2/Breadcrumb/Breadcrumb.tsx
index 6a0046bbfb..63d2dc6f4f 100644
--- a/frontend/src/components/v2/Breadcrumb/Breadcrumb.tsx
+++ b/frontend/src/components/v2/Breadcrumb/Breadcrumb.tsx
@@ -120,10 +120,16 @@ export type TBreadcrumbFormat =
icon?: ReactNode;
};
-const BreadcrumbContainer = ({ breadcrumbs }: { breadcrumbs: TBreadcrumbFormat[] }) => (
- <div className="mx-auto max-w-7xl text-white">
- <Breadcrumb>
- <BreadcrumbList>
+const BreadcrumbContainer = ({
+ breadcrumbs,
+ className
+}: {
+ breadcrumbs: TBreadcrumbFormat[];
+ className?: string;
+}) => (
+ <div className={twMerge("mx-auto max-w-8xl overflow-hidden text-white", className)}>
+ <Breadcrumb className="overflow-hidden">
+ <BreadcrumbList className="overflow-hidden">
{(breadcrumbs as TBreadcrumbFormat[]).map((el, index) => {
const isNotLastCrumb = index + 1 !== breadcrumbs.length;
const BreadcrumbSegment = isNotLastCrumb ? BreadcrumbLink : BreadcrumbPage;
@@ -165,8 +171,8 @@ const BreadcrumbContainer = ({ breadcrumbs }: { breadcrumbs: TBreadcrumbFormat[]
const Component = el.component;
return (
<React.Fragment key={`breadcrumb-group-${index + 1}`}>
- <BreadcrumbItem>
- <BreadcrumbSegment>
+ <BreadcrumbItem className="overflow-hidden">
+ <BreadcrumbSegment className="overflow-hidden">
<Component />
</BreadcrumbSegment>
</BreadcrumbItem>
diff --git a/frontend/src/components/v2/PageHeader/PageHeader.tsx b/frontend/src/components/v2/PageHeader/PageHeader.tsx
index 01e710cd31..2284398a44 100644
--- a/frontend/src/components/v2/PageHeader/PageHeader.tsx
+++ b/frontend/src/components/v2/PageHeader/PageHeader.tsx
@@ -22,7 +22,7 @@ const SCOPE_NAME: Record<NonNullable<Props["scope"]>, { label: string; icon: Ico
};
export const PageHeader = ({ title, description, children, className, scope }: Props) => (
- <div className={twMerge("mb-4 w-full", className)}>
+ <div className={twMerge("mb-10 w-full border-b border-mineshaft-500 pb-10", className)}>
<div className="flex w-full justify-between">
<div className="mr-4 flex w-full items-center">
<h1 className="text-3xl font-medium text-white capitalize">{title}</h1>
diff --git a/frontend/src/components/v2/Tabs/Tabs.tsx b/frontend/src/components/v2/Tabs/Tabs.tsx
index 4100fd1444..c5dc4d4380 100644
--- a/frontend/src/components/v2/Tabs/Tabs.tsx
+++ b/frontend/src/components/v2/Tabs/Tabs.tsx
@@ -1,10 +1,19 @@
+import { IconDefinition } from "@fortawesome/free-brands-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import * as TabsPrimitive from "@radix-ui/react-tabs";
import { twMerge } from "tailwind-merge";
export type TabsProps = TabsPrimitive.TabsProps;
export const Tabs = ({ className, children, ...props }: TabsProps) => (
- <TabsPrimitive.Root className={twMerge("flex flex-col", className)} {...props}>
+ <TabsPrimitive.Root
+ className={twMerge(
+ "flex",
+ className,
+ props.orientation === "vertical" ? "flex-col lg:flex-row lg:gap-x-12" : "flex-col"
+ )}
+ {...props}
+ >
{children}
</TabsPrimitive.Root>
);
@@ -13,7 +22,11 @@ export type TabListProps = TabsPrimitive.TabsListProps;
export const TabList = ({ className, children, ...props }: TabListProps) => (
<TabsPrimitive.List
- className={twMerge("flex shrink-0 border-b-2 border-mineshaft-800", className)}
+ className={twMerge(
+ "no-scrollbar flex shrink-0 overflow-auto border-b-2 border-mineshaft-800",
+ "data-[orientation=vertical]:lg:flex-col data-[orientation=vertical]:lg:items-start data-[orientation=vertical]:lg:gap-y-6 data-[orientation=vertical]:lg:border-b-0",
+ className
+ )}
{...props}
>
{children}
@@ -26,18 +39,29 @@ export const Tab = ({
className,
children,
variant = "project",
+ icon,
...props
-}: TabProps & { variant?: "project" | "namespace" | "org" }) => (
+}: TabProps & {
+ icon?: IconDefinition;
+ variant?: "project" | "namespace" | "org" | "instance";
+}) => (
<TabsPrimitive.Trigger
className={twMerge(
- "flex h-10 items-center justify-center px-3 text-sm font-medium text-mineshaft-400 transition-all select-none first:rounded-tl-md last:rounded-tr-md hover:text-mineshaft-200 data-[state=active]:border-b data-[state=active]:text-white",
+ "flex h-10 cursor-pointer items-center justify-center border-transparent",
+ "px-3 text-sm font-medium whitespace-nowrap text-mineshaft-400 transition-all select-none",
+ "data-[orientation=vertical]:lg:h-5 data-[orientation=vertical]:lg:border-b-0 data-[orientation=vertical]:lg:border-l",
+ "border-b hover:text-mineshaft-200",
+ "data-[state=active]:border-mineshaft-400 data-[state=active]:text-white",
+ "hover:border-mineshaft-400",
variant === "project" && "data-[state=active]:border-primary",
variant === "namespace" && "data-[state=active]:border-namespace-v1",
variant === "org" && "data-[state=active]:border-org-v1",
+ variant === "instance" && "data-[state=active]:border-mineshaft-300",
className
)}
{...props}
>
+ {icon && <FontAwesomeIcon icon={icon} className="mr-2" size="xs" />}
{children}
</TabsPrimitive.Trigger>
);
@@ -46,7 +70,10 @@ export type TabPanelProps = TabsPrimitive.TabsContentProps;
export const TabPanel = ({ className, children, ...props }: TabPanelProps) => (
<TabsPrimitive.Content
- className={twMerge("grow rounded-br-md rounded-bl-md py-5 outline-hidden", className)}
+ className={twMerge(
+ "grow rounded-br-md rounded-bl-md py-5 outline-hidden data-[orientation=vertical]:lg:py-0",
+ className
+ )}
{...props}
>
{children}
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 360894c2ff..7c9b7db9bb 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -42,7 +42,7 @@
--font-inter: "Inter", sans-serif;
--color-org-v1: #30B3FF;
--color-namespace-v1: #96ff59;
-
+ --max-width-8xl: 88rem; /* 1408px */
/* Primary */
--color-primary-50: #fffff5;
--color-primary-100: #fcfce8;
diff --git a/frontend/src/layouts/AdminLayout/AdminLayout.tsx b/frontend/src/layouts/AdminLayout/AdminLayout.tsx
index 859ce9627c..89e8a761ef 100644
--- a/frontend/src/layouts/AdminLayout/AdminLayout.tsx
+++ b/frontend/src/layouts/AdminLayout/AdminLayout.tsx
@@ -12,7 +12,7 @@ import { RedisBanner } from "@app/layouts/OrganizationLayout/components/RedisBan
import { SmtpBanner } from "@app/layouts/OrganizationLayout/components/SmtpBanner";
import { InsecureConnectionBanner } from "../OrganizationLayout/components/InsecureConnectionBanner";
-import { AdminSidebar } from "./Sidebar";
+import { AdminNavBar } from "./AdminNavBar";
export const AdminLayout = () => {
const { t } = useTranslation();
@@ -33,9 +33,9 @@ export const AdminLayout = () => {
{!isLoading && !serverDetails?.emailConfigured && <SmtpBanner />}
{!isLoading && subscription.auditLogs && <AuditLogBanner />}
{!window.isSecureContext && <InsecureConnectionBanner />}
- <div className="flex grow flex-col overflow-y-hidden md:flex-row">
- <AdminSidebar />
- <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-4 pt-8 pb-4 dark:scheme-dark">
+ <div className="flex grow flex-col overflow-y-hidden">
+ <AdminNavBar />
+ <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4 dark:scheme-dark">
<Outlet />
</div>
</div>
diff --git a/frontend/src/layouts/AdminLayout/AdminNavBar.tsx b/frontend/src/layouts/AdminLayout/AdminNavBar.tsx
new file mode 100644
index 0000000000..209486eca4
--- /dev/null
+++ b/frontend/src/layouts/AdminLayout/AdminNavBar.tsx
@@ -0,0 +1,102 @@
+import { faCheckCircle } from "@fortawesome/free-regular-svg-icons";
+import {
+ faArrowLeft,
+ faBuilding,
+ faCog,
+ faDatabase,
+ faGlobe,
+ faKey,
+ faLock,
+ faPlug,
+ faUserTie
+} from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useMatchRoute } from "@tanstack/react-router";
+import { motion } from "framer-motion";
+
+import { Tab, TabList, Tabs } from "@app/components/v2";
+
+const generalTabs = [
+ {
+ label: "General",
+ icon: faCog,
+ link: "/admin/"
+ },
+ {
+ label: "Encryption",
+ icon: faLock,
+ link: "/admin/encryption"
+ },
+ {
+ label: "Authentication",
+ icon: faCheckCircle,
+ link: "/admin/authentication"
+ },
+ {
+ label: "Integrations",
+ icon: faPlug,
+ link: "/admin/integrations"
+ },
+ {
+ label: "Caching",
+ icon: faDatabase,
+ link: "/admin/caching"
+ },
+ {
+ label: "Environment Variables",
+ icon: faKey,
+ link: "/admin/environment"
+ }
+];
+
+const othersTabs = [
+ {
+ label: "Access Controls",
+ icon: faUserTie,
+ link: "/admin/access-management"
+ },
+ {
+ label: "Resource Overview",
+ icon: faBuilding,
+ link: "/admin/resources/overview"
+ }
+];
+
+export const AdminNavBar = () => {
+ const matchRoute = useMatchRoute();
+
+ return (
+ <div className="border-b border-mineshaft-600 bg-mineshaft-900">
+ <motion.div
+ initial={{ x: -150 }}
+ animate={{ x: 0 }}
+ exit={{ x: -150 }}
+ transition={{ duration: 0.2 }}
+ className="px-4"
+ >
+ <nav className="w-full">
+ <Tabs value="selected">
+ <TabList className="border-b-0">
+ <Link to="/organization/projects">
+ <Tab value="back" className="flex gap-x-2">
+ <FontAwesomeIcon icon={faGlobe} />
+ <FontAwesomeIcon icon={faArrowLeft} />
+ </Tab>
+ </Link>
+ {[...generalTabs, ...othersTabs].map((tab) => {
+ const isActive = matchRoute({ to: tab.link, fuzzy: false });
+ return (
+ <Link key={tab.link} to={tab.link}>
+ <Tab variant="instance" value={isActive ? "selected" : ""}>
+ {tab.label}
+ </Tab>
+ </Link>
+ );
+ })}
+ </TabList>
+ </Tabs>
+ </nav>
+ </motion.div>
+ </div>
+ );
+};
diff --git a/frontend/src/layouts/AdminLayout/Sidebar.tsx b/frontend/src/layouts/AdminLayout/Sidebar.tsx
deleted file mode 100644
index 185ea1dbf0..0000000000
--- a/frontend/src/layouts/AdminLayout/Sidebar.tsx
+++ /dev/null
@@ -1,126 +0,0 @@
-import { faCheckCircle } from "@fortawesome/free-regular-svg-icons";
-import {
- faBuilding,
- faChevronLeft,
- faCog,
- faDatabase,
- faKey,
- faLock,
- faPlug,
- faUserTie
-} from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link, useMatchRoute } from "@tanstack/react-router";
-
-import { Menu, MenuGroup, MenuItem } from "@app/components/v2";
-
-const generalTabs = [
- {
- label: "General",
- icon: faCog,
- link: "/admin/"
- },
- {
- label: "Encryption",
- icon: faLock,
- link: "/admin/encryption"
- },
- {
- label: "Authentication",
- icon: faCheckCircle,
- link: "/admin/authentication"
- },
- {
- label: "Integrations",
- icon: faPlug,
- link: "/admin/integrations"
- },
- {
- label: "Caching",
- icon: faDatabase,
- link: "/admin/caching"
- },
- {
- label: "Environment Variables",
- icon: faKey,
- link: "/admin/environment"
- }
-];
-
-const othersTabs = [
- {
- label: "Access Controls",
- icon: faUserTie,
- link: "/admin/access-management"
- },
- {
- label: "Resource Overview",
- icon: faBuilding,
- link: "/admin/resources/overview"
- }
-];
-
-export const AdminSidebar = () => {
- const matchRoute = useMatchRoute();
-
- return (
- <aside className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60">
- <nav className="items-between flex h-full flex-col justify-between overflow-y-auto dark:scheme-dark">
- <div className="flex-1">
- <Menu>
- <MenuGroup title="Configuration">
- {generalTabs.map((tab) => {
- const isActive = matchRoute({ to: tab.link, fuzzy: false });
- return (
- <Link key={tab.link} to={tab.link}>
- <MenuItem isSelected={Boolean(isActive)}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={tab.icon} />
- </div>
- {tab.label}
- </div>
- </MenuItem>
- </Link>
- );
- })}
- </MenuGroup>
- <MenuGroup title="Others">
- {othersTabs.map((tab) => {
- const isActive = matchRoute({ to: tab.link, fuzzy: false });
- return (
- <Link key={tab.link} to={tab.link}>
- <MenuItem isSelected={Boolean(isActive)}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={tab.icon} />
- </div>
- {tab.label}
- </div>
- </MenuItem>
- </Link>
- );
- })}
- </MenuGroup>
- </Menu>
- </div>
- <Menu>
- <Link to="/organization/projects">
- <MenuItem
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <FontAwesomeIcon
- className="mx-1 inline-block shrink-0"
- icon={faChevronLeft}
- flip="vertical"
- />
- }
- >
- Back to Organization
- </MenuItem>
- </Link>
- </Menu>
- </nav>
- </aside>
- );
-};
diff --git a/frontend/src/layouts/KmsLayout/KmsLayout.tsx b/frontend/src/layouts/KmsLayout/KmsLayout.tsx
index 4aa1c1406a..a925b79579 100644
--- a/frontend/src/layouts/KmsLayout/KmsLayout.tsx
+++ b/frontend/src/layouts/KmsLayout/KmsLayout.tsx
@@ -1,9 +1,9 @@
-import { faBook, faCog, faCube, faHome, faLock, faUsers } from "@fortawesome/free-solid-svg-icons";
+import { faArrowLeft, faGlobe } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link, Outlet } from "@tanstack/react-router";
+import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-motion";
-import { Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
+import { Tab, TabList, Tabs } from "@app/components/v2";
import { useProject, useProjectPermission } from "@app/context";
import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePrivilegeModeBanner";
@@ -12,138 +12,87 @@ export const KmsLayout = () => {
const { currentProject } = useProject();
const { assumedPrivilegeDetails } = useProjectPermission();
+ const location = useLocation();
+
return (
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
- <div className="flex grow flex-col overflow-y-hidden md:flex-row">
+ <div className="border-b border-mineshaft-600 bg-mineshaft-900">
<motion.div
key="menu-project-items"
initial={{ x: -150 }}
animate={{ x: 0 }}
exit={{ x: -150 }}
transition={{ duration: 0.2 }}
- className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
+ className="px-4"
>
- <nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
- <div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
- <Lottie className="inline-block h-5 w-5 shrink-0" icon="unlock" />
- KMS
- </div>
- <div className="flex-1">
- <Menu>
- <MenuGroup title="Resources">
- <Link
- to="/projects/kms/$projectId/overview"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCube} />
- </div>
- Overview
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/kms/$projectId/kmip"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faLock} />
- </div>
- KMIP
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- <MenuGroup title="Others">
- <Link
- to="/projects/kms/$projectId/access-management"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faUsers} />
- </div>
- Project Access
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/kms/$projectId/audit-logs"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faBook} />
- </div>
- Audit Logs
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/kms/$projectId/settings"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCog} />
- </div>
- Project Settings
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- </Menu>
- </div>
- <div>
- <Menu>
+ <nav className="w-full">
+ <Tabs value="selected">
+ <TabList className="border-b-0">
<Link to="/organization/projects">
- <MenuItem
- variant="project"
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <div className="w-6">
- <FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
- </div>
- }
- >
- Organization Home
- </MenuItem>
+ <Tab value="back" className="flex gap-x-2">
+ <FontAwesomeIcon icon={faGlobe} />
+ <FontAwesomeIcon icon={faArrowLeft} />
+ </Tab>
+ </Link>
+ <Link
+ to="/projects/kms/$projectId/overview"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Overview</Tab>}
+ </Link>
+ <Link
+ to="/projects/kms/$projectId/kmip"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>KMIP</Tab>}
+ </Link>
+ <Link
+ to="/projects/kms/$projectId/audit-logs"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
</Link>
- </Menu>
- </div>
+ <Link
+ to="/projects/kms/$projectId/access-management"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={
+ isActive ||
+ location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
+ ? "selected"
+ : ""
+ }
+ >
+ Access Control
+ </Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/kms/$projectId/settings"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
+ </Link>
+ </TabList>
+ </Tabs>
</nav>
</motion.div>
- <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
- {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
- <Outlet />
- </div>
+ </div>
+ {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
+ <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
+ <Outlet />
</div>
</div>
);
diff --git a/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx b/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
index f2866259c4..c1cc10e410 100644
--- a/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
+++ b/frontend/src/layouts/OrganizationLayout/OrganizationLayout.tsx
@@ -13,7 +13,7 @@ import { useFetchServerStatus } from "@app/hooks/api";
import { AuditLogBanner } from "./components/AuditLogBanner";
import { InsecureConnectionBanner } from "./components/InsecureConnectionBanner";
import { Navbar } from "./components/NavBar";
-import { OrgSidebar } from "./components/OrgSidebar";
+import { OrgNavBar } from "./components/OrgNavBar";
import { RedisBanner } from "./components/RedisBanner";
import { SmtpBanner } from "./components/SmtpBanner";
@@ -41,16 +41,16 @@ export const OrganizationLayout = () => {
className={`dark hidden ${containerHeight} w-full flex-col overflow-x-hidden bg-bunker-800 transition-all md:flex`}
>
<Navbar />
- {!isLoading && !serverDetails?.redisConfigured && <RedisBanner />}
- {!isLoading && !serverDetails?.emailConfigured && <SmtpBanner />}
- {!isLoading && subscription.auditLogs && <AuditLogBanner />}
- {!window.isSecureContext && <InsecureConnectionBanner />}
- <div className="flex grow flex-col overflow-y-hidden md:flex-row">
- <OrgSidebar isHidden={isInsideProject} />
+ <div className="flex grow flex-col overflow-y-hidden">
+ <OrgNavBar isHidden={isInsideProject} />
+ {!isLoading && !isInsideProject && !serverDetails?.redisConfigured && <RedisBanner />}
+ {!isLoading && !isInsideProject && !serverDetails?.emailConfigured && <SmtpBanner />}
+ {!isLoading && !isInsideProject && subscription.auditLogs && <AuditLogBanner />}
+ {!window.isSecureContext && !isInsideProject && <InsecureConnectionBanner />}
<main
className={twMerge(
- "flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-4 pt-8 pb-4 dark:scheme-dark",
- isInsideProject && "p-0"
+ "flex-1 overflow-x-hidden bg-bunker-800 px-12 pt-10 pb-4 dark:scheme-dark",
+ isInsideProject ? "overflow-y-hidden p-0" : "overflow-y-auto"
)}
>
<Outlet />
diff --git a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
index 596202bf6a..4dcc31e4bc 100644
--- a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
@@ -9,6 +9,7 @@ import {
faEnvelope,
faExclamationTriangle,
faGlobe,
+ faInfinity,
faInfo,
faInfoCircle,
faServer,
@@ -43,7 +44,7 @@ import { envConfig } from "@app/config/env";
import { useOrganization, useSubscription, useUser } from "@app/context";
import { isInfisicalCloud } from "@app/helpers/platform";
import { useToggle } from "@app/hooks";
-import { projectKeys, useGetOrganizations, useLogoutUser } from "@app/hooks/api";
+import { projectKeys, useGetOrganizations, useGetOrgTrialUrl, useLogoutUser } from "@app/hooks/api";
import { authKeys, selectOrganization } from "@app/hooks/api/auth/queries";
import { MfaMethod } from "@app/hooks/api/auth/types";
import { getAuthToken } from "@app/hooks/api/reactQuery";
@@ -162,6 +163,8 @@ export const Navbar = () => {
await navigateUserToOrg(navigate, orgId);
};
+ const { mutateAsync } = useGetOrgTrialUrl();
+
const logout = useLogoutUser();
const logOutUser = async () => {
try {
@@ -201,144 +204,191 @@ export const Navbar = () => {
const isServerAdminPanel = location.pathname.startsWith("/admin");
- const isOrgScope = breadcrumbs?.length === 1; // TODO: scott/akhil is this adequate?
+ const isOrgScope = location.pathname.startsWith("/organization"); // TODO: scott/akhil is this adequate?
return (
- <div className="z-10 flex min-h-12 items-center border-b border-mineshaft-600 bg-mineshaft-800 px-4">
- <div>
- <Link to="/organization/projects">
- <img alt="infisical logo" src="/images/logotransparent.png" className="h-4" />
- </Link>
- </div>
- <p className="pr-3 pl-1 text-lg text-mineshaft-400/70">/</p>
- {isServerAdminPanel ? (
- <>
- <Link
- to="/admin"
- className="group flex cursor-pointer items-center gap-2 text-sm text-white transition-all duration-100 hover:text-primary"
- >
- <div>
- <FontAwesomeIcon icon={faServer} className="text-xs text-bunker-300" />
- </div>
- <div className="whitespace-nowrap">Server Console</div>
+ <div className="z-10 flex min-h-12 items-center bg-mineshaft-900 px-4 pt-1">
+ <div className="mr-auto flex items-center overflow-hidden">
+ <div className="shrink-0">
+ <Link to="/organization/projects">
+ <img alt="infisical logo" src="/images/logotransparent.png" className="h-4" />
</Link>
- <p className="pr-3 pl-3 text-lg text-mineshaft-400/70">/</p>
- {breadcrumbs ? (
- // scott: remove /admin as we show server console above
- <BreadcrumbContainer breadcrumbs={breadcrumbs.slice(1) as TBreadcrumbFormat[]} />
- ) : null}
- </>
- ) : (
- <>
- <div className="flex items-center">
- <DropdownMenu modal={false}>
- <Link to="/organization/projects">
- <div className="group flex cursor-pointer items-center gap-2 text-sm text-white transition-all duration-100 hover:text-primary">
- <Badge
- variant="org"
- className={twMerge("text-sm", !isOrgScope && "bg-transparent opacity-75")}
- >
- <FontAwesomeIcon icon={faGlobe} />
- {currentOrg?.name}
- </Badge>
- <div className="mr-1 rounded-sm border border-mineshaft-500 px-1 text-xs text-bunker-300 no-underline!">
- {getPlan(subscription)}
+ </div>
+ <p className="pr-3 pl-1 text-lg text-mineshaft-400/70">/</p>
+ {isServerAdminPanel ? (
+ <>
+ <Link
+ to="/admin"
+ className="group flex cursor-pointer items-center gap-2 text-sm text-white transition-all duration-100 hover:text-primary"
+ >
+ <div>
+ <FontAwesomeIcon icon={faServer} className="text-xs text-bunker-300" />
+ </div>
+ <div className="whitespace-nowrap">Server Console</div>
+ </Link>
+ <p className="pr-3 pl-3 text-lg text-mineshaft-400/70">/</p>
+ {breadcrumbs ? (
+ // scott: remove /admin as we show server console above
+ <BreadcrumbContainer breadcrumbs={breadcrumbs.slice(1) as TBreadcrumbFormat[]} />
+ ) : null}
+ </>
+ ) : (
+ <>
+ <div className="flex items-center overflow-hidden">
+ <DropdownMenu modal={false}>
+ <Link className="overflow-hidden" to="/organization/projects">
+ <div className="group flex cursor-pointer items-center gap-2 overflow-hidden text-sm text-white transition-all duration-100 hover:text-primary">
+ <Badge
+ variant="org"
+ className={twMerge(
+ "max-w-full min-w-0 text-sm",
+ !isOrgScope && "bg-transparent opacity-75"
+ )}
+ >
+ <FontAwesomeIcon icon={faGlobe} />
+ <p className="truncate">{currentOrg?.name}</p>
+ </Badge>
+ <div className="mr-1 rounded-sm border border-mineshaft-500 px-1 text-xs text-bunker-300 no-underline!">
+ {getPlan(subscription)}
+ </div>
+ {subscription.cardDeclined && (
+ <Tooltip
+ content={`Your payment could not be processed${subscription.cardDeclinedReason ? `: ${subscription.cardDeclinedReason}` : ""}. Please update your payment method to continue enjoying premium features.`}
+ className="max-w-xs"
+ >
+ <div className="flex items-center">
+ <FontAwesomeIcon
+ icon={faExclamationTriangle}
+ className="animate-pulse cursor-help text-xs text-primary-400"
+ />
+ </div>
+ </Tooltip>
+ )}
</div>
- {subscription.cardDeclined && (
- <Tooltip
- content={`Your payment could not be processed${subscription.cardDeclinedReason ? `: ${subscription.cardDeclinedReason}` : ""}. Please update your payment method to continue enjoying premium features.`}
- className="max-w-xs"
+ </Link>
+ <DropdownMenuTrigger asChild>
+ <div>
+ <IconButton
+ variant="plain"
+ colorSchema="secondary"
+ ariaLabel="switch-org"
+ className="px-2 py-1"
>
- <div className="flex items-center">
- <FontAwesomeIcon
- icon={faExclamationTriangle}
- className="animate-pulse cursor-help text-xs text-primary-400"
- />
- </div>
- </Tooltip>
- )}
- </div>
- </Link>
- <DropdownMenuTrigger asChild>
- <div>
- <IconButton
- variant="plain"
- colorSchema="secondary"
- ariaLabel="switch-org"
- className="px-2 py-1"
- >
- <FontAwesomeIcon icon={faCaretDown} className="text-xs text-bunker-300" />
- </IconButton>
- </div>
- </DropdownMenuTrigger>
- <DropdownMenuContent
- align="start"
- side="bottom"
- className="mt-6 cursor-default p-1 shadow-mineshaft-600 drop-shadow-md"
- style={{ minWidth: "220px" }}
- >
- <div className="px-2 py-1 text-xs text-mineshaft-400 capitalize">organizations</div>
- {orgs?.map((org) => {
- return (
- <DropdownMenuItem key={org.id}>
- <Button
- onClick={async () => {
- if (currentOrg?.id === org.id) return;
+ <FontAwesomeIcon icon={faCaretDown} className="text-xs text-bunker-300" />
+ </IconButton>
+ </div>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ align="start"
+ side="bottom"
+ className="mt-6 cursor-default p-1 shadow-mineshaft-600 drop-shadow-md"
+ style={{ minWidth: "220px" }}
+ >
+ <div className="px-2 py-1 text-xs text-mineshaft-400 capitalize">
+ organizations
+ </div>
+ {orgs?.map((org) => {
+ return (
+ <DropdownMenuItem key={org.id}>
+ <Button
+ onClick={async () => {
+ if (currentOrg?.id === org.id) return;
- if (org.authEnforced) {
- // org has an org-level auth method enabled (e.g. SAML)
- // -> logout + redirect to SAML SSO
+ if (org.authEnforced) {
+ // org has an org-level auth method enabled (e.g. SAML)
+ // -> logout + redirect to SAML SSO
- await logout.mutateAsync();
- if (org.orgAuthMethod === AuthMethod.OIDC) {
- window.open(`/api/v1/sso/oidc/login?orgSlug=${org.slug}`);
- } else {
- window.open(`/api/v1/sso/redirect/saml2/organizations/${org.slug}`);
+ await logout.mutateAsync();
+ if (org.orgAuthMethod === AuthMethod.OIDC) {
+ window.open(`/api/v1/sso/oidc/login?orgSlug=${org.slug}`);
+ } else {
+ window.open(`/api/v1/sso/redirect/saml2/organizations/${org.slug}`);
+ }
+ window.close();
+ return;
+ }
+
+ if (org.googleSsoAuthEnforced) {
+ await logout.mutateAsync();
+ window.open(`/api/v1/sso/redirect/google?org_slug=${org.slug}`);
+ window.close();
+ return;
}
- window.close();
- return;
- }
- if (org.googleSsoAuthEnforced) {
- await logout.mutateAsync();
- window.open(`/api/v1/sso/redirect/google?org_slug=${org.slug}`);
- window.close();
- return;
+ handleOrgChange(org?.id);
+ }}
+ variant="plain"
+ colorSchema="secondary"
+ size="xs"
+ className="flex w-full items-center justify-start p-0 font-normal"
+ leftIcon={
+ currentOrg?.id === org.id && (
+ <FontAwesomeIcon icon={faCheck} className="mr-3 text-primary" />
+ )
}
+ >
+ <div className="flex w-full max-w-[150px] items-center justify-between truncate">
+ {org.name}
+ </div>
+ </Button>
+ </DropdownMenuItem>
+ );
+ })}
+ <div className="mt-1 h-1 border-t border-mineshaft-600" />
+ <DropdownMenuItem
+ icon={<FontAwesomeIcon icon={faSignOut} />}
+ onClick={logOutUser}
+ >
+ Log Out
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </div>
+ {!isOrgScope && (
+ <>
+ <p className="pr-3 pl-1 text-lg text-mineshaft-400/70">/</p>
+ {breadcrumbs ? (
+ <BreadcrumbContainer
+ className="min-w-[10rem] flex-1"
+ breadcrumbs={[breadcrumbs[0]] as TBreadcrumbFormat[]}
+ />
+ ) : null}
+ </>
+ )}
+ </>
+ )}
+ </div>
+ {subscription && subscription.slug === "starter" && !subscription.has_used_trial && (
+ <Tooltip content="Start Free Pro Trial">
+ <Button
+ variant="plain"
+ className="mr-2 border-mineshaft-500 px-2.5 py-1.5 whitespace-nowrap text-mineshaft-200 hover:bg-mineshaft-600"
+ leftIcon={<FontAwesomeIcon icon={faInfinity} />}
+ onClick={async () => {
+ if (!subscription || !currentOrg) return;
- handleOrgChange(org?.id);
- }}
- variant="plain"
- colorSchema="secondary"
- size="xs"
- className="flex w-full items-center justify-start p-0 font-normal"
- leftIcon={
- currentOrg?.id === org.id && (
- <FontAwesomeIcon icon={faCheck} className="mr-3 text-primary" />
- )
- }
- >
- <div className="flex w-full max-w-[150px] items-center justify-between truncate">
- {org.name}
- </div>
- </Button>
- </DropdownMenuItem>
- );
- })}
- <div className="mt-1 h-1 border-t border-mineshaft-600" />
- <DropdownMenuItem icon={<FontAwesomeIcon icon={faSignOut} />} onClick={logOutUser}>
- Log Out
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
- </div>
- <p className="pr-3 pl-1 text-lg text-mineshaft-400/70">/</p>
- {breadcrumbs ? (
- <BreadcrumbContainer breadcrumbs={breadcrumbs as TBreadcrumbFormat[]} />
- ) : null}
- </>
+ // direct user to start pro trial
+ const url = await mutateAsync({
+ orgId: currentOrg.id,
+ success_url: window.location.href
+ });
+
+ window.location.href = url;
+ }}
+ >
+ Free Pro Trial
+ </Button>
+ </Tooltip>
+ )}
+ {user.superAdmin && !location.pathname.startsWith("/admin") && (
+ <Link
+ className="mr-2 rounded-md border border-mineshaft-500 px-2.5 py-1.5 text-sm whitespace-nowrap text-mineshaft-200 hover:bg-mineshaft-600"
+ to="/admin"
+ >
+ <FontAwesomeIcon icon={faServer} className="mr-2" />
+ Server Console
+ </Link>
)}
- <div className="grow" />
<DropdownMenu modal={false}>
<DropdownMenuTrigger>
<div className="rounded-l-md border border-r-0 border-mineshaft-500 px-2.5 py-1 hover:bg-mineshaft-600">
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/OrgNavBar.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/OrgNavBar.tsx
new file mode 100644
index 0000000000..f9df103ff8
--- /dev/null
+++ b/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/OrgNavBar.tsx
@@ -0,0 +1,110 @@
+import { Link, useLocation } from "@tanstack/react-router";
+import { motion } from "framer-motion";
+
+import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
+import { Tab, TabList, Tabs } from "@app/components/v2";
+import { usePopUp } from "@app/hooks";
+
+type Props = {
+ isHidden?: boolean;
+};
+
+export const OrgNavBar = ({ isHidden }: Props) => {
+ const { popUp, handlePopUpToggle } = usePopUp(["createOrg"] as const);
+
+ const { pathname } = useLocation();
+
+ return (
+ <>
+ {!isHidden && (
+ <div className="dark hidden w-full flex-col overflow-x-hidden border-b border-mineshaft-600 bg-mineshaft-900 px-4 md:flex">
+ <motion.div
+ key="menu-project-items"
+ initial={{ x: 150 }}
+ animate={{ x: 0 }}
+ exit={{ x: 150 }}
+ transition={{ duration: 0.2 }}
+ className=""
+ >
+ <nav className="w-full">
+ <Tabs value="selected">
+ <TabList className="border-b-0">
+ <Link to="/organization/projects">
+ {({ isActive }) => (
+ <Tab variant="org" value={isActive ? "selected" : ""}>
+ Overview
+ </Tab>
+ )}
+ </Link>
+ <Link to="/organization/access-management">
+ {({ isActive }) => (
+ <Tab
+ variant="org"
+ value={
+ isActive ||
+ pathname.match(
+ /organization\/members|organization\/identities|organization\/groups|organization\/roles/
+ )
+ ? "selected"
+ : ""
+ }
+ >
+ Access Control
+ </Tab>
+ )}
+ </Link>
+ <Link to="/organization/app-connections">
+ {({ isActive }) => (
+ <Tab variant="org" value={isActive ? "selected" : ""}>
+ App Connections
+ </Tab>
+ )}
+ </Link>
+ <Link to="/organization/networking">
+ {({ isActive }) => (
+ <Tab variant="org" value={isActive ? "selected" : ""}>
+ Networking
+ </Tab>
+ )}
+ </Link>
+ <Link to="/organization/audit-logs">
+ {({ isActive }) => (
+ <Tab variant="org" value={isActive ? "selected" : ""}>
+ Audit Logs
+ </Tab>
+ )}
+ </Link>
+ <Link to="/organization/settings">
+ {({ isActive }) => (
+ <Tab variant="org" value={isActive ? "selected" : ""}>
+ Settings
+ </Tab>
+ )}
+ </Link>
+ <Link to="/organization/billing">
+ {({ isActive }) => (
+ <Tab variant="org" value={isActive ? "selected" : ""}>
+ Usage & Billing
+ </Tab>
+ )}
+ </Link>
+ <Link className="mr-auto" to="/organization/secret-sharing">
+ {({ isActive }) => (
+ <Tab value={isActive ? "selected" : ""} variant="org">
+ Secret Sharing
+ </Tab>
+ )}
+ </Link>
+ </TabList>
+ </Tabs>
+ </nav>
+ </motion.div>
+ </div>
+ )}
+ <CreateOrgModal
+ isOpen={popUp?.createOrg?.isOpen}
+ onClose={() => handlePopUpToggle("createOrg", false)}
+ />
+ </>
+ );
+};
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/index.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/index.tsx
new file mode 100644
index 0000000000..06509e9195
--- /dev/null
+++ b/frontend/src/layouts/OrganizationLayout/components/OrgNavBar/index.tsx
@@ -0,0 +1 @@
+export { OrgNavBar } from "./OrgNavBar";
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSidebar.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSidebar.tsx
deleted file mode 100644
index 51e14721e4..0000000000
--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSidebar.tsx
+++ /dev/null
@@ -1,214 +0,0 @@
-import {
- faBook,
- faCog,
- faInfinity,
- faMoneyBill,
- faNetworkWired,
- faPlug,
- faShare,
- faTable,
- faUsers,
- faUserTie
-} from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link } from "@tanstack/react-router";
-import { AnimatePresence, motion } from "framer-motion";
-
-import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
-import { Menu, MenuGroup, MenuItem, Tooltip } from "@app/components/v2";
-import { useOrganization, useSubscription, useUser } from "@app/context";
-import { usePopUp } from "@app/hooks";
-import { useGetOrgTrialUrl } from "@app/hooks/api";
-
-type Props = {
- isHidden?: boolean;
-};
-
-export const OrgSidebar = ({ isHidden }: Props) => {
- const { subscription } = useSubscription();
-
- const { user } = useUser();
- const { mutateAsync } = useGetOrgTrialUrl();
-
- const { currentOrg } = useOrganization();
-
- const { popUp, handlePopUpToggle } = usePopUp(["createOrg"] as const);
-
- return (
- <>
- <AnimatePresence mode="popLayout">
- {!isHidden && (
- <motion.aside
- key="org-sidebar"
- transition={{ duration: 0.3 }}
- initial={{ opacity: 0, translateX: -240 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: -240 }}
- layout
- className="dark z-10 w-60 border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-800 to-mineshaft-900"
- >
- <nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
- <Menu>
- <MenuGroup title="Overview">
- <Link to="/organization/projects">
- {({ isActive }) => (
- <MenuItem variant="org" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faTable} />
- </div>
- Overview
- </div>
- </MenuItem>
- )}
- </Link>
- <Link to="/organization/access-management">
- {({ isActive }) => (
- <MenuItem variant="org" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faUsers} />
- </div>
- Organization Access
- </div>
- </MenuItem>
- )}
- </Link>
- <Link to="/organization/billing">
- {({ isActive }) => (
- <MenuItem variant="org" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faMoneyBill} className="mr-4" />
- </div>
- Usage & Billing
- </div>
- </MenuItem>
- )}
- </Link>
- <Link to="/organization/audit-logs">
- {({ isActive }) => (
- <MenuItem variant="org" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faBook} className="mr-4" />
- </div>
- Audit Logs
- </div>
- </MenuItem>
- )}
- </Link>
- <Link to="/organization/settings">
- {({ isActive }) => (
- <MenuItem variant="org" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCog} className="mr-4" />
- </div>
- Organization Settings
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- <MenuGroup title="Resources">
- <Link to="/organization/app-connections">
- {({ isActive }) => (
- <MenuItem variant="org" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faPlug} className="mr-4" />
- </div>
- App Connections
- </div>
- </MenuItem>
- )}
- </Link>
- <Link to="/organization/networking">
- {({ isActive }) => (
- <MenuItem variant="org" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faNetworkWired} className="mr-4" />
- </div>
- Networking
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- </Menu>
- <div className="grow" />
- <Menu>
- {subscription &&
- subscription.slug === "starter" &&
- !subscription.has_used_trial && (
- <Tooltip content="Start Free Pro Trial">
- <MenuItem
- variant="org"
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <FontAwesomeIcon
- className="mx-1 inline-block shrink-0"
- icon={faInfinity}
- />
- }
- onClick={async () => {
- if (!subscription || !currentOrg) return;
-
- // direct user to start pro trial
- const url = await mutateAsync({
- orgId: currentOrg.id,
- success_url: window.location.href
- });
-
- window.location.href = url;
- }}
- >
- Pro Trial
- </MenuItem>
- </Tooltip>
- )}
- <Link to="/organization/secret-sharing">
- <MenuItem
- variant="org"
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <div className="w-6">
- <FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faShare} />
- </div>
- }
- >
- Share Secret
- </MenuItem>
- </Link>
- {user.superAdmin && (
- <Link to="/admin">
- <MenuItem
- variant="org"
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <div className="w-6">
- <FontAwesomeIcon
- className="mx-1 inline-block shrink-0"
- icon={faUserTie}
- />
- </div>
- }
- >
- Server Console
- </MenuItem>
- </Link>
- )}
- </Menu>
- </nav>
- </motion.aside>
- )}
- </AnimatePresence>
- <CreateOrgModal
- isOpen={popUp?.createOrg?.isOpen}
- onClose={() => handlePopUpToggle("createOrg", false)}
- />
- </>
- );
-};
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/index.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/index.tsx
deleted file mode 100644
index 315d7ffab7..0000000000
--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/index.tsx
+++ /dev/null
@@ -1 +0,0 @@
-export { OrgSidebar } from "./OrgSidebar";
diff --git a/frontend/src/layouts/PamLayout/PamLayout.tsx b/frontend/src/layouts/PamLayout/PamLayout.tsx
index 48f6af1164..1a0564a251 100644
--- a/frontend/src/layouts/PamLayout/PamLayout.tsx
+++ b/frontend/src/layouts/PamLayout/PamLayout.tsx
@@ -1,19 +1,11 @@
import { useEffect } from "react";
-import {
- faBook,
- faBoxOpen,
- faCog,
- faDisplay,
- faHome,
- faUser,
- faUsers
-} from "@fortawesome/free-solid-svg-icons";
+import { faArrowLeft, faGlobe } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link, Outlet } from "@tanstack/react-router";
+import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-motion";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
-import { Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
+import { Tab, TabList, Tabs } from "@app/components/v2";
import { useProject, useProjectPermission, useSubscription } from "@app/context";
import { usePopUp } from "@app/hooks";
@@ -23,7 +15,7 @@ export const PamLayout = () => {
const { currentProject } = useProject();
const { subscription } = useSubscription();
const { assumedPrivilegeDetails } = useProjectPermission();
-
+ const location = useLocation();
const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["upgradePlan"]);
useEffect(() => {
@@ -35,152 +27,91 @@ export const PamLayout = () => {
return (
<>
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
- <div className="flex grow flex-col overflow-y-hidden md:flex-row">
+ <div className="border-b border-mineshaft-600 bg-mineshaft-900">
<motion.div
key="menu-project-items"
initial={{ x: -150 }}
animate={{ x: 0 }}
exit={{ x: -150 }}
transition={{ duration: 0.2 }}
- className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
+ className="px-4"
>
- <nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
- <div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
- <Lottie className="inline-block h-5 w-5 shrink-0" icon="groups" />
- PAM
- </div>
- <div className="flex-1">
- <Menu>
- <MenuGroup title="Resources">
- <Link
- to="/projects/pam/$projectId/accounts"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faUser} />
- </div>
- Accounts
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/pam/$projectId/resources"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faBoxOpen} />
- </div>
- Resources
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/pam/$projectId/sessions"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faDisplay} />
- </div>
- Sessions
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- <MenuGroup title="Others">
- <Link
- to="/projects/pam/$projectId/access-management"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faUsers} />
- </div>
- Project Access
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/pam/$projectId/audit-logs"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faBook} />
- </div>
- Audit Logs
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/pam/$projectId/settings"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCog} />
- </div>
- Project Settings
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- </Menu>
- </div>
- <div>
- <Menu>
+ <nav className="w-full">
+ <Tabs value="selected">
+ <TabList className="border-b-0">
<Link to="/organization/projects">
- <MenuItem
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <div className="w-6">
- <FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
- </div>
- }
- >
- Organization Home
- </MenuItem>
+ <Tab value="back" className="flex gap-x-2">
+ <FontAwesomeIcon icon={faGlobe} />
+ <FontAwesomeIcon icon={faArrowLeft} />
+ </Tab>
+ </Link>
+ <Link
+ to="/projects/pam/$projectId/accounts"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Accounts</Tab>}
+ </Link>
+ <Link
+ to="/projects/pam/$projectId/resources"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Resources</Tab>}
+ </Link>
+ <Link
+ to="/projects/pam/$projectId/sessions"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Sessions</Tab>}
</Link>
- </Menu>
- </div>
+ <Link
+ to="/projects/pam/$projectId/access-management"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={
+ isActive ||
+ location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
+ ? "selected"
+ : ""
+ }
+ >
+ Access Control
+ </Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/pam/$projectId/audit-logs"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
+ </Link>
+ <Link
+ to="/projects/pam/$projectId/settings"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
+ </Link>
+ </TabList>
+ </Tabs>
</nav>
</motion.div>
- <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
- {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
- <Outlet />
- </div>
+ </div>
+ {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
+ <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
+ <Outlet />
</div>
</div>
<UpgradePlanModal
diff --git a/frontend/src/layouts/PkiManagerLayout/PkiManagerLayout.tsx b/frontend/src/layouts/PkiManagerLayout/PkiManagerLayout.tsx
index 93fa04ac93..bd0bb79348 100644
--- a/frontend/src/layouts/PkiManagerLayout/PkiManagerLayout.tsx
+++ b/frontend/src/layouts/PkiManagerLayout/PkiManagerLayout.tsx
@@ -1,23 +1,10 @@
import { useTranslation } from "react-i18next";
-import {
- faBell,
- faBook,
- faCertificate,
- faCog,
- faFileLines,
- faHome,
- faMobile,
- faPlug,
- faPuzzlePiece,
- faSitemap,
- faStamp,
- faUsers
-} from "@fortawesome/free-solid-svg-icons";
+import { faArrowLeft, faGlobe, faMobile } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link, Outlet } from "@tanstack/react-router";
+import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-motion";
-import { Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
+import { Tab, TabList, Tabs } from "@app/components/v2";
import { useProject, useProjectPermission } from "@app/context";
import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePrivilegeModeBanner";
@@ -27,223 +14,145 @@ export const PkiManagerLayout = () => {
const { assumedPrivilegeDetails } = useProjectPermission();
const { t } = useTranslation();
+ const location = useLocation();
return (
<>
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
- <div className="flex grow flex-col overflow-y-hidden md:flex-row">
+ <div className="border-b border-mineshaft-600 bg-mineshaft-900">
<motion.div
key="menu-project-items"
initial={{ x: -150 }}
animate={{ x: 0 }}
exit={{ x: -150 }}
transition={{ duration: 0.2 }}
- className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
+ className="px-4"
>
- <nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
- <div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
- <Lottie className="inline-block h-5 w-5 shrink-0" icon="note" />
- PKI Manager
- </div>
- <div className="flex-1">
- <Menu>
- <MenuGroup title="Resources">
- <Link
- to="/projects/cert-management/$projectId/subscribers"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faSitemap} />
- </div>
- Subscribers
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/cert-management/$projectId/certificate-templates"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faFileLines} />
- </div>
- Certificate Templates
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/cert-management/$projectId/certificates"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCertificate} />
- </div>
- Certificates
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/cert-management/$projectId/certificate-authorities"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faStamp} />
- </div>
- Certificates Authority
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/cert-management/$projectId/alerting"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faBell} />
- </div>
- Alerting
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/cert-management/$projectId/integrations"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faPuzzlePiece} />
- </div>
- Integrations
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/cert-management/$projectId/app-connections"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faPlug} />
- </div>
- App Connections
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- <MenuGroup title="Others">
- <Link
- to="/projects/cert-management/$projectId/access-management"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faUsers} />
- </div>
- Project Access
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/cert-management/$projectId/audit-logs"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faBook} />
- </div>
- Audit Logs
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/cert-management/$projectId/settings"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCog} />
- </div>
- Project Settings
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- </Menu>
- </div>
- <div>
- <Menu>
+ <nav className="w-full">
+ <Tabs value="selected">
+ <TabList className="border-b-0">
<Link to="/organization/projects">
- <MenuItem
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <div className="w-6">
- <FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
- </div>
- }
- >
- Organization Home
- </MenuItem>
+ <Tab value="back" className="flex gap-x-2">
+ <FontAwesomeIcon icon={faGlobe} />
+ <FontAwesomeIcon icon={faArrowLeft} />
+ </Tab>
</Link>
- </Menu>
- </div>
+ <Link
+ to="/projects/cert-management/$projectId/subscribers"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Subscribers</Tab>}
+ </Link>
+ <Link
+ to="/projects/cert-management/$projectId/certificate-templates"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab value={isActive ? "selected" : ""}>Certificate Templates</Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/cert-management/$projectId/certificates"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={
+ isActive || location.pathname.match(/\/pki-collections\//)
+ ? "selected"
+ : ""
+ }
+ >
+ Certificates
+ </Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/cert-management/$projectId/certificate-authorities"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab value={isActive || location.pathname.match(/\/ca\//) ? "selected" : ""}>
+ Certificate Authorities
+ </Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/cert-management/$projectId/alerting"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Alerting</Tab>}
+ </Link>
+ <Link
+ to="/projects/cert-management/$projectId/integrations"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Integrations</Tab>}
+ </Link>
+ <Link
+ to="/projects/cert-management/$projectId/app-connections"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab value={isActive ? "selected" : ""}>App Connections</Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/cert-management/$projectId/audit-logs"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
+ </Link>
+ <Link
+ to="/projects/cert-management/$projectId/access-management"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={
+ isActive ||
+ location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
+ ? "selected"
+ : ""
+ }
+ >
+ Access Control
+ </Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/cert-management/$projectId/settings"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
+ </Link>
+ </TabList>
+ </Tabs>
</nav>
</motion.div>
- <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
- {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
- <Outlet />
- </div>
+ </div>
+ {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
+ <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
+ <Outlet />
</div>
</div>
<div className="z-200 flex h-screen w-screen flex-col items-center justify-center bg-bunker-800 md:hidden">
diff --git a/frontend/src/layouts/ProjectLayout/components/AssumePrivilegeModeBanner/AssumePrivilegeModeBanner.tsx b/frontend/src/layouts/ProjectLayout/components/AssumePrivilegeModeBanner/AssumePrivilegeModeBanner.tsx
index 71af774ca6..45978e3d7c 100644
--- a/frontend/src/layouts/ProjectLayout/components/AssumePrivilegeModeBanner/AssumePrivilegeModeBanner.tsx
+++ b/frontend/src/layouts/ProjectLayout/components/AssumePrivilegeModeBanner/AssumePrivilegeModeBanner.tsx
@@ -15,7 +15,7 @@ export const AssumePrivilegeModeBanner = () => {
if (!assumedPrivilegeDetails) return null;
return (
- <div className="z-10 -mx-4 flex items-center justify-center gap-2 rounded-sm border border-mineshaft-600 bg-primary-400 p-2 text-mineshaft-800 shadow-sm">
+ <div className="flex w-full items-center border-b border-yellow/50 bg-yellow/30 px-4 py-2 text-sm text-yellow-200">
<div>
<FontAwesomeIcon icon={faInfoCircle} className="mr-2" />
You are currently viewing the project with privileges of{" "}
@@ -24,7 +24,7 @@ export const AssumePrivilegeModeBanner = () => {
{assumedPrivilegeDetails?.actorName}
</b>
</div>
- <div>
+ <div className="ml-auto">
<Button
size="xs"
variant="outline_bg"
diff --git a/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx b/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx
index a35c3ab55c..6a1dba4b5f 100644
--- a/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx
+++ b/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx
@@ -99,26 +99,21 @@ export const ProjectSelect = () => {
}, [projects, projectFavorites, currentWorkspace]);
return (
- <div className="-mr-2 flex w-full items-center gap-1">
+ <div className="mr-2 flex items-center gap-1 overflow-hidden">
<DropdownMenu modal={false}>
<Link
to={getProjectHomePage(currentWorkspace.type, currentWorkspace.environments)}
params={{
projectId: currentWorkspace.id
}}
+ className="overflow-hidden"
>
- <div className="relative flex cursor-pointer items-center gap-2 text-sm text-white duration-100 hover:text-primary">
- <Tooltip content={currentWorkspace.name} className="max-w-96 break-words">
- <Badge
- variant="project"
- className="max-w-44 overflow-hidden text-sm text-ellipsis whitespace-nowrap"
- >
- <FontAwesomeIcon icon={faCube} />
-
- {currentWorkspace?.name}
- </Badge>
- </Tooltip>
- </div>
+ <Tooltip content={currentWorkspace.name} className="max-w-96 break-words">
+ <Badge variant="project" className="max-w-full min-w-0 text-sm">
+ <FontAwesomeIcon icon={faCube} />
+ <p className="truncate">{currentWorkspace?.name}</p>
+ </Badge>
+ </Tooltip>
</Link>
<DropdownMenuTrigger asChild>
<div>
diff --git a/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx b/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx
index e986d87c3d..7fcd3d79c2 100644
--- a/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx
+++ b/frontend/src/layouts/SecretManagerLayout/SecretManagerLayout.tsx
@@ -1,21 +1,10 @@
import { useTranslation } from "react-i18next";
-import {
- faArrowsSpin,
- faBook,
- faCheckToSlot,
- faCog,
- faHome,
- faMobile,
- faPlug,
- faPuzzlePiece,
- faUsers,
- faVault
-} from "@fortawesome/free-solid-svg-icons";
+import { faArrowLeft, faGlobe, faMobile } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-motion";
-import { Badge, Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
+import { Badge, Tab, TabList, Tabs } from "@app/components/v2";
import { useProject, useProjectPermission } from "@app/context";
import {
useGetAccessRequestsCount,
@@ -28,10 +17,10 @@ import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePri
export const SecretManagerLayout = () => {
const { currentProject, projectId } = useProject();
const { assumedPrivilegeDetails } = useProjectPermission();
+ const location = useLocation();
const { t } = useTranslation();
const projectSlug = currentProject?.slug || "";
- const location = useLocation();
const { data: secretApprovalReqCount } = useGetSecretApprovalRequestCount({
projectId
@@ -54,208 +43,137 @@ export const SecretManagerLayout = () => {
return (
<>
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
- <div className="flex grow flex-col overflow-y-hidden md:flex-row">
+ <div className="border-b border-mineshaft-600 bg-mineshaft-900">
<motion.div
key="menu-project-items"
initial={{ x: -150 }}
animate={{ x: 0 }}
exit={{ x: -150 }}
transition={{ duration: 0.2 }}
- className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
+ className="px-4"
>
- <nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
- <div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
- <Lottie className="inline-block h-5 w-5 shrink-0" icon="vault" />
- Secrets Manager
- </div>
- <div className="flex-1">
- <Menu>
- <MenuGroup title="Resources">
- <Link
- to="/projects/secret-management/$projectId/overview"
- params={{
- projectId: currentProject.id,
- ...(currentProject.environments.length
- ? { envSlug: currentProject.environments[0]?.slug }
- : {})
- }}
- >
- {({ isActive }) => (
- <MenuItem
- variant="project"
- isSelected={
- isActive ||
- location.pathname.startsWith(
- `/projects/secret-management/${currentProject.id}/overview`
- )
- }
- >
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faVault} />
- </div>
- Secrets
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/secret-management/$projectId/integrations"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faPuzzlePiece} />
- </div>
- Integrations
- </div>
- </MenuItem>
- )}
- </Link>
- {Boolean(secretRotations?.length) && (
- <Link
- to="/projects/secret-management/$projectId/secret-rotation"
- params={{
- projectId: currentProject.id
- }}
+ <nav className="w-full">
+ <Tabs value="selected">
+ <TabList className="border-b-0">
+ <Link to="/organization/projects">
+ <Tab value="back" className="flex gap-x-2">
+ <FontAwesomeIcon icon={faGlobe} />
+ <FontAwesomeIcon icon={faArrowLeft} />
+ </Tab>
+ </Link>
+ <Link
+ to="/projects/secret-management/$projectId/overview"
+ params={{
+ projectId: currentProject.id,
+ ...(currentProject.environments.length
+ ? { envSlug: currentProject.environments[0]?.slug }
+ : {})
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={
+ isActive || location.pathname.match(/\/secrets\/|\/commits\//)
+ ? "selected"
+ : ""
+ }
>
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faArrowsSpin} />
- </div>
- Secret Rotations
- </div>
- </MenuItem>
- )}
- </Link>
+ Overview
+ </Tab>
)}
+ </Link>
+ <Link
+ to="/projects/secret-management/$projectId/integrations"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Integrations</Tab>}
+ </Link>
+ {Boolean(secretRotations?.length) && (
<Link
- to="/projects/secret-management/$projectId/approval"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCheckToSlot} />
- </div>
- Approvals
- {Boolean(
- secretApprovalReqCount?.open ||
- accessApprovalRequestCount?.pendingCount
- ) && (
- <Badge variant="primary" className="ml-1.5">
- {pendingRequestsCount}
- </Badge>
- )}
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/secret-management/$projectId/app-connections"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faPlug} />
- </div>
- App Connections
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- <MenuGroup title="Others">
- <Link
- to="/projects/secret-management/$projectId/access-management"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faUsers} />
- </div>
- Project Access
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/secret-management/$projectId/audit-logs"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faBook} />
- </div>
- Audit Logs
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/secret-management/$projectId/settings"
+ to="/projects/secret-management/$projectId/secret-rotation"
params={{
projectId: currentProject.id
}}
>
{({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCog} />
- </div>
- Project Settings
- </div>
- </MenuItem>
+ <Tab value={isActive ? "selected" : ""}>Secret Rotations</Tab>
)}
</Link>
- </MenuGroup>
- </Menu>
- </div>
- <div>
- <Menu>
- <Link to="/organization/projects">
- <MenuItem
- variant="project"
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <div className="w-6">
- <FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
- </div>
- }
- >
- Organization Home
- </MenuItem>
+ )}
+ <Link
+ to="/projects/secret-management/$projectId/app-connections"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab value={isActive ? "selected" : ""}>App Connections</Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/secret-management/$projectId/approval"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab value={isActive ? "selected" : ""}>
+ Approvals
+ {Boolean(
+ secretApprovalReqCount?.open || accessApprovalRequestCount?.pendingCount
+ ) && (
+ <Badge variant="primary" className="ml-1.5">
+ {pendingRequestsCount}
+ </Badge>
+ )}
+ </Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/secret-management/$projectId/audit-logs"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
+ </Link>
+ <Link
+ to="/projects/secret-management/$projectId/access-management"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={
+ isActive ||
+ location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
+ ? "selected"
+ : ""
+ }
+ >
+ Access Control
+ </Tab>
+ )}
</Link>
- </Menu>
- </div>
+ <Link
+ to="/projects/secret-management/$projectId/settings"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
+ </Link>
+ </TabList>
+ </Tabs>
</nav>
</motion.div>
- <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
- {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
- <Outlet />
- </div>
+ </div>
+ {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
+ <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
+ <Outlet />
</div>
</div>
<div className="z-200 flex h-screen w-screen flex-col items-center justify-center bg-bunker-800 md:hidden">
diff --git a/frontend/src/layouts/SecretScanningLayout/SecretScanningLayout.tsx b/frontend/src/layouts/SecretScanningLayout/SecretScanningLayout.tsx
index b4c79786b9..b385f1bd55 100644
--- a/frontend/src/layouts/SecretScanningLayout/SecretScanningLayout.tsx
+++ b/frontend/src/layouts/SecretScanningLayout/SecretScanningLayout.tsx
@@ -1,17 +1,9 @@
-import {
- faBook,
- faCog,
- faDatabase,
- faHome,
- faMagnifyingGlass,
- faPlug,
- faUsers
-} from "@fortawesome/free-solid-svg-icons";
+import { faArrowLeft, faGlobe } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link, Outlet } from "@tanstack/react-router";
+import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-motion";
-import { Badge, Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
+import { Badge, Tab, TabList, Tabs } from "@app/components/v2";
import {
ProjectPermissionSub,
useProject,
@@ -29,6 +21,7 @@ export const SecretScanningLayout = () => {
const { permission } = useProjectPermission();
const { subscription } = useSubscription();
+ const location = useLocation();
const { data: unresolvedFindings } = useGetSecretScanningUnresolvedFindingCount(
currentProject.id,
@@ -45,158 +38,101 @@ export const SecretScanningLayout = () => {
return (
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
- <div className="flex grow flex-col overflow-y-hidden md:flex-row">
+ <div className="border-b border-mineshaft-600 bg-mineshaft-900">
<motion.div
key="menu-project-items"
initial={{ x: -150 }}
animate={{ x: 0 }}
exit={{ x: -150 }}
transition={{ duration: 0.2 }}
- className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
+ className="px-4"
>
- <nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
- <div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
- <Lottie className="inline-block h-5 w-5 shrink-0" icon="secret-scan" />
- Secret Scanning
- </div>
- <div className="flex-1">
- <Menu>
- <MenuGroup title="Resources">
- <Link
- to="/projects/secret-scanning/$projectId/data-sources"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faDatabase} />
- </div>
- Data Sources
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/secret-scanning/$projectId/findings"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex w-full gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faMagnifyingGlass} />
- </div>
- <span>Findings</span>
- {Boolean(unresolvedFindings) && (
- <Badge variant="primary" className="mr-2 ml-auto h-min">
- {unresolvedFindings}
- </Badge>
- )}
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/secret-scanning/$projectId/app-connections"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faPlug} />
- </div>
- App Connections
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- <MenuGroup title="Others">
- <Link
- to="/projects/secret-scanning/$projectId/access-management"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faUsers} />
- </div>
- Project Access
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/secret-scanning/$projectId/audit-logs"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faBook} />
- </div>
- Audit Logs
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/secret-scanning/$projectId/settings"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCog} />
- </div>
- Project Settings
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- </Menu>
- </div>
- <div>
- <Menu>
+ <nav className="w-full">
+ <Tabs value="selected">
+ <TabList className="border-b-0">
<Link to="/organization/projects">
- <MenuItem
- variant="project"
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <div className="w-6">
- <FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
- </div>
- }
- >
- Organization Home
- </MenuItem>
+ <Tab value="back" className="flex gap-x-2">
+ <FontAwesomeIcon icon={faGlobe} />
+ <FontAwesomeIcon icon={faArrowLeft} />
+ </Tab>
+ </Link>
+ <Link
+ to="/projects/secret-scanning/$projectId/data-sources"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Data Sources</Tab>}
+ </Link>
+ <Link
+ to="/projects/secret-scanning/$projectId/findings"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab value={isActive ? "selected" : ""}>
+ Findings
+ {Boolean(unresolvedFindings) && (
+ <Badge variant="primary" className="ml-2 h-min">
+ {unresolvedFindings}
+ </Badge>
+ )}
+ </Tab>
+ )}
</Link>
- </Menu>
- </div>
+ <Link
+ to="/projects/secret-scanning/$projectId/app-connections"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>App Connections</Tab>}
+ </Link>
+
+ <Link
+ to="/projects/secret-scanning/$projectId/audit-logs"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
+ </Link>
+ <Link
+ to="/projects/secret-scanning/$projectId/access-management"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={
+ isActive ||
+ location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
+ ? "selected"
+ : ""
+ }
+ >
+ Access Control
+ </Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/secret-scanning/$projectId/settings"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
+ </Link>
+ </TabList>
+ </Tabs>
</nav>
</motion.div>
- <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
- {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
- <Outlet />
- </div>
+ </div>
+ {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
+ <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
+ <Outlet />
</div>
</div>
);
diff --git a/frontend/src/layouts/SshLayout/SshLayout.tsx b/frontend/src/layouts/SshLayout/SshLayout.tsx
index 0d68a75489..c6e3c8b3ee 100644
--- a/frontend/src/layouts/SshLayout/SshLayout.tsx
+++ b/frontend/src/layouts/SshLayout/SshLayout.tsx
@@ -1,17 +1,10 @@
-import {
- faBook,
- faCog,
- faHome,
- faServer,
- faStamp,
- faUsers
-} from "@fortawesome/free-solid-svg-icons";
+import { faArrowLeft, faGlobe } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { Link, Outlet } from "@tanstack/react-router";
+import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-motion";
import { ProjectPermissionCan } from "@app/components/permissions";
-import { Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
+import { Tab, TabList, Tabs } from "@app/components/v2";
import {
ProjectPermissionActions,
ProjectPermissionSub,
@@ -24,149 +17,110 @@ import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePri
export const SshLayout = () => {
const { currentProject } = useProject();
const { assumedPrivilegeDetails } = useProjectPermission();
+ const location = useLocation();
return (
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
- <div className="flex grow flex-col overflow-y-hidden md:flex-row">
+ <div className="border-b border-mineshaft-600 bg-mineshaft-900">
<motion.div
key="menu-project-items"
initial={{ x: -150 }}
animate={{ x: 0 }}
exit={{ x: -150 }}
transition={{ duration: 0.2 }}
- className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
+ className="px-4"
>
- <nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
- <div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
- <Lottie className="inline-block h-5 w-5 shrink-0" icon="terminal" />
- SSH
- </div>
- <div className="flex-1">
- <Menu>
- <MenuGroup title="Resources">
- <Link
- to="/projects/ssh/$projectId/overview"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faServer} />
- </div>
- Hosts
- </div>
- </MenuItem>
- )}
- </Link>
- <ProjectPermissionCan
- I={ProjectPermissionActions.Read}
- a={ProjectPermissionSub.SshCertificateAuthorities}
- >
- {(isAllowed) =>
- isAllowed && (
- <Link
- to="/projects/ssh/$projectId/cas"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faStamp} />
- </div>
- Certificates Authority
- </div>
- </MenuItem>
- )}
- </Link>
- )
- }
- </ProjectPermissionCan>
- </MenuGroup>
-
- <MenuGroup title="Others">
- <Link
- to="/projects/ssh/$projectId/access-management"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faUsers} />
- </div>
- Project Access
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/ssh/$projectId/audit-logs"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faBook} />
- </div>
- Audit Logs
- </div>
- </MenuItem>
- )}
- </Link>
- <Link
- to="/projects/ssh/$projectId/settings"
- params={{
- projectId: currentProject.id
- }}
- >
- {({ isActive }) => (
- <MenuItem variant="project" isSelected={isActive}>
- <div className="mx-1 flex gap-2">
- <div className="w-6">
- <FontAwesomeIcon icon={faCog} />
- </div>
- Project Settings
- </div>
- </MenuItem>
- )}
- </Link>
- </MenuGroup>
- </Menu>
- </div>
- <div>
- <Menu>
+ <nav className="w-full">
+ <Tabs value="selected">
+ <TabList className="border-b-0">
<Link to="/organization/projects">
- <MenuItem
- variant="project"
- className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
- leftIcon={
- <div className="w-6">
- <FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
- </div>
- }
- >
- Organization Home
- </MenuItem>
+ <Tab value="back" className="flex gap-x-2">
+ <FontAwesomeIcon icon={faGlobe} />
+ <FontAwesomeIcon icon={faArrowLeft} />
+ </Tab>
+ </Link>
+ <Link
+ to="/projects/ssh/$projectId/overview"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={
+ isActive || location.pathname.match(/\/ssh-host-groups\//) ? "selected" : ""
+ }
+ >
+ Hosts
+ </Tab>
+ )}
+ </Link>
+ <ProjectPermissionCan
+ I={ProjectPermissionActions.Read}
+ a={ProjectPermissionSub.SshCertificateAuthorities}
+ >
+ {(isAllowed) =>
+ isAllowed && (
+ <Link
+ to="/projects/ssh/$projectId/cas"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={isActive || location.pathname.match(/\/ca\//) ? "selected" : ""}
+ >
+ Certificate Authorities
+ </Tab>
+ )}
+ </Link>
+ )
+ }
+ </ProjectPermissionCan>
+ <Link
+ to="/projects/ssh/$projectId/audit-logs"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
</Link>
- </Menu>
- </div>
+ <Link
+ to="/projects/ssh/$projectId/access-management"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => (
+ <Tab
+ value={
+ isActive ||
+ location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
+ ? "selected"
+ : ""
+ }
+ >
+ Access Control
+ </Tab>
+ )}
+ </Link>
+ <Link
+ to="/projects/ssh/$projectId/settings"
+ params={{
+ projectId: currentProject.id
+ }}
+ >
+ {({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
+ </Link>
+ </TabList>
+ </Tabs>
</nav>
</motion.div>
- <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
- {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
- <Outlet />
- </div>
+ </div>
+ {assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
+ <div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
+ <Outlet />
</div>
</div>
);
diff --git a/frontend/src/pages/admin/AccessManagementPage/AccessManagementPage.tsx b/frontend/src/pages/admin/AccessManagementPage/AccessManagementPage.tsx
index 0bc494ae2a..3dbfd365ee 100644
--- a/frontend/src/pages/admin/AccessManagementPage/AccessManagementPage.tsx
+++ b/frontend/src/pages/admin/AccessManagementPage/AccessManagementPage.tsx
@@ -13,8 +13,8 @@ export const AccessManagementPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Access Control" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="instance"
title="Access Control"
diff --git a/frontend/src/pages/admin/AuthenticationPage/AuthenticationPage.tsx b/frontend/src/pages/admin/AuthenticationPage/AuthenticationPage.tsx
index f1c88f4cf8..2a175728fc 100644
--- a/frontend/src/pages/admin/AuthenticationPage/AuthenticationPage.tsx
+++ b/frontend/src/pages/admin/AuthenticationPage/AuthenticationPage.tsx
@@ -13,8 +13,8 @@ export const AuthenticationPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Admin" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="instance"
title="Authentication"
diff --git a/frontend/src/pages/admin/CachingPage/CachingPage.tsx b/frontend/src/pages/admin/CachingPage/CachingPage.tsx
index 96592d2840..2f187a0644 100644
--- a/frontend/src/pages/admin/CachingPage/CachingPage.tsx
+++ b/frontend/src/pages/admin/CachingPage/CachingPage.tsx
@@ -13,8 +13,8 @@ export const CachingPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Admin" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="instance"
title="Caching"
diff --git a/frontend/src/pages/admin/EncryptionPage/EncryptionPage.tsx b/frontend/src/pages/admin/EncryptionPage/EncryptionPage.tsx
index 45b40c6218..dd729b1e57 100644
--- a/frontend/src/pages/admin/EncryptionPage/EncryptionPage.tsx
+++ b/frontend/src/pages/admin/EncryptionPage/EncryptionPage.tsx
@@ -13,8 +13,8 @@ export const EncryptionPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Admin" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="instance"
title="Encryption"
diff --git a/frontend/src/pages/admin/EnvironmentPage/EnvironmentPage.tsx b/frontend/src/pages/admin/EnvironmentPage/EnvironmentPage.tsx
index 1c0409c00d..db3edc4c9a 100644
--- a/frontend/src/pages/admin/EnvironmentPage/EnvironmentPage.tsx
+++ b/frontend/src/pages/admin/EnvironmentPage/EnvironmentPage.tsx
@@ -13,8 +13,8 @@ export const EnvironmentPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Admin" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="instance"
title="Environment Variables"
diff --git a/frontend/src/pages/admin/GeneralPage/GeneralPage.tsx b/frontend/src/pages/admin/GeneralPage/GeneralPage.tsx
index 1025bf093c..3901471a1b 100644
--- a/frontend/src/pages/admin/GeneralPage/GeneralPage.tsx
+++ b/frontend/src/pages/admin/GeneralPage/GeneralPage.tsx
@@ -15,8 +15,8 @@ export const GeneralPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Admin" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="instance"
title="General"
diff --git a/frontend/src/pages/admin/IntegrationsPage/IntegrationsPage.tsx b/frontend/src/pages/admin/IntegrationsPage/IntegrationsPage.tsx
index d62842482e..e41b3715e8 100644
--- a/frontend/src/pages/admin/IntegrationsPage/IntegrationsPage.tsx
+++ b/frontend/src/pages/admin/IntegrationsPage/IntegrationsPage.tsx
@@ -13,8 +13,8 @@ export const IntegrationsPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Admin" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="instance"
title="Integrations"
diff --git a/frontend/src/pages/admin/ResourceOverviewPage/ResourceOverviewPage.tsx b/frontend/src/pages/admin/ResourceOverviewPage/ResourceOverviewPage.tsx
index 5c700fc9de..eab91ef047 100644
--- a/frontend/src/pages/admin/ResourceOverviewPage/ResourceOverviewPage.tsx
+++ b/frontend/src/pages/admin/ResourceOverviewPage/ResourceOverviewPage.tsx
@@ -13,18 +13,24 @@ export const ResourceOverviewPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "Resource Overview" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="instance"
title="Resource Overview"
description="Manage resources within your Infisical instance."
/>
- <Tabs defaultValue="tab-organizations">
+ <Tabs orientation="vertical" defaultValue="tab-organizations">
<TabList>
- <Tab value="tab-organizations">Organizations</Tab>
- <Tab value="tab-users">Users</Tab>
- <Tab value="tab-identities">Identities</Tab>
+ <Tab variant="instance" value="tab-organizations">
+ Organizations
+ </Tab>
+ <Tab variant="instance" value="tab-users">
+ Users
+ </Tab>
+ <Tab variant="instance" value="tab-identities">
+ Identities
+ </Tab>
</TabList>
<TabPanel value="tab-organizations">
<OrganizationsTable />
diff --git a/frontend/src/pages/cert-manager/AlertingPage/AlertingPage.tsx b/frontend/src/pages/cert-manager/AlertingPage/AlertingPage.tsx
index 9921ea306f..9a9e45644e 100644
--- a/frontend/src/pages/cert-manager/AlertingPage/AlertingPage.tsx
+++ b/frontend/src/pages/cert-manager/AlertingPage/AlertingPage.tsx
@@ -10,11 +10,11 @@ import { PkiAlertsSection } from "./components";
export const AlertingPage = () => {
const { t } = useTranslation();
return (
- <div className="container mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
<Helmet>
<title>{t("common.head-title", { title: "Alerting" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Alerting"
diff --git a/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/CertAuthDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/CertAuthDetailsByIDPage.tsx
index 8bfdcaccaf..80bd2e6581 100644
--- a/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/CertAuthDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/CertAuthDetailsByIDPage/CertAuthDetailsByIDPage.tsx
@@ -1,5 +1,7 @@
import { Helmet } from "react-helmet";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
@@ -84,10 +86,20 @@ const Page = () => {
};
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
- <PageHeader scope="project" title={data.name}>
+ <div className="mx-auto mb-6 w-full max-w-8xl">
+ <Link
+ to="/projects/cert-management/$projectId/certificate-authorities"
+ params={{
+ projectId
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Certificate Authorities
+ </Link>
+ <PageHeader scope="project" description="Manage certificate authority" title={data.name}>
<DropdownMenu>
<DropdownMenuTrigger asChild className="rounded-lg">
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/CertificateAuthoritiesPage.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/CertificateAuthoritiesPage.tsx
index 7e2c9fd701..9af497262f 100644
--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/CertificateAuthoritiesPage.tsx
+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/CertificateAuthoritiesPage.tsx
@@ -11,11 +11,11 @@ import { CaSection } from "./components";
export const CertificateAuthoritiesPage = () => {
const { t } = useTranslation();
return (
- <div className="container mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
<Helmet>
<title>{t("common.head-title", { title: "Certificate Authorities" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Certificate Authorities"
diff --git a/frontend/src/pages/cert-manager/CertificatesPage/CertificatesPage.tsx b/frontend/src/pages/cert-manager/CertificatesPage/CertificatesPage.tsx
index 56b0fb72dc..608d6f66ce 100644
--- a/frontend/src/pages/cert-manager/CertificatesPage/CertificatesPage.tsx
+++ b/frontend/src/pages/cert-manager/CertificatesPage/CertificatesPage.tsx
@@ -27,11 +27,11 @@ export const CertificatesPage = () => {
);
return (
- <div className="container mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
<Helmet>
<title>{t("common.head-title", { title: "Certificates" })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Certificates"
diff --git a/frontend/src/pages/cert-manager/IntegrationsListPage/IntegrationsListPage.tsx b/frontend/src/pages/cert-manager/IntegrationsListPage/IntegrationsListPage.tsx
index 6545636f0a..c7c86d470a 100644
--- a/frontend/src/pages/cert-manager/IntegrationsListPage/IntegrationsListPage.tsx
+++ b/frontend/src/pages/cert-manager/IntegrationsListPage/IntegrationsListPage.tsx
@@ -42,16 +42,18 @@ export const IntegrationsListPage = () => {
<meta property="og:title" content="Manage your certificates in seconds" />
<meta name="og:description" content="Sync and manage PKI certificates across services" />
</Helmet>
- <div className="relative container mx-auto max-w-7xl pb-12 text-white">
+ <div className="relative mx-auto max-w-8xl pb-12 text-white">
<div className="mb-8">
<PageHeader
scope="project"
title="Integrations"
description="Manage integrations with third-party certificate services."
/>
- <Tabs value={currentTab} onValueChange={updateSelectedTab}>
+ <Tabs orientation="vertical" value={currentTab} onValueChange={updateSelectedTab}>
<TabList>
- <Tab value={IntegrationsListPageTabs.PkiSyncs}>Certificate Syncs</Tab>
+ <Tab variant="project" value={IntegrationsListPageTabs.PkiSyncs}>
+ Certificate Syncs
+ </Tab>
</TabList>
<TabPanel value={IntegrationsListPageTabs.PkiSyncs}>
<ProjectPermissionCan
diff --git a/frontend/src/pages/cert-manager/PkiCollectionDetailsByIDPage/PkiCollectionDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/PkiCollectionDetailsByIDPage/PkiCollectionDetailsByIDPage.tsx
index 79835a96dd..244278f269 100644
--- a/frontend/src/pages/cert-manager/PkiCollectionDetailsByIDPage/PkiCollectionDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/PkiCollectionDetailsByIDPage/PkiCollectionDetailsByIDPage.tsx
@@ -1,6 +1,8 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
@@ -70,10 +72,20 @@ export const PkiCollectionPage = () => {
};
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
- <PageHeader scope="project" title={data.name}>
+ <div className="mx-auto mb-6 w-full max-w-8xl">
+ <Link
+ to="/projects/cert-management/$projectId/certificates"
+ params={{
+ projectId
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Certificates
+ </Link>
+ <PageHeader scope="project" title={data.name} description="Manage certificate collection">
<DropdownMenu>
<DropdownMenuTrigger asChild className="rounded-lg">
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
diff --git a/frontend/src/pages/cert-manager/PkiSubscriberDetailsByIDPage/PkiSubscriberDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/PkiSubscriberDetailsByIDPage/PkiSubscriberDetailsByIDPage.tsx
index 2a7fdf56de..5bedfd770b 100644
--- a/frontend/src/pages/cert-manager/PkiSubscriberDetailsByIDPage/PkiSubscriberDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/PkiSubscriberDetailsByIDPage/PkiSubscriberDetailsByIDPage.tsx
@@ -1,6 +1,8 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
@@ -75,10 +77,20 @@ const Page = () => {
};
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
- <PageHeader scope="project" title={data.name}>
+ <div className="mx-auto mb-6 w-full max-w-8xl">
+ <Link
+ to="/projects/cert-management/$projectId/subscribers"
+ params={{
+ projectId
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Subscribers
+ </Link>
+ <PageHeader scope="project" title={data.name} description="Manage PKI subscriber">
<DropdownMenu>
<DropdownMenuTrigger asChild className="rounded-lg">
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
diff --git a/frontend/src/pages/cert-manager/PkiSubscribersPage/PkiSubscribersPage.tsx b/frontend/src/pages/cert-manager/PkiSubscribersPage/PkiSubscribersPage.tsx
index bdb525b59b..ad3d8428b5 100644
--- a/frontend/src/pages/cert-manager/PkiSubscribersPage/PkiSubscribersPage.tsx
+++ b/frontend/src/pages/cert-manager/PkiSubscribersPage/PkiSubscribersPage.tsx
@@ -13,8 +13,8 @@ export const PkiSubscribersPage = () => {
<title>{t("common.head-title", { title: "PKI Subscribers" })}</title>
</Helmet>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Subscribers"
diff --git a/frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/PkiSyncDetailsByIDPage.tsx b/frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/PkiSyncDetailsByIDPage.tsx
index 26d2b43f92..76cc0ec7b5 100644
--- a/frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/PkiSyncDetailsByIDPage.tsx
+++ b/frontend/src/pages/cert-manager/PkiSyncDetailsByIDPage/PkiSyncDetailsByIDPage.tsx
@@ -68,8 +68,8 @@ const PageContent = () => {
return (
<>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 font-inter text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 font-inter text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<Button
variant="link"
type="submit"
diff --git a/frontend/src/pages/cert-manager/PkiTemplateListPage/PkiTemplateListPage.tsx b/frontend/src/pages/cert-manager/PkiTemplateListPage/PkiTemplateListPage.tsx
index 409b0415f0..e7fd07d601 100644
--- a/frontend/src/pages/cert-manager/PkiTemplateListPage/PkiTemplateListPage.tsx
+++ b/frontend/src/pages/cert-manager/PkiTemplateListPage/PkiTemplateListPage.tsx
@@ -103,15 +103,15 @@ export const PkiTemplateListPage = () => {
<title>{t("common.head-title", { title: "PKI Templates" })}</title>
</Helmet>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Certificate Templates"
description="Manage certificate template to request and issue dynamic certificates following a strict format."
/>
</div>
- <div className="container mx-auto mb-6 max-w-7xl rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
+ <div className="container mx-auto mb-6 max-w-8xl rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
<div className="mb-4 flex justify-between">
<p className="text-xl font-medium text-mineshaft-100">Templates</p>
<div className="flex w-full justify-end">
@@ -267,7 +267,7 @@ export const PkiTemplateListPage = () => {
onDeleteApproved={() => onRemovePkiSubscriberSubmit()}
/>
</div>
- <div className="container mx-auto max-w-7xl" />
+ <div className="container mx-auto max-w-8xl" />
</div>
<Modal
isOpen={popUp?.certificateTemplate?.isOpen}
diff --git a/frontend/src/pages/cert-manager/SettingsPage/SettingsPage.tsx b/frontend/src/pages/cert-manager/SettingsPage/SettingsPage.tsx
index 261b06df98..bbcf9decc6 100644
--- a/frontend/src/pages/cert-manager/SettingsPage/SettingsPage.tsx
+++ b/frontend/src/pages/cert-manager/SettingsPage/SettingsPage.tsx
@@ -20,12 +20,12 @@ export const SettingsPage = () => {
<Helmet>
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
</Helmet>
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader scope="project" title={t("settings.project.title")} />
- <Tabs defaultValue={tabs[0].key}>
+ <Tabs orientation="vertical" defaultValue={tabs[0].key}>
<TabList>
{tabs.map((tab) => (
- <Tab value={tab.key} key={tab.key}>
+ <Tab value={tab.key} variant="project" key={tab.key}>
{tab.name}
</Tab>
))}
diff --git a/frontend/src/pages/kms/KmipPage/KmipPage.tsx b/frontend/src/pages/kms/KmipPage/KmipPage.tsx
index b2ef8a5f09..e840d1119c 100644
--- a/frontend/src/pages/kms/KmipPage/KmipPage.tsx
+++ b/frontend/src/pages/kms/KmipPage/KmipPage.tsx
@@ -15,8 +15,8 @@ export const KmipPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "KMS" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="KMIP"
diff --git a/frontend/src/pages/kms/OverviewPage/OverviewPage.tsx b/frontend/src/pages/kms/OverviewPage/OverviewPage.tsx
index 71f0534e96..15446bfc01 100644
--- a/frontend/src/pages/kms/OverviewPage/OverviewPage.tsx
+++ b/frontend/src/pages/kms/OverviewPage/OverviewPage.tsx
@@ -15,8 +15,8 @@ export const OverviewPage = () => {
<Helmet>
<title>{t("common.head-title", { title: "KMS" })}</title>
</Helmet>
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Overview"
diff --git a/frontend/src/pages/kms/SettingsPage/SettingsPage.tsx b/frontend/src/pages/kms/SettingsPage/SettingsPage.tsx
index d1032d1cc1..3c6ae46de6 100644
--- a/frontend/src/pages/kms/SettingsPage/SettingsPage.tsx
+++ b/frontend/src/pages/kms/SettingsPage/SettingsPage.tsx
@@ -20,12 +20,16 @@ export const SettingsPage = () => {
<Helmet>
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
</Helmet>
- <div className="w-full max-w-7xl">
- <PageHeader scope="project" title="Settings" />
- <Tabs defaultValue={tabs[0].key}>
+ <div className="w-full max-w-8xl">
+ <PageHeader
+ scope="project"
+ title="Settings"
+ description="Configure general project settings"
+ />
+ <Tabs orientation="vertical" defaultValue={tabs[0].key}>
<TabList>
{tabs.map((tab) => (
- <Tab value={tab.key} key={tab.key}>
+ <Tab variant="project" value={tab.key} key={tab.key}>
{tab.name}
</Tab>
))}
diff --git a/frontend/src/pages/organization/AccessManagementPage/AccessManagementPage.tsx b/frontend/src/pages/organization/AccessManagementPage/AccessManagementPage.tsx
index 4ac7273327..8059f71ce0 100644
--- a/frontend/src/pages/organization/AccessManagementPage/AccessManagementPage.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/AccessManagementPage.tsx
@@ -76,11 +76,11 @@ export const AccessManagementPage = () => {
const hasNoAccess = tabSections.every((tab) => tab.isHidden);
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
<Helmet>
<title>{t("common.head-title", { title: t("settings.org.title") })}</title>
</Helmet>
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="org"
title="Access Control"
@@ -111,7 +111,7 @@ export const AccessManagementPage = () => {
isOpen={isUpgradePrivilegeSystemModalOpen}
onOpenChange={setIsUpgradePrivilegeSystemModalOpen}
/>
- <Tabs value={selectedTab} onValueChange={updateSelectedTab}>
+ <Tabs orientation="vertical" value={selectedTab} onValueChange={updateSelectedTab}>
<TabList>
{tabSections
.filter((el) => !el.isHidden)
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgGroupsTab/OrgGroupsTab.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgGroupsTab/OrgGroupsTab.tsx
index 2192f78fda..d4ff577de9 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgGroupsTab/OrgGroupsTab.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgGroupsTab/OrgGroupsTab.tsx
@@ -1,17 +1,5 @@
-import { motion } from "framer-motion";
-
import { OrgGroupsSection } from "./components";
export const OrgGroupsTab = () => {
- return (
- <motion.div
- key="panel-org-groups"
- transition={{ duration: 0.15 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- >
- <OrgGroupsSection />
- </motion.div>
- );
+ return <OrgGroupsSection />;
};
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/OrgIdentityTab.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/OrgIdentityTab.tsx
index 251b0b831c..f2cc98f45b 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/OrgIdentityTab.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/OrgIdentityTab.tsx
@@ -1,17 +1,5 @@
-import { motion } from "framer-motion";
-
import { IdentitySection } from "./components";
export const OrgIdentityTab = () => {
- return (
- <motion.div
- key="panel-service-token"
- transition={{ duration: 0.15 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- >
- <IdentitySection />
- </motion.div>
- );
+ return <IdentitySection />;
};
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/OrgMembersTab.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/OrgMembersTab.tsx
index 1afb9bfbd0..c95ffe816d 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/OrgMembersTab.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgMembersTab/OrgMembersTab.tsx
@@ -1,17 +1,5 @@
-import { motion } from "framer-motion";
-
import { OrgMembersSection } from "./components";
export const OrgMembersTab = () => {
- return (
- <motion.div
- key="panel-org-members"
- transition={{ duration: 0.15 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- >
- <OrgMembersSection />
- </motion.div>
- );
+ return <OrgMembersSection />;
};
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgRoleTabSection/OrgRoleTabSection.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgRoleTabSection/OrgRoleTabSection.tsx
index 57353e8d93..3cb458d97d 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgRoleTabSection/OrgRoleTabSection.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgRoleTabSection/OrgRoleTabSection.tsx
@@ -1,17 +1,5 @@
-import { motion } from "framer-motion";
-
import { OrgRoleTable } from "./OrgRoleTable";
export const OrgRoleTabSection = () => {
- return (
- <motion.div
- key="role-list"
- transition={{ duration: 0.15 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- >
- <OrgRoleTable />
- </motion.div>
- );
+ return <OrgRoleTable />;
};
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/AppConnectionsPage.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/AppConnectionsPage.tsx
index b44fad6ea1..3d4f244cac 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/AppConnectionsPage.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/AppConnectionsPage.tsx
@@ -20,7 +20,7 @@ export const AppConnectionsPage = withPermission(
<meta property="og:image" content="/images/message.png" />
</Helmet>
<div className="flex w-full justify-center bg-bunker-800 text-white">
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader
scope="org"
className="w-full"
diff --git a/frontend/src/pages/organization/AuditLogsPage/AuditLogsPage.tsx b/frontend/src/pages/organization/AuditLogsPage/AuditLogsPage.tsx
index 62ae29a1d3..9198b879d6 100644
--- a/frontend/src/pages/organization/AuditLogsPage/AuditLogsPage.tsx
+++ b/frontend/src/pages/organization/AuditLogsPage/AuditLogsPage.tsx
@@ -12,9 +12,8 @@ export const AuditLogsPage = () => {
<link rel="icon" href="/infisical.ico" />
<meta property="og:image" content="/images/message.png" />
</Helmet>
-
- <div className="flex h-full w-full justify-center bg-bunker-800 text-white">
- <div className="w-full max-w-7xl">
+ <div className="flex w-full justify-center bg-bunker-800 pb-6 text-white">
+ <div className="w-full max-w-8xl">
<PageHeader
scope="org"
title="Audit Logs"
diff --git a/frontend/src/pages/organization/BillingPage/BillingPage.tsx b/frontend/src/pages/organization/BillingPage/BillingPage.tsx
index 3fb473f2ca..b8b049a688 100644
--- a/frontend/src/pages/organization/BillingPage/BillingPage.tsx
+++ b/frontend/src/pages/organization/BillingPage/BillingPage.tsx
@@ -18,7 +18,7 @@ export const BillingPage = () => {
<meta property="og:image" content="/images/message.png" />
</Helmet>
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader
scope="org"
title={t("billing.title")}
diff --git a/frontend/src/pages/organization/BillingPage/components/BillingTabGroup/BillingTabGroup.tsx b/frontend/src/pages/organization/BillingPage/components/BillingTabGroup/BillingTabGroup.tsx
index 7cd567b234..b811fe8c62 100644
--- a/frontend/src/pages/organization/BillingPage/components/BillingTabGroup/BillingTabGroup.tsx
+++ b/frontend/src/pages/organization/BillingPage/components/BillingTabGroup/BillingTabGroup.tsx
@@ -17,14 +17,14 @@ const tabs = [
export const BillingTabGroup = withPermission(
() => {
- const tabsFiltered = isInfisicalCloud()
- ? tabs
- : [{ name: "Infisical Self-Hosted", key: "tab-infisical-cloud" }];
+ if (!isInfisicalCloud()) {
+ return <BillingCloudTab />;
+ }
return (
- <Tabs defaultValue={tabs[0].key}>
+ <Tabs orientation="vertical" defaultValue={tabs[0].key}>
<TabList>
- {tabsFiltered.map((tab) => (
+ {tabs.map((tab) => (
<Tab variant="org" value={tab.key}>
{tab.name}
</Tab>
@@ -33,19 +33,15 @@ export const BillingTabGroup = withPermission(
<TabPanel value={tabs[0].key}>
<BillingCloudTab />
</TabPanel>
- {isInfisicalCloud() && (
- <>
- <TabPanel value={tabs[1].key}>
- <BillingSelfHostedTab />
- </TabPanel>
- <TabPanel value={tabs[2].key}>
- <BillingReceiptsTab />
- </TabPanel>
- <TabPanel value={tabs[3].key}>
- <BillingDetailsTab />
- </TabPanel>
- </>
- )}
+ <TabPanel value={tabs[1].key}>
+ <BillingSelfHostedTab />
+ </TabPanel>
+ <TabPanel value={tabs[2].key}>
+ <BillingReceiptsTab />
+ </TabPanel>
+ <TabPanel value={tabs[3].key}>
+ <BillingDetailsTab />
+ </TabPanel>
</Tabs>
);
},
diff --git a/frontend/src/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage.tsx b/frontend/src/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage.tsx
index f0bd249000..d3acd618be 100644
--- a/frontend/src/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage.tsx
+++ b/frontend/src/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage.tsx
@@ -1,6 +1,8 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { twMerge } from "tailwind-merge";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
@@ -80,10 +82,20 @@ const Page = () => {
if (isPending) return <Spinner size="sm" className="mt-2 ml-2" />;
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
- <PageHeader scope="org" title={data.group.name}>
+ <div className="mx-auto w-full max-w-8xl">
+ <Link
+ to="/organization/access-management"
+ search={{
+ selectedTab: TabSections.Groups
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Groups
+ </Link>
+ <PageHeader scope="org" description="Organization Group" title={data.group.name}>
<DropdownMenu>
<DropdownMenuTrigger asChild className="rounded-lg">
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
index adf6dfce89..d85c627271 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
@@ -1,6 +1,8 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
import { createNotification } from "@app/components/notifications";
@@ -10,6 +12,7 @@ import { ROUTE_PATHS } from "@app/const/routes";
import { OrgPermissionIdentityActions, OrgPermissionSubjects, useOrganization } from "@app/context";
import { useDeleteIdentity, useGetIdentityById } from "@app/hooks/api";
import { usePopUp } from "@app/hooks/usePopUp";
+import { TabSections } from "@app/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage";
import { ViewIdentityAuthModal } from "@app/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/ViewIdentityAuthModal";
import { OrgAccessControlTabSections } from "@app/types/org";
@@ -72,10 +75,20 @@ const Page = () => {
};
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
- <PageHeader scope="org" title={data.identity.name} />
+ <div className="mx-auto w-full max-w-8xl">
+ <Link
+ to="/organization/access-management"
+ search={{
+ selectedTab: TabSections.Identities
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Identities
+ </Link>
+ <PageHeader scope="org" description="Organization Identity" title={data.identity.name} />
<div className="flex">
<div className="mr-4 w-96">
<IdentityDetailsSection identityId={identityId} handlePopUpOpen={handlePopUpOpen} />
diff --git a/frontend/src/pages/organization/NetworkingPage/NetworkingPage.tsx b/frontend/src/pages/organization/NetworkingPage/NetworkingPage.tsx
index e7f3937d55..bc8ae44ef4 100644
--- a/frontend/src/pages/organization/NetworkingPage/NetworkingPage.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/NetworkingPage.tsx
@@ -12,7 +12,7 @@ export const NetworkingPage = () => {
<meta property="og:image" content="/images/message.png" />
</Helmet>
<div className="flex w-full justify-center bg-bunker-800 text-white">
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader
scope="org"
title="Networking"
diff --git a/frontend/src/pages/organization/NetworkingPage/components/NetworkingTabGroup/NetworkingTabGroup.tsx b/frontend/src/pages/organization/NetworkingPage/components/NetworkingTabGroup/NetworkingTabGroup.tsx
index 956a4d1ed5..c72748abc8 100644
--- a/frontend/src/pages/organization/NetworkingPage/components/NetworkingTabGroup/NetworkingTabGroup.tsx
+++ b/frontend/src/pages/organization/NetworkingPage/components/NetworkingTabGroup/NetworkingTabGroup.tsx
@@ -19,7 +19,7 @@ export const NetworkingTabGroup = () => {
const [selectedTab, setSelectedTab] = useState(search.selectedTab || tabs[0].key);
return (
- <Tabs value={selectedTab} onValueChange={setSelectedTab}>
+ <Tabs orientation="vertical" value={selectedTab} onValueChange={setSelectedTab}>
<TabList>
{tabs.map((tab) => (
<Tab variant="org" value={tab.key} key={tab.key}>
diff --git a/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx b/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx
index 92654c1e78..a528587b34 100644
--- a/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx
+++ b/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx
@@ -58,18 +58,16 @@ export const ProjectsPage = () => {
: true;
return (
- <div className="mx-auto flex max-w-7xl flex-col justify-start bg-bunker-800">
+ <div className="mx-auto flex max-w-8xl flex-col justify-start bg-bunker-800">
<Helmet>
<title>{t("common.head-title", { title: t("settings.members.title") })}</title>
<link rel="icon" href="/infisical.ico" />
</Helmet>
- <div className="mb-4 flex flex-col items-start justify-start">
- <PageHeader
- scope="org"
- title="Overview"
- description="Your team's complete security toolkit - organized and ready when you need them."
- />
- </div>
+ <PageHeader
+ scope="org"
+ title="Overview"
+ description="Your team's complete security toolkit - organized and ready when you need them."
+ />
{projectListView === ProjectListView.MyProjects ? (
<MyProjectView
onAddNewProject={() => handlePopUpOpen("addNewWs")}
diff --git a/frontend/src/pages/organization/RoleByIDPage/RoleByIDPage.tsx b/frontend/src/pages/organization/RoleByIDPage/RoleByIDPage.tsx
index 8b25247be2..cce093e7aa 100644
--- a/frontend/src/pages/organization/RoleByIDPage/RoleByIDPage.tsx
+++ b/frontend/src/pages/organization/RoleByIDPage/RoleByIDPage.tsx
@@ -1,8 +1,8 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { faCopy, faEllipsisV } from "@fortawesome/free-solid-svg-icons";
+import { faChevronLeft, faCopy, faEllipsisV } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { createNotification } from "@app/components/notifications";
import { OrgPermissionCan } from "@app/components/permissions";
@@ -19,6 +19,7 @@ import { ROUTE_PATHS } from "@app/const/routes";
import { OrgPermissionActions, OrgPermissionSubjects, useOrganization } from "@app/context";
import { useDeleteOrgRole, useGetOrgRole } from "@app/hooks/api";
import { usePopUp } from "@app/hooks/usePopUp";
+import { TabSections } from "@app/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage";
import { DuplicateOrgRoleModal } from "@app/pages/organization/RoleByIDPage/components/DuplicateOrgRoleModal";
import { OrgAccessControlTabSections } from "@app/types/org";
@@ -77,20 +78,26 @@ export const Page = () => {
const isCustomRole = !["admin", "member", "no-access"].includes(data?.slug ?? "");
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto w-full max-w-8xl">
+ <Link
+ to="/organization/access-management"
+ search={{
+ selectedTab: TabSections.Roles
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Roles
+ </Link>
<PageHeader
scope="org"
- title={
- <div className="flex flex-col">
- <div>
- <span>{data.name}</span>
- <p className="text-sm leading-3 font-normal text-mineshaft-400 normal-case">
- {data.slug} {data.description && `- ${data.description}`}
- </p>
- </div>
- </div>
+ title={data.name}
+ description={
+ <>
+ {data.slug} {data.description && `- ${data.description}`}
+ </>
}
>
{isCustomRole && (
diff --git a/frontend/src/pages/organization/SecretSharingPage/SecretSharingPage.tsx b/frontend/src/pages/organization/SecretSharingPage/SecretSharingPage.tsx
index ec3885f5bc..ace5b211e5 100644
--- a/frontend/src/pages/organization/SecretSharingPage/SecretSharingPage.tsx
+++ b/frontend/src/pages/organization/SecretSharingPage/SecretSharingPage.tsx
@@ -20,7 +20,7 @@ export const SecretSharingPage = () => {
<meta name="og:description" content={String(t("approval.og-description"))} />
</Helmet>
<div className="h-full">
- <div className="container mx-auto h-full w-full max-w-7xl bg-bunker-800 text-white">
+ <div className="mx-auto h-full w-full max-w-8xl bg-bunker-800 text-white">
<PageHeader
scope="org"
title="Secret Sharing"
diff --git a/frontend/src/pages/organization/SecretSharingPage/ShareSecretSection.tsx b/frontend/src/pages/organization/SecretSharingPage/ShareSecretSection.tsx
index cce4f0a3df..6acc9b30be 100644
--- a/frontend/src/pages/organization/SecretSharingPage/ShareSecretSection.tsx
+++ b/frontend/src/pages/organization/SecretSharingPage/ShareSecretSection.tsx
@@ -1,7 +1,7 @@
import { Helmet } from "react-helmet";
import { useNavigate, useSearch } from "@tanstack/react-router";
-import { Badge, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
+import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
import { ROUTE_PATHS } from "@app/const/routes";
import { RequestSecretTab } from "./components/RequestSecret/RequestSecretTab";
@@ -34,14 +34,13 @@ export const ShareSecretSection = () => {
<meta property="og:image" content="/images/message.png" />
</Helmet>
- <Tabs value={selectedTab} onValueChange={updateSelectedTab}>
+ <Tabs orientation="vertical" value={selectedTab} onValueChange={updateSelectedTab}>
<TabList>
- <Tab value={SecretSharingPageTabs.ShareSecret}>Share Secrets</Tab>
- <Tab value={SecretSharingPageTabs.RequestSecret}>
+ <Tab variant="org" value={SecretSharingPageTabs.ShareSecret}>
+ Share Secrets
+ </Tab>
+ <Tab variant="org" value={SecretSharingPageTabs.RequestSecret}>
Request Secrets
- <Badge variant="primary" className="ml-1 cursor-pointer text-xs">
- New
- </Badge>
</Tab>
</TabList>
<TabPanel value={SecretSharingPageTabs.ShareSecret}>
diff --git a/frontend/src/pages/organization/SecretSharingSettingsPage/SecretSharingSettingsPage.tsx b/frontend/src/pages/organization/SecretSharingSettingsPage/SecretSharingSettingsPage.tsx
index 6ee73a03df..8cee365e35 100644
--- a/frontend/src/pages/organization/SecretSharingSettingsPage/SecretSharingSettingsPage.tsx
+++ b/frontend/src/pages/organization/SecretSharingSettingsPage/SecretSharingSettingsPage.tsx
@@ -20,7 +20,7 @@ export const SecretSharingSettingsPage = withPermission(
<title>{t("common.head-title", { title: "Secret Share Settings" })}</title>
</Helmet>
<div className="flex w-full justify-center bg-bunker-800 text-white">
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader scope="org" title="Secret Share Settings" />
<SecretSharingSettingsTabGroup />
</div>
diff --git a/frontend/src/pages/organization/SettingsPage/SettingsPage.tsx b/frontend/src/pages/organization/SettingsPage/SettingsPage.tsx
index 52fc99f53d..919a1159a8 100644
--- a/frontend/src/pages/organization/SettingsPage/SettingsPage.tsx
+++ b/frontend/src/pages/organization/SettingsPage/SettingsPage.tsx
@@ -14,8 +14,12 @@ export const SettingsPage = () => {
<title>{t("common.head-title", { title: t("settings.org.title") })}</title>
</Helmet>
<div className="flex w-full justify-center bg-bunker-800 text-white">
- <div className="w-full max-w-7xl">
- <PageHeader scope="org" title={t("settings.org.title")} />
+ <div className="w-full max-w-8xl">
+ <PageHeader
+ scope="org"
+ description="Configure organization-wide settings"
+ title={t("settings.org.title")}
+ />
<OrgTabGroup />
</div>
</div>
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgTabGroup/OrgTabGroup.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgTabGroup/OrgTabGroup.tsx
index ad867238bb..66af7df1b1 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgTabGroup/OrgTabGroup.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgTabGroup/OrgTabGroup.tsx
@@ -55,7 +55,7 @@ export const OrgTabGroup = () => {
const [selectedTab, setSelectedTab] = useState(search.selectedTab || tabs[0].key);
return (
- <Tabs value={selectedTab} onValueChange={setSelectedTab}>
+ <Tabs orientation="vertical" value={selectedTab} onValueChange={setSelectedTab}>
<TabList>
{tabs.map((tab) => (
<Tab variant="org" value={tab.key} key={tab.key}>
diff --git a/frontend/src/pages/organization/UserDetailsByIDPage/UserDetailsByIDPage.tsx b/frontend/src/pages/organization/UserDetailsByIDPage/UserDetailsByIDPage.tsx
index 3153c5fd58..342642d500 100644
--- a/frontend/src/pages/organization/UserDetailsByIDPage/UserDetailsByIDPage.tsx
+++ b/frontend/src/pages/organization/UserDetailsByIDPage/UserDetailsByIDPage.tsx
@@ -1,6 +1,8 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { twMerge } from "tailwind-merge";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
@@ -30,6 +32,7 @@ import {
useUpdateOrgMembership
} from "@app/hooks/api";
import { usePopUp } from "@app/hooks/usePopUp";
+import { TabSections } from "@app/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage";
import { OrgAccessControlTabSections } from "@app/types/org";
import { UserAuditLogsSection } from "./components/UserProjectsSection/UserAuditLogsSection";
@@ -115,16 +118,30 @@ const Page = withPermission(
};
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{membership && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto w-full max-w-8xl">
+ <Link
+ to="/organization/access-management"
+ search={{
+ selectedTab: TabSections.Member
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Users
+ </Link>
<PageHeader
scope="org"
title={
membership.user.firstName || membership.user.lastName
? `${membership.user.firstName} ${membership.user.lastName ?? ""}`.trim()
- : "-"
+ : (membership.user.username ??
+ membership.user.email ??
+ membership.inviteEmail ??
+ "Unknown User")
}
+ description="Organization User Membership"
>
<div>
{userId !== membership.user.id && (
diff --git a/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx b/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx
index da81321937..77f9e4798b 100644
--- a/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/PamAccountsPage.tsx
@@ -21,8 +21,8 @@ export const PamAccountsPage = () => {
a={ProjectPermissionSub.PamAccounts}
>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Accounts"
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/FolderBreadCrumbs.tsx b/frontend/src/pages/pam/PamAccountsPage/components/FolderBreadCrumbs.tsx
new file mode 100644
index 0000000000..1ce7c918ff
--- /dev/null
+++ b/frontend/src/pages/pam/PamAccountsPage/components/FolderBreadCrumbs.tsx
@@ -0,0 +1,57 @@
+import { faFolderOpen } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { useNavigate } from "@tanstack/react-router";
+
+type Props = {
+ path: string;
+};
+
+export const FolderBreadCrumbs = ({ path = "/" }: Props) => {
+ const navigate = useNavigate({
+ from: "/projects/secret-management/$projectId/overview"
+ });
+
+ const onFolderCrumbClick = (index: number) => {
+ let newAccountPath = `/${path.split("/").filter(Boolean).slice(0, index).join("/")}`;
+
+ if (!newAccountPath.endsWith("/")) {
+ newAccountPath += "/";
+ }
+
+ if (path === newAccountPath) return;
+ navigate({
+ search: (prev) => ({ ...prev, accountPath: newAccountPath })
+ });
+ };
+
+ return (
+ <div className="flex items-center space-x-2">
+ <div
+ className="breadcrumb relative z-20 border-solid border-mineshaft-600 bg-mineshaft-800 py-1 pr-2 pl-5 text-sm hover:bg-mineshaft-600"
+ onClick={() => onFolderCrumbClick(0)}
+ onKeyDown={() => null}
+ role="button"
+ tabIndex={0}
+ >
+ <FontAwesomeIcon icon={faFolderOpen} className="text-primary-700" />
+ </div>
+ {(path || "")
+ .split("/")
+ .filter(Boolean)
+ .map((pathSegment, index, arr) => (
+ <div
+ key={`path-${index + 1}`}
+ className={`breadcrumb relative z-20 ${
+ index + 1 === arr.length ? "cursor-default" : "cursor-pointer"
+ } border-solid border-mineshaft-600 py-1 pr-2 pl-5 text-sm text-mineshaft-200`}
+ onClick={() => onFolderCrumbClick(index + 1)}
+ onKeyDown={() => null}
+ role="button"
+ tabIndex={0}
+ >
+ {pathSegment}
+ </div>
+ ))}
+ </div>
+ );
+};
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
index 7cdf93dc89..d0e86af0c1 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
@@ -45,6 +45,7 @@ import { OrderByDirection } from "@app/hooks/api/generic/types";
import { PAM_RESOURCE_TYPE_MAP, TPamAccount, TPamFolder } from "@app/hooks/api/pam";
import { AccountView, AccountViewToggle } from "./AccountViewToggle";
+import { FolderBreadCrumbs } from "./FolderBreadCrumbs";
import { PamAccessAccountModal } from "./PamAccessAccountModal";
import { PamAccountRow } from "./PamAccountRow";
import { PamAddAccountModal } from "./PamAddAccountModal";
@@ -255,6 +256,7 @@ export const PamAccountsTable = ({ accounts, folders, projectId }: Props) => {
return (
<div>
+ {accountView === AccountView.Nested && <FolderBreadCrumbs path={accountPath} />}
<div className="mt-4 flex gap-2">
<ProjectPermissionCan I={ProjectPermissionActions.Read} a={ProjectPermissionSub.PamFolders}>
{(isAllowed) =>
diff --git a/frontend/src/pages/pam/PamResourcesPage/PamResourcesPage.tsx b/frontend/src/pages/pam/PamResourcesPage/PamResourcesPage.tsx
index 13e9028e60..8970816d75 100644
--- a/frontend/src/pages/pam/PamResourcesPage/PamResourcesPage.tsx
+++ b/frontend/src/pages/pam/PamResourcesPage/PamResourcesPage.tsx
@@ -21,8 +21,8 @@ export const PamResourcesPage = () => {
a={ProjectPermissionSub.PamResources}
>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Resources"
diff --git a/frontend/src/pages/pam/PamSessionsByIDPage/PamSessionByIDPage.tsx b/frontend/src/pages/pam/PamSessionsByIDPage/PamSessionByIDPage.tsx
index af5b85fc6f..94b82d46c2 100644
--- a/frontend/src/pages/pam/PamSessionsByIDPage/PamSessionByIDPage.tsx
+++ b/frontend/src/pages/pam/PamSessionsByIDPage/PamSessionByIDPage.tsx
@@ -1,10 +1,12 @@
import { Helmet } from "react-helmet";
-import { useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useParams } from "@tanstack/react-router";
import { ProjectPermissionCan } from "@app/components/permissions";
import { PageHeader } from "@app/components/v2";
import { ROUTE_PATHS } from "@app/const/routes";
-import { ProjectPermissionSub } from "@app/context";
+import { ProjectPermissionSub, useProject } from "@app/context";
import { ProjectPermissionPamSessionActions } from "@app/context/ProjectPermissionContext/types";
import { useGetPamSessionById } from "@app/hooks/api/pam";
@@ -17,11 +19,21 @@ const Page = () => {
select: (el) => el.sessionId
});
const { data: session } = useGetPamSessionById(sessionId);
-
+ const { currentProject } = useProject();
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{session && (
- <div className="mx-auto mb-6 flex w-full max-w-7xl flex-col">
+ <div className="mx-auto mb-6 flex w-full max-w-8xl flex-col">
+ <Link
+ to="/projects/pam/$projectId/sessions"
+ params={{
+ projectId: currentProject.id
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Sessions
+ </Link>
<PageHeader
scope="project"
title={`${session.accountName} Session`}
diff --git a/frontend/src/pages/pam/PamSessionsPage/PamSessionsPage.tsx b/frontend/src/pages/pam/PamSessionsPage/PamSessionsPage.tsx
index 5265075643..1266585c8c 100644
--- a/frontend/src/pages/pam/PamSessionsPage/PamSessionsPage.tsx
+++ b/frontend/src/pages/pam/PamSessionsPage/PamSessionsPage.tsx
@@ -21,8 +21,8 @@ export const PamSessionPage = () => {
a={ProjectPermissionSub.PamSessions}
>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Sessions"
diff --git a/frontend/src/pages/pam/SettingsPage/SettingsPage.tsx b/frontend/src/pages/pam/SettingsPage/SettingsPage.tsx
index b8b23cebd7..57c0f1e03c 100644
--- a/frontend/src/pages/pam/SettingsPage/SettingsPage.tsx
+++ b/frontend/src/pages/pam/SettingsPage/SettingsPage.tsx
@@ -12,11 +12,13 @@ export const SettingsPage = () => {
<Helmet>
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
</Helmet>
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader scope="project" title="Settings" description="Configure your PAM project." />
- <Tabs defaultValue="tab-project-general">
+ <Tabs orientation="vertical" defaultValue="tab-project-general">
<TabList>
- <Tab value="tab-project-general">General</Tab>
+ <Tab variant="project" value="tab-project-general">
+ General
+ </Tab>
</TabList>
<TabPanel value="tab-project-general">
<ProjectGeneralTab />
diff --git a/frontend/src/pages/project/AccessControlPage/AccessControlPage.tsx b/frontend/src/pages/project/AccessControlPage/AccessControlPage.tsx
index c010fcc39c..14a8733448 100644
--- a/frontend/src/pages/project/AccessControlPage/AccessControlPage.tsx
+++ b/frontend/src/pages/project/AccessControlPage/AccessControlPage.tsx
@@ -37,26 +37,32 @@ const Page = () => {
const isSecretManager = currentProject.type === ProjectType.SecretManager;
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Access Control"
description="Manage fine-grained access for users, groups, roles, and identities within your project resources."
/>
- <Tabs value={selectedTab} onValueChange={updateSelectedTab}>
+ <Tabs orientation="vertical" value={selectedTab} onValueChange={updateSelectedTab}>
<TabList>
- <Tab value={ProjectAccessControlTabs.Member}>Users</Tab>
- <Tab value={ProjectAccessControlTabs.Groups}>Groups</Tab>
- <Tab value={ProjectAccessControlTabs.Identities}>
- <div className="flex items-center">
- <p>Machine Identities</p>
- </div>
+ <Tab variant="project" value={ProjectAccessControlTabs.Member}>
+ Users
+ </Tab>
+ <Tab variant="project" value={ProjectAccessControlTabs.Groups}>
+ Groups
+ </Tab>
+ <Tab variant="project" value={ProjectAccessControlTabs.Identities}>
+ Identities
</Tab>
{isSecretManager && (
- <Tab value={ProjectAccessControlTabs.ServiceTokens}>Service Tokens</Tab>
+ <Tab variant="project" value={ProjectAccessControlTabs.ServiceTokens}>
+ Service Tokens
+ </Tab>
)}
- <Tab value={ProjectAccessControlTabs.Roles}>Project Roles</Tab>
+ <Tab variant="project" value={ProjectAccessControlTabs.Roles}>
+ Roles
+ </Tab>
</TabList>
<TabPanel value={ProjectAccessControlTabs.Member}>
<MembersTab />
diff --git a/frontend/src/pages/project/AccessControlPage/components/GroupsTab/GroupsTab.tsx b/frontend/src/pages/project/AccessControlPage/components/GroupsTab/GroupsTab.tsx
index 4f155a5529..4c801a76f6 100644
--- a/frontend/src/pages/project/AccessControlPage/components/GroupsTab/GroupsTab.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/GroupsTab/GroupsTab.tsx
@@ -1,5 +1,3 @@
-import { motion } from "framer-motion";
-
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
import { withProjectPermission } from "@app/hoc";
@@ -7,17 +5,7 @@ import { GroupsSection } from "./components";
export const GroupsTab = withProjectPermission(
() => {
- return (
- <motion.div
- key="panel-groups"
- transition={{ duration: 0.15 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- >
- <GroupsSection />
- </motion.div>
- );
+ return <GroupsSection />;
},
{
action: ProjectPermissionActions.Read,
diff --git a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
index 652b7047df..6e4ec70fef 100644
--- a/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
@@ -14,7 +14,6 @@ import {
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useNavigate } from "@tanstack/react-router";
import { format } from "date-fns";
-import { motion } from "framer-motion";
import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
@@ -158,307 +157,295 @@ export const IdentityTab = withProjectPermission(
};
return (
- <motion.div
- key="identity-role-panel"
- transition={{ duration: 0.15 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- >
- <div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="mb-4 flex items-center justify-between">
- <div className="flex items-center gap-1">
- <p className="text-xl font-medium text-mineshaft-100">Identities</p>
- <a
- href="https://infisical.com/docs/documentation/platform/identities/overview"
- target="_blank"
- rel="noopener noreferrer"
- >
- <div className="mt-[0.16rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
- <span>Docs</span>
- <FontAwesomeIcon
- icon={faArrowUpRightFromSquare}
- className="mb-[0.07rem] ml-1.5 text-[10px]"
- />
- </div>
- </a>
- </div>
- <ProjectPermissionCan
- I={ProjectPermissionActions.Create}
- a={ProjectPermissionSub.Identity}
+ <div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
+ <div className="mb-4 flex items-center justify-between">
+ <div className="flex items-center gap-1">
+ <p className="text-xl font-medium text-mineshaft-100">Identities</p>
+ <a
+ href="https://infisical.com/docs/documentation/platform/identities/overview"
+ target="_blank"
+ rel="noopener noreferrer"
>
- {(isAllowed) => (
- <Button
- colorSchema="secondary"
- type="submit"
- leftIcon={<FontAwesomeIcon icon={faPlus} />}
- onClick={() => handlePopUpOpen("identity")}
- isDisabled={!isAllowed}
- >
- Add Identity
- </Button>
- )}
- </ProjectPermissionCan>
+ <div className="mt-[0.16rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
+ <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
+ <span>Docs</span>
+ <FontAwesomeIcon
+ icon={faArrowUpRightFromSquare}
+ className="mb-[0.07rem] ml-1.5 text-[10px]"
+ />
+ </div>
+ </a>
</div>
- <Input
- containerClassName="mb-4"
- value={search}
- onChange={(e) => setSearch(e.target.value)}
- leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
- placeholder="Search identities by name..."
- />
- <TableContainer>
- <Table>
- <THead>
- <Tr className="h-14">
- <Th className="w-1/3">
- <div className="flex items-center">
- Name
- <IconButton
- variant="plain"
- className={`ml-2 ${
- orderBy === ProjectIdentityOrderBy.Name ? "" : "opacity-30"
- }`}
- ariaLabel="sort"
- onClick={() => handleSort(ProjectIdentityOrderBy.Name)}
- >
- <FontAwesomeIcon
- icon={
- orderDirection === OrderByDirection.DESC &&
- orderBy === ProjectIdentityOrderBy.Name
- ? faArrowUp
- : faArrowDown
- }
- />
- </IconButton>
- </div>
- </Th>
- <Th className="w-1/3">Role</Th>
- <Th>Added on</Th>
- <Th className="w-5">{isFetching ? <Spinner size="xs" /> : null}</Th>
- </Tr>
- </THead>
- <TBody>
- {isPending && <TableSkeleton columns={4} innerKey="project-identities" />}
- {!isPending &&
- data &&
- data.identityMemberships.length > 0 &&
- data.identityMemberships.map((identityMember) => {
- const {
- identity: { id, name },
- roles,
- createdAt
- } = identityMember;
- return (
- <Tr
- className="group h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
- key={`st-v3-${id}`}
- role="button"
- tabIndex={0}
- onKeyDown={(evt) => {
- if (evt.key === "Enter") {
- navigate({
- to: `${getProjectBaseURL(currentProject.type)}/identities/$identityId` as const,
- params: {
- projectId: currentProject.id,
- identityId: id
- }
- });
- }
- }}
- onClick={() =>
+ <ProjectPermissionCan
+ I={ProjectPermissionActions.Create}
+ a={ProjectPermissionSub.Identity}
+ >
+ {(isAllowed) => (
+ <Button
+ colorSchema="secondary"
+ type="submit"
+ leftIcon={<FontAwesomeIcon icon={faPlus} />}
+ onClick={() => handlePopUpOpen("identity")}
+ isDisabled={!isAllowed}
+ >
+ Add Identity
+ </Button>
+ )}
+ </ProjectPermissionCan>
+ </div>
+ <Input
+ containerClassName="mb-4"
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
+ placeholder="Search identities by name..."
+ />
+ <TableContainer>
+ <Table>
+ <THead>
+ <Tr className="h-14">
+ <Th className="w-1/3">
+ <div className="flex items-center">
+ Name
+ <IconButton
+ variant="plain"
+ className={`ml-2 ${
+ orderBy === ProjectIdentityOrderBy.Name ? "" : "opacity-30"
+ }`}
+ ariaLabel="sort"
+ onClick={() => handleSort(ProjectIdentityOrderBy.Name)}
+ >
+ <FontAwesomeIcon
+ icon={
+ orderDirection === OrderByDirection.DESC &&
+ orderBy === ProjectIdentityOrderBy.Name
+ ? faArrowUp
+ : faArrowDown
+ }
+ />
+ </IconButton>
+ </div>
+ </Th>
+ <Th className="w-1/3">Role</Th>
+ <Th>Added on</Th>
+ <Th className="w-5">{isFetching ? <Spinner size="xs" /> : null}</Th>
+ </Tr>
+ </THead>
+ <TBody>
+ {isPending && <TableSkeleton columns={4} innerKey="project-identities" />}
+ {!isPending &&
+ data &&
+ data.identityMemberships.length > 0 &&
+ data.identityMemberships.map((identityMember) => {
+ const {
+ identity: { id, name },
+ roles,
+ createdAt
+ } = identityMember;
+ return (
+ <Tr
+ className="group h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
+ key={`st-v3-${id}`}
+ role="button"
+ tabIndex={0}
+ onKeyDown={(evt) => {
+ if (evt.key === "Enter") {
navigate({
to: `${getProjectBaseURL(currentProject.type)}/identities/$identityId` as const,
params: {
projectId: currentProject.id,
identityId: id
}
- })
+ });
}
- >
- <Td>{name}</Td>
+ }}
+ onClick={() =>
+ navigate({
+ to: `${getProjectBaseURL(currentProject.type)}/identities/$identityId` as const,
+ params: {
+ projectId: currentProject.id,
+ identityId: id
+ }
+ })
+ }
+ >
+ <Td>{name}</Td>
- <Td>
- <div className="flex items-center space-x-2">
- {roles
- .slice(0, MAX_ROLES_TO_BE_SHOWN_IN_TABLE)
- .map(
- ({
- role,
- customRoleName,
- id: roleId,
- isTemporary,
- temporaryAccessEndTime
- }) => {
- const isExpired =
- new Date() > new Date(temporaryAccessEndTime || ("" as string));
- return (
- <Tag key={roleId}>
- <div className="flex items-center space-x-2">
- <div className="capitalize">
- {formatProjectRoleName(role, customRoleName)}
- </div>
- {isTemporary && (
- <div>
- <Tooltip
- content={
- isExpired
- ? "Timed role expired"
- : "Timed role access"
- }
- >
- <FontAwesomeIcon
- icon={faClock}
- className={twMerge(isExpired && "text-red-600")}
- />
- </Tooltip>
- </div>
- )}
+ <Td>
+ <div className="flex items-center space-x-2">
+ {roles
+ .slice(0, MAX_ROLES_TO_BE_SHOWN_IN_TABLE)
+ .map(
+ ({
+ role,
+ customRoleName,
+ id: roleId,
+ isTemporary,
+ temporaryAccessEndTime
+ }) => {
+ const isExpired =
+ new Date() > new Date(temporaryAccessEndTime || ("" as string));
+ return (
+ <Tag key={roleId}>
+ <div className="flex items-center space-x-2">
+ <div className="capitalize">
+ {formatProjectRoleName(role, customRoleName)}
</div>
- </Tag>
- );
- }
- )}
- {roles.length > MAX_ROLES_TO_BE_SHOWN_IN_TABLE && (
- <HoverCard>
- <HoverCardTrigger>
- <Tag>+{roles.length - MAX_ROLES_TO_BE_SHOWN_IN_TABLE}</Tag>
- </HoverCardTrigger>
- <HoverCardContent className="border border-gray-700 bg-mineshaft-800 p-4">
- {roles
- .slice(MAX_ROLES_TO_BE_SHOWN_IN_TABLE)
- .map(
- ({
- role,
- customRoleName,
- id: roleId,
- isTemporary,
- temporaryAccessEndTime
- }) => {
- const isExpired =
- new Date() >
- new Date(temporaryAccessEndTime || ("" as string));
- return (
- <Tag key={roleId} className="capitalize">
- <div className="flex items-center space-x-2">
+ {isTemporary && (
+ <div>
+ <Tooltip
+ content={
+ isExpired ? "Timed role expired" : "Timed role access"
+ }
+ >
+ <FontAwesomeIcon
+ icon={faClock}
+ className={twMerge(isExpired && "text-red-600")}
+ />
+ </Tooltip>
+ </div>
+ )}
+ </div>
+ </Tag>
+ );
+ }
+ )}
+ {roles.length > MAX_ROLES_TO_BE_SHOWN_IN_TABLE && (
+ <HoverCard>
+ <HoverCardTrigger>
+ <Tag>+{roles.length - MAX_ROLES_TO_BE_SHOWN_IN_TABLE}</Tag>
+ </HoverCardTrigger>
+ <HoverCardContent className="border border-gray-700 bg-mineshaft-800 p-4">
+ {roles
+ .slice(MAX_ROLES_TO_BE_SHOWN_IN_TABLE)
+ .map(
+ ({
+ role,
+ customRoleName,
+ id: roleId,
+ isTemporary,
+ temporaryAccessEndTime
+ }) => {
+ const isExpired =
+ new Date() >
+ new Date(temporaryAccessEndTime || ("" as string));
+ return (
+ <Tag key={roleId} className="capitalize">
+ <div className="flex items-center space-x-2">
+ <div>{formatProjectRoleName(role, customRoleName)}</div>
+ {isTemporary && (
<div>
- {formatProjectRoleName(role, customRoleName)}
+ <Tooltip
+ content={
+ isExpired
+ ? "Access expired"
+ : "Temporary access"
+ }
+ >
+ <FontAwesomeIcon
+ icon={faClock}
+ className={twMerge(
+ new Date() >
+ new Date(
+ temporaryAccessEndTime as string
+ ) && "text-red-600"
+ )}
+ />
+ </Tooltip>
</div>
- {isTemporary && (
- <div>
- <Tooltip
- content={
- isExpired
- ? "Access expired"
- : "Temporary access"
- }
- >
- <FontAwesomeIcon
- icon={faClock}
- className={twMerge(
- new Date() >
- new Date(
- temporaryAccessEndTime as string
- ) && "text-red-600"
- )}
- />
- </Tooltip>
- </div>
- )}
- </div>
- </Tag>
- );
- }
- )}
- </HoverCardContent>
- </HoverCard>
- )}
- </div>
- </Td>
- <Td>{format(new Date(createdAt), "yyyy-MM-dd")}</Td>
- <Td className="flex justify-end space-x-2">
- <Tooltip className="max-w-sm text-center" content="Options">
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <IconButton
- ariaLabel="Options"
- colorSchema="secondary"
- className="w-6"
- variant="plain"
- >
- <FontAwesomeIcon icon={faEllipsisV} />
- </IconButton>
- </DropdownMenuTrigger>
- <DropdownMenuContent sideOffset={2} align="end">
- <ProjectPermissionCan
- I={ProjectPermissionActions.Delete}
- a={subject(ProjectPermissionSub.Identity, {
- identityId: id
- })}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- icon={<FontAwesomeIcon icon={faCircleXmark} />}
- isDisabled={!isAllowed}
- onClick={(evt) => {
- evt.stopPropagation();
- evt.preventDefault();
- handlePopUpOpen("deleteIdentity", {
- identityId: id,
- name
- });
- }}
- >
- Remove Identity From Project
- </DropdownMenuItem>
+ )}
+ </div>
+ </Tag>
+ );
+ }
)}
- </ProjectPermissionCan>
- </DropdownMenuContent>
- </DropdownMenu>
- </Tooltip>
- </Td>
- </Tr>
- );
- })}
- </TBody>
- </Table>
- {!isPending && data && totalCount > 0 && (
- <Pagination
- count={totalCount}
- page={page}
- perPage={perPage}
- onChangePage={(newPage) => setPage(newPage)}
- onChangePerPage={handlePerPageChange}
- />
- )}
- {!isPending && data && data?.identityMemberships.length === 0 && (
- <EmptyState
- title={
- debouncedSearch.trim().length > 0
- ? "No identities match search filter"
- : "No identities have been added to this project"
- }
- icon={faServer}
- />
- )}
- </TableContainer>
- <IdentityModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
- <DeleteActionModal
- isOpen={popUp.deleteIdentity.isOpen}
- title={`Are you sure you want to remove ${
- (popUp?.deleteIdentity?.data as { name: string })?.name || ""
- } from the project?`}
- onChange={(isOpen) => handlePopUpToggle("deleteIdentity", isOpen)}
- deleteKey="confirm"
- onDeleteApproved={() =>
- onRemoveIdentitySubmit(
- (popUp?.deleteIdentity?.data as { identityId: string })?.identityId
- )
- }
- />
- </div>
- </motion.div>
+ </HoverCardContent>
+ </HoverCard>
+ )}
+ </div>
+ </Td>
+ <Td>{format(new Date(createdAt), "yyyy-MM-dd")}</Td>
+ <Td className="flex justify-end space-x-2">
+ <Tooltip className="max-w-sm text-center" content="Options">
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <IconButton
+ ariaLabel="Options"
+ colorSchema="secondary"
+ className="w-6"
+ variant="plain"
+ >
+ <FontAwesomeIcon icon={faEllipsisV} />
+ </IconButton>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent sideOffset={2} align="end">
+ <ProjectPermissionCan
+ I={ProjectPermissionActions.Delete}
+ a={subject(ProjectPermissionSub.Identity, {
+ identityId: id
+ })}
+ >
+ {(isAllowed) => (
+ <DropdownMenuItem
+ icon={<FontAwesomeIcon icon={faCircleXmark} />}
+ isDisabled={!isAllowed}
+ onClick={(evt) => {
+ evt.stopPropagation();
+ evt.preventDefault();
+ handlePopUpOpen("deleteIdentity", {
+ identityId: id,
+ name
+ });
+ }}
+ >
+ Remove Identity From Project
+ </DropdownMenuItem>
+ )}
+ </ProjectPermissionCan>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </Tooltip>
+ </Td>
+ </Tr>
+ );
+ })}
+ </TBody>
+ </Table>
+ {!isPending && data && totalCount > 0 && (
+ <Pagination
+ count={totalCount}
+ page={page}
+ perPage={perPage}
+ onChangePage={(newPage) => setPage(newPage)}
+ onChangePerPage={handlePerPageChange}
+ />
+ )}
+ {!isPending && data && data?.identityMemberships.length === 0 && (
+ <EmptyState
+ title={
+ debouncedSearch.trim().length > 0
+ ? "No identities match search filter"
+ : "No identities have been added to this project"
+ }
+ icon={faServer}
+ />
+ )}
+ </TableContainer>
+ <IdentityModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
+ <DeleteActionModal
+ isOpen={popUp.deleteIdentity.isOpen}
+ title={`Are you sure you want to remove ${
+ (popUp?.deleteIdentity?.data as { name: string })?.name || ""
+ } from the project?`}
+ onChange={(isOpen) => handlePopUpToggle("deleteIdentity", isOpen)}
+ deleteKey="confirm"
+ onDeleteApproved={() =>
+ onRemoveIdentitySubmit(
+ (popUp?.deleteIdentity?.data as { identityId: string })?.identityId
+ )
+ }
+ />
+ </div>
);
},
{ action: ProjectPermissionActions.Read, subject: ProjectPermissionSub.Identity }
diff --git a/frontend/src/pages/project/AccessControlPage/components/MembersTab/MembersTab.tsx b/frontend/src/pages/project/AccessControlPage/components/MembersTab/MembersTab.tsx
index 77a5ba827a..bb120627a6 100644
--- a/frontend/src/pages/project/AccessControlPage/components/MembersTab/MembersTab.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/MembersTab/MembersTab.tsx
@@ -1,5 +1,3 @@
-import { motion } from "framer-motion";
-
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
import { withProjectPermission } from "@app/hoc";
@@ -7,17 +5,7 @@ import { MembersSection } from "./components";
export const MembersTab = withProjectPermission(
() => {
- return (
- <motion.div
- key="panel-project-members"
- transition={{ duration: 0.15 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- >
- <MembersSection />
- </motion.div>
- );
+ return <MembersSection />;
},
{
action: ProjectPermissionActions.Read,
diff --git a/frontend/src/pages/project/AccessControlPage/components/ProjectRoleListTab/ProjectRoleListTab.tsx b/frontend/src/pages/project/AccessControlPage/components/ProjectRoleListTab/ProjectRoleListTab.tsx
index 89ac578015..0d200477d0 100644
--- a/frontend/src/pages/project/AccessControlPage/components/ProjectRoleListTab/ProjectRoleListTab.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/ProjectRoleListTab/ProjectRoleListTab.tsx
@@ -1,5 +1,3 @@
-import { motion } from "framer-motion";
-
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
import { withProjectPermission } from "@app/hoc";
@@ -7,17 +5,7 @@ import { ProjectRoleList } from "./components/ProjectRoleList";
export const ProjectRoleListTab = withProjectPermission(
() => {
- return (
- <motion.div
- key="role-list"
- transition={{ duration: 0.15 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- >
- <ProjectRoleList />
- </motion.div>
- );
+ return <ProjectRoleList />;
},
{ action: ProjectPermissionActions.Read, subject: ProjectPermissionSub.Role }
);
diff --git a/frontend/src/pages/project/AccessControlPage/components/ServiceTokenTab/ServiceTokenTab.tsx b/frontend/src/pages/project/AccessControlPage/components/ServiceTokenTab/ServiceTokenTab.tsx
index eefd73a093..8327b8322f 100644
--- a/frontend/src/pages/project/AccessControlPage/components/ServiceTokenTab/ServiceTokenTab.tsx
+++ b/frontend/src/pages/project/AccessControlPage/components/ServiceTokenTab/ServiceTokenTab.tsx
@@ -1,20 +1,12 @@
// import { faWarning } from "@fortawesome/free-solid-svg-icons";
// import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { motion } from "framer-motion";
import { ServiceTokenSection } from "./components";
export const ServiceTokenTab = () => {
return (
- <motion.div
- key="panel-service-token"
- transition={{ duration: 0.15 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- >
- <div className="space-y-3">
- {/* <div className="flex w-full flex-row items-center rounded-md border border-primary-600/70 bg-primary/[.07] p-4 text-base text-white">
+ <div className="space-y-3">
+ {/* <div className="flex w-full flex-row items-center rounded-md border border-primary-600/70 bg-primary/[.07] p-4 text-base text-white">
<FontAwesomeIcon icon={faWarning} className="pr-6 text-4xl text-white/80" />
<div className="flex w-full flex-col text-sm">
<span className="mb-4 text-lg font-medium">Deprecation Notice</span>
@@ -42,8 +34,7 @@ export const ServiceTokenTab = () => {
</p>
</div>
</div> */}
- <ServiceTokenSection />
- </div>
- </motion.div>
+ <ServiceTokenSection />
+ </div>
);
};
diff --git a/frontend/src/pages/project/AppConnectionsPage/AppConnectionsPage.tsx b/frontend/src/pages/project/AppConnectionsPage/AppConnectionsPage.tsx
index 78665e6244..6fddc663c8 100644
--- a/frontend/src/pages/project/AppConnectionsPage/AppConnectionsPage.tsx
+++ b/frontend/src/pages/project/AppConnectionsPage/AppConnectionsPage.tsx
@@ -21,7 +21,7 @@ export const AppConnectionsPage = withProjectPermission(
<meta property="og:image" content="/images/message.png" />
</Helmet>
<div className="flex w-full justify-center bg-bunker-800 text-white">
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader
scope="project"
className="w-full"
diff --git a/frontend/src/pages/project/AuditLogsPage/AuditLogsPage.tsx b/frontend/src/pages/project/AuditLogsPage/AuditLogsPage.tsx
index 37155da70c..6e88f74377 100644
--- a/frontend/src/pages/project/AuditLogsPage/AuditLogsPage.tsx
+++ b/frontend/src/pages/project/AuditLogsPage/AuditLogsPage.tsx
@@ -8,13 +8,13 @@ export const AuditLogsPage = () => {
const { currentProject } = useProject();
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
<Helmet>
<title>Project Audit Logs</title>
<link rel="icon" href="/infisical.ico" />
</Helmet>
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader
scope="project"
title="Audit logs"
diff --git a/frontend/src/pages/project/GroupDetailsByIDPage/GroupDetailsByIDPage.tsx b/frontend/src/pages/project/GroupDetailsByIDPage/GroupDetailsByIDPage.tsx
index 409d78633d..e1db65a9a0 100644
--- a/frontend/src/pages/project/GroupDetailsByIDPage/GroupDetailsByIDPage.tsx
+++ b/frontend/src/pages/project/GroupDetailsByIDPage/GroupDetailsByIDPage.tsx
@@ -1,11 +1,16 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useParams } from "@tanstack/react-router";
+import { formatRelative } from "date-fns";
import { ProjectPermissionCan } from "@app/components/permissions";
import { EmptyState, PageHeader, Spinner } from "@app/components/v2";
import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";
+import { getProjectBaseURL } from "@app/helpers/project";
import { useGetWorkspaceGroupMembershipDetails } from "@app/hooks/api/projects/queries";
+import { ProjectAccessControlTabs } from "@app/types/project";
import { GroupDetailsSection } from "./components/GroupDetailsSection";
import { GroupMembersSection } from "./components/GroupMembersSection";
@@ -31,10 +36,27 @@ const Page = () => {
);
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{groupMembership ? (
- <div className="mx-auto mb-6 w-full max-w-7xl">
- <PageHeader scope="project" title={groupMembership.group.name} />
+ <div className="mx-auto mb-6 w-full max-w-8xl">
+ <Link
+ to={`${getProjectBaseURL(currentProject.type)}/access-management`}
+ params={{
+ projectId: currentProject.id
+ }}
+ search={{
+ selectedTab: ProjectAccessControlTabs.Groups
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Groups
+ </Link>
+ <PageHeader
+ scope="project"
+ title={groupMembership.group.name}
+ description={`Group joined on ${groupMembership?.createdAt && formatRelative(new Date(groupMembership?.createdAt || ""), new Date())}`}
+ />
<div className="flex">
<div className="mr-4 w-96">
<GroupDetailsSection groupMembership={groupMembership} />
diff --git a/frontend/src/pages/project/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx b/frontend/src/pages/project/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
index 061d537b16..42b8bf96bb 100644
--- a/frontend/src/pages/project/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
+++ b/frontend/src/pages/project/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
@@ -1,7 +1,9 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
import { subject } from "@casl/ability";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { formatRelative } from "date-fns";
import { createNotification } from "@app/components/notifications";
@@ -28,6 +30,7 @@ import {
useGetWorkspaceIdentityMembershipDetails
} from "@app/hooks/api";
import { ActorType } from "@app/hooks/api/auditLogs/enums";
+import { ProjectAccessControlTabs } from "@app/types/project";
import { IdentityProjectAdditionalPrivilegeSection } from "./components/IdentityProjectAdditionalPrivilegeSection";
import { IdentityRoleDetailsSection } from "./components/IdentityRoleDetailsSection";
@@ -113,9 +116,22 @@ const Page = () => {
}
return (
- <div className="container mx-auto flex max-w-7xl flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex max-w-8xl flex-col justify-between bg-bunker-800 text-white">
{identityMembershipDetails ? (
<>
+ <Link
+ to={`${getProjectBaseURL(currentProject.type)}/access-management`}
+ params={{
+ projectId
+ }}
+ search={{
+ selectedTab: ProjectAccessControlTabs.Identities
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Identities
+ </Link>
<PageHeader
scope="project"
title={identityMembershipDetails?.identity?.name}
diff --git a/frontend/src/pages/project/MemberDetailsByIDPage/MemberDetailsByIDPage.tsx b/frontend/src/pages/project/MemberDetailsByIDPage/MemberDetailsByIDPage.tsx
index 717226cfcb..6d73451788 100644
--- a/frontend/src/pages/project/MemberDetailsByIDPage/MemberDetailsByIDPage.tsx
+++ b/frontend/src/pages/project/MemberDetailsByIDPage/MemberDetailsByIDPage.tsx
@@ -1,6 +1,8 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { formatRelative } from "date-fns";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
@@ -29,6 +31,7 @@ import {
useGetWorkspaceUserDetails
} from "@app/hooks/api";
import { ActorType } from "@app/hooks/api/auditLogs/enums";
+import { ProjectAccessControlTabs } from "@app/types/project";
import { MemberProjectAdditionalPrivilegeSection } from "./components/MemberProjectAdditionalPrivilegeSection";
import { MemberRoleDetailsSection } from "./components/MemberRoleDetailsSection";
@@ -115,9 +118,22 @@ export const Page = () => {
}
return (
- <div className="container mx-auto flex max-w-7xl flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex max-w-8xl flex-col justify-between bg-bunker-800 text-white">
{membershipDetails ? (
<>
+ <Link
+ to={`${getProjectBaseURL(currentProject.type)}/access-management`}
+ params={{
+ projectId: currentProject.id
+ }}
+ search={{
+ selectedTab: ProjectAccessControlTabs.Member
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Users
+ </Link>
<PageHeader
scope="project"
title={
diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/RoleDetailsBySlugPage.tsx b/frontend/src/pages/project/RoleDetailsBySlugPage/RoleDetailsBySlugPage.tsx
index 3345f2b257..e2eaeff55c 100644
--- a/frontend/src/pages/project/RoleDetailsBySlugPage/RoleDetailsBySlugPage.tsx
+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/RoleDetailsBySlugPage.tsx
@@ -1,8 +1,14 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { faCopy, faEdit, faEllipsisV, faTrash } from "@fortawesome/free-solid-svg-icons";
+import {
+ faChevronLeft,
+ faCopy,
+ faEdit,
+ faEllipsisV,
+ faTrash
+} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
@@ -86,20 +92,29 @@ const Page = () => {
);
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
+ <Link
+ to={`${getProjectBaseURL(currentProject.type)}/access-management`}
+ params={{
+ projectId
+ }}
+ search={{
+ selectedTab: ProjectAccessControlTabs.Roles
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Roles
+ </Link>
<PageHeader
scope="project"
- title={
- <div className="flex flex-col">
- <div>
- <span>{data.name}</span>
- <p className="text-sm leading-3 font-normal text-mineshaft-400 normal-case">
- {data.slug} {data.description && `- ${data.description}`}
- </p>
- </div>
- </div>
+ title={data.name}
+ description={
+ <>
+ {data.slug} {data.description && `- ${data.description}`}
+ </>
}
>
{isCustomRole && (
diff --git a/frontend/src/pages/secret-manager/CommitDetailsPage/CommitDetailsPage.tsx b/frontend/src/pages/secret-manager/CommitDetailsPage/CommitDetailsPage.tsx
index 7c8bd2a02a..18153e257e 100644
--- a/frontend/src/pages/secret-manager/CommitDetailsPage/CommitDetailsPage.tsx
+++ b/frontend/src/pages/secret-manager/CommitDetailsPage/CommitDetailsPage.tsx
@@ -64,7 +64,7 @@ export const CommitDetailsPage = () => {
};
return (
- <div className="mx-auto flex w-full max-w-7xl justify-center bg-bunker-800 pt-2 pb-4 text-white">
+ <div className="mx-auto flex w-full max-w-8xl justify-center bg-bunker-800 pt-2 pb-4 text-white">
<div className="w-full max-w-[75vw]">
<ProjectPermissionCan
renderGuardBanner
diff --git a/frontend/src/pages/secret-manager/CommitDetailsPage/components/RollbackPreviewTab/RollbackPreviewTab.tsx b/frontend/src/pages/secret-manager/CommitDetailsPage/components/RollbackPreviewTab/RollbackPreviewTab.tsx
index a3a25b1cc8..31dd5aa113 100644
--- a/frontend/src/pages/secret-manager/CommitDetailsPage/components/RollbackPreviewTab/RollbackPreviewTab.tsx
+++ b/frontend/src/pages/secret-manager/CommitDetailsPage/components/RollbackPreviewTab/RollbackPreviewTab.tsx
@@ -297,7 +297,7 @@ export const RollbackPreviewTab = (): JSX.Element => {
};
return (
- <div className="mx-auto flex w-full max-w-7xl justify-center bg-bunker-800 pt-2 pb-4 text-white">
+ <div className="mx-auto flex w-full max-w-8xl justify-center bg-bunker-800 pt-2 pb-4 text-white">
<ProjectPermissionCan
renderGuardBanner
I={ProjectPermissionCommitsActions.PerformRollback}
diff --git a/frontend/src/pages/secret-manager/CommitsPage/CommitsPage.tsx b/frontend/src/pages/secret-manager/CommitsPage/CommitsPage.tsx
index e456bbdf33..baca3e79c4 100644
--- a/frontend/src/pages/secret-manager/CommitsPage/CommitsPage.tsx
+++ b/frontend/src/pages/secret-manager/CommitsPage/CommitsPage.tsx
@@ -1,4 +1,6 @@
-import { useNavigate, useParams, useSearch } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams, useSearch } from "@tanstack/react-router";
import { ProjectPermissionCan } from "@app/components/permissions";
import { PageHeader } from "@app/components/v2";
@@ -46,8 +48,19 @@ export const CommitsPage = () => {
};
return (
- <div className="mx-auto flex h-full w-full max-w-7xl justify-center bg-bunker-800 py-4 text-white">
- <div className="w-full max-w-[75vw]">
+ <div className="mx-auto mb-4 flex h-full w-full max-w-8xl justify-center bg-bunker-800 text-white">
+ <div className="w-full">
+ <Link
+ to="/projects/secret-management/$projectId/secrets/$envSlug"
+ params={{
+ projectId: currentProject.id,
+ envSlug
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Secrets
+ </Link>
<PageHeader
scope="project"
title="Commits"
diff --git a/frontend/src/pages/secret-manager/IPAllowlistPage/IPAllowlistPage.tsx b/frontend/src/pages/secret-manager/IPAllowlistPage/IPAllowlistPage.tsx
index 6453e31184..7492ea6a1d 100644
--- a/frontend/src/pages/secret-manager/IPAllowlistPage/IPAllowlistPage.tsx
+++ b/frontend/src/pages/secret-manager/IPAllowlistPage/IPAllowlistPage.tsx
@@ -15,7 +15,7 @@ export const IPAllowListPage = () => {
<link rel="icon" href="/infisical.ico" />
</Helmet>
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
- <div className="w-full max-w-7xl px-6">
+ <div className="w-full max-w-8xl px-6">
<div className="my-6">
<p className="text-3xl font-medium text-gray-200">IP Allowlist</p>
<div />
diff --git a/frontend/src/pages/secret-manager/IntegrationsDetailsByIDPage/IntegrationsDetailsByIDPage.tsx b/frontend/src/pages/secret-manager/IntegrationsDetailsByIDPage/IntegrationsDetailsByIDPage.tsx
index 0eaa7dfacc..5688d6ff10 100644
--- a/frontend/src/pages/secret-manager/IntegrationsDetailsByIDPage/IntegrationsDetailsByIDPage.tsx
+++ b/frontend/src/pages/secret-manager/IntegrationsDetailsByIDPage/IntegrationsDetailsByIDPage.tsx
@@ -90,9 +90,9 @@ export const IntegrationDetailsByIDPage = () => {
<meta property="og:title" content="Manage your .env files in seconds" />
<meta name="og:description" content={t("integrations.description") as string} />
</Helmet>
- <div className="mx-auto flex max-w-7xl flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex max-w-8xl flex-col justify-between bg-bunker-800 text-white">
{integration ? (
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title={`${integrationSlugNameMapping[integration.integration]} Integration`}
diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/IntegrationsListPage.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/IntegrationsListPage.tsx
index 4e2a0a703e..655a112f57 100644
--- a/frontend/src/pages/secret-manager/IntegrationsListPage/IntegrationsListPage.tsx
+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/IntegrationsListPage.tsx
@@ -45,21 +45,25 @@ export const IntegrationsListPage = () => {
<meta property="og:title" content="Manage your .env files in seconds" />
<meta name="og:description" content={t("integrations.description") as string} />
</Helmet>
- <div className="relative container mx-auto max-w-7xl pb-12 text-white">
+ <div className="relative mx-auto max-w-8xl pb-12 text-white">
<div className="mb-8">
<PageHeader
scope="project"
title="Integrations"
description="Manage integrations with third-party services."
/>
- <Tabs value={selectedTab} onValueChange={updateSelectedTab}>
+ <Tabs orientation="vertical" value={selectedTab} onValueChange={updateSelectedTab}>
<TabList>
- <Tab value={IntegrationsListPageTabs.SecretSyncs}>Secret Syncs</Tab>
- <Tab value={IntegrationsListPageTabs.NativeIntegrations}>Native Integrations</Tab>
- <Tab value={IntegrationsListPageTabs.FrameworkIntegrations}>
+ <Tab variant="project" value={IntegrationsListPageTabs.SecretSyncs}>
+ Secret Syncs
+ </Tab>
+ <Tab variant="project" value={IntegrationsListPageTabs.NativeIntegrations}>
+ Native Integrations
+ </Tab>
+ <Tab variant="project" value={IntegrationsListPageTabs.FrameworkIntegrations}>
Framework Integrations
</Tab>
- <Tab value={IntegrationsListPageTabs.InfrastructureIntegrations}>
+ <Tab variant="project" value={IntegrationsListPageTabs.InfrastructureIntegrations}>
Infrastructure Integrations
</Tab>
</TabList>
diff --git a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
index 022b33f88b..0b496fc66d 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
@@ -911,7 +911,7 @@ export const OverviewPage = () => {
<meta property="og:title" content={String(t("dashboard.og-title"))} />
<meta name="og:description" content={String(t("dashboard.og-description"))} />
</Helmet>
- <div className="relative mx-auto max-w-7xl text-mineshaft-50 dark:scheme-dark">
+ <div className="relative mx-auto max-w-8xl text-mineshaft-50 dark:scheme-dark">
<div className="flex w-full items-baseline justify-between">
<PageHeader
scope="project"
@@ -959,7 +959,7 @@ export const OverviewPage = () => {
}
/>
</div>
- <div className="mt-4 flex items-center justify-between">
+ <div className="flex items-center justify-between">
<FolderBreadCrumbs secretPath={secretPath} onResetSearch={handleResetSearch} />
<div className="flex flex-row items-center justify-center space-x-2">
{isTableFiltered && (
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchDynamicSecretItem.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchDynamicSecretItem.tsx
index 79911b6eeb..06dff9d3f4 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchDynamicSecretItem.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchDynamicSecretItem.tsx
@@ -46,7 +46,7 @@ export const QuickSearchDynamicSecretItem = ({
</span>
<span className="text-xs text-mineshaft-400">
<FontAwesomeIcon size="xs" className="mr-0.5 text-yellow-700" icon={faFolder} />{" "}
- <Tooltip className="max-w-7xl" content={groupDynamicSecret.path}>
+ <Tooltip className="max-w-8xl" content={groupDynamicSecret.path}>
<span>{reverseTruncate(groupDynamicSecret.path)}</span>
</Tooltip>
</span>
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchFolderItem.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchFolderItem.tsx
index 92d2fac3ed..55b21b162b 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchFolderItem.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchFolderItem.tsx
@@ -32,7 +32,7 @@ export const QuickSearchFolderItem = ({ folderGroup, onClose }: Props) => {
>
<Td className="w-full whitespace-nowrap">
<FontAwesomeIcon className="text-yellow-700" icon={faFolder} />
- <Tooltip content={groupFolder.path} className="max-w-7xl">
+ <Tooltip content={groupFolder.path} className="max-w-8xl">
<div className="ml-2 inline-block">{reverseTruncate(groupFolder.path)}</div>
</Tooltip>
</Td>
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchSecretItem.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchSecretItem.tsx
index a593b0023b..60ad93a574 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchSecretItem.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchSecretItem.tsx
@@ -126,7 +126,7 @@ export const QuickSearchSecretItem = ({
</span>
<span className="text-xs text-mineshaft-400">
<FontAwesomeIcon size="xs" className="mr-0.5 text-yellow-700" icon={faFolder} />{" "}
- <Tooltip className="max-w-7xl" content={groupSecret.path}>
+ <Tooltip className="max-w-8xl" content={groupSecret.path}>
<span>{reverseTruncate(groupSecret.path ?? "")}</span>
</Tooltip>
</span>
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchSecretRotationItem.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchSecretRotationItem.tsx
index fc4b669788..8790f1c74c 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchSecretRotationItem.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretSearchInput/components/QuickSearchSecretRotationItem.tsx
@@ -42,7 +42,7 @@ export const QuickSearchSecretRotationItem = ({ secretRotationGroup, onClose }:
</span>
<span className="text-xs text-mineshaft-400">
<FontAwesomeIcon size="xs" className="mr-0.5 text-yellow-700" icon={faFolder} />{" "}
- <Tooltip className="max-w-7xl" content={groupSecretRotation.folder.path}>
+ <Tooltip className="max-w-8xl" content={groupSecretRotation.folder.path}>
<span>{reverseTruncate(groupSecretRotation.folder.path)}</span>
</Tooltip>
</span>
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/utils/index.ts b/frontend/src/pages/secret-manager/OverviewPage/components/utils/index.ts
index 43caf7aa03..51be969ce8 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/utils/index.ts
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/utils/index.ts
@@ -1,7 +1,7 @@
export const getExpandedRowStyle = (scrollOffset: number) => ({
marginLeft: scrollOffset,
- width: "calc(100vw - 275px)", // accounts for sidebar and margin
- maxWidth: "1270px" // largest width of table on ultra-wide
+ width: "calc(100vw - 110px)", // accounts for sidebar and margin
+ maxWidth: "1404px" // largest width of table on ultra-wide
});
type GetHeaderStyleParams = {
diff --git a/frontend/src/pages/secret-manager/SecretApprovalsPage/SecretApprovalsPage.tsx b/frontend/src/pages/secret-manager/SecretApprovalsPage/SecretApprovalsPage.tsx
index 6813aac07f..a2e0a3b69f 100644
--- a/frontend/src/pages/secret-manager/SecretApprovalsPage/SecretApprovalsPage.tsx
+++ b/frontend/src/pages/secret-manager/SecretApprovalsPage/SecretApprovalsPage.tsx
@@ -38,27 +38,29 @@ export const SecretApprovalsPage = () => {
<meta property="og:title" content={String(t("approval.og-title"))} />
<meta name="og:description" content={String(t("approval.og-description"))} />
</Helmet>
- <div className="container mx-auto h-full w-full max-w-7xl bg-bunker-800 text-white">
+ <div className="mx-auto h-full w-full max-w-8xl bg-bunker-800 text-white">
<PageHeader
scope="project"
title="Approval Workflows"
description="Create approval policies for any modifications to secrets in sensitive environments and folders."
/>
- <Tabs defaultValue={defaultTab}>
+ <Tabs orientation="vertical" defaultValue={defaultTab}>
<TabList>
- <Tab value={TabSection.SecretApprovalRequests}>
+ <Tab variant="project" value={TabSection.SecretApprovalRequests}>
Change Requests
{Boolean(secretApprovalReqCount?.open) && (
<Badge className="ml-2">{secretApprovalReqCount?.open}</Badge>
)}
</Tab>
- <Tab value={TabSection.ResourceApprovalRequests}>
+ <Tab variant="project" value={TabSection.ResourceApprovalRequests}>
Access Requests
{Boolean(accessApprovalRequestCount?.pendingCount) && (
<Badge className="ml-2">{accessApprovalRequestCount?.pendingCount}</Badge>
)}
</Tab>
- <Tab value={TabSection.Policies}>Policies</Tab>
+ <Tab variant="project" value={TabSection.Policies}>
+ Policies
+ </Tab>
</TabList>
<TabPanel value={TabSection.SecretApprovalRequests}>
<SecretApprovalRequest />
diff --git a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/AccessApprovalRequest.tsx b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/AccessApprovalRequest.tsx
index fce55b077e..b1df863125 100644
--- a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/AccessApprovalRequest.tsx
+++ b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/AccessApprovalRequest.tsx
@@ -19,7 +19,6 @@ import {
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { format, formatDistance } from "date-fns";
-import { AnimatePresence, motion } from "framer-motion";
import { twMerge } from "tailwind-merge";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
@@ -298,108 +297,132 @@ export const AccessApprovalRequest = ({
const isFiltered = Boolean(search || envFilter || requestedByFilter);
return (
- <AnimatePresence mode="wait">
- <motion.div
- key="approval-changes-list"
- transition={{ duration: 0.1 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- className="rounded-md text-gray-300"
- >
- <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="mb-4 flex items-center justify-between">
- <div>
- <div className="flex items-start gap-1">
- <p className="text-xl font-medium text-mineshaft-100">Access Requests</p>
- <a
- href="https://infisical.com/docs/documentation/platform/access-controls/access-requests"
- target="_blank"
- rel="noopener noreferrer"
- >
- <div className="mt-[0.32rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
- <span>Docs</span>
- <FontAwesomeIcon
- icon={faArrowUpRightFromSquare}
- className="mb-[0.07rem] ml-1.5 text-[10px]"
- />
- </div>
- </a>
- </div>
- <p className="text-sm text-bunker-300">
- Request and review access to secrets in sensitive environments and folders
- </p>
- </div>
- <Tooltip
- content="To submit Access Requests, your project needs to create Access Request policies first."
- isDisabled={policiesLoading || !!policies?.length}
- >
- <Button
- onClick={() => {
- if (subscription && !subscription?.secretApproval) {
- handlePopUpOpen("upgradePlan");
- return;
- }
- handlePopUpOpen("requestAccess");
- }}
- colorSchema="secondary"
- leftIcon={<FontAwesomeIcon icon={faPlus} />}
- isDisabled={policiesLoading || !policies?.length}
+ <>
+ <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
+ <div className="mb-4 flex items-center justify-between">
+ <div>
+ <div className="flex items-start gap-1">
+ <p className="text-xl font-medium text-mineshaft-100">Access Requests</p>
+ <a
+ href="https://infisical.com/docs/documentation/platform/access-controls/access-requests"
+ target="_blank"
+ rel="noopener noreferrer"
>
- Request Access
- </Button>
- </Tooltip>
- </div>
- <Input
- value={search}
- onChange={(e) => setSearch(e.target.value)}
- leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
- placeholder="Search approval requests by requesting user or environment..."
- className="flex-1"
- containerClassName="mb-4"
- />
- <div className="flex items-center space-x-8 rounded-t-md border-x border-t border-mineshaft-600 bg-mineshaft-800 px-8 py-3 text-sm">
- <div
- role="button"
- tabIndex={0}
- onClick={() => setStatusFilter("open")}
- onKeyDown={(evt) => {
- if (evt.key === "Enter") setStatusFilter("open");
- }}
- className={twMerge(
- "font-medium",
- statusFilter === "close" && "text-gray-500 duration-100 hover:text-gray-400"
- )}
- >
- <FontAwesomeIcon icon={faLock} className="mr-2" />
- {!!requestCount && requestCount?.pendingCount} Pending
+ <div className="mt-[0.32rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
+ <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
+ <span>Docs</span>
+ <FontAwesomeIcon
+ icon={faArrowUpRightFromSquare}
+ className="mb-[0.07rem] ml-1.5 text-[10px]"
+ />
+ </div>
+ </a>
</div>
- <div
- className={twMerge(
- "font-medium",
- statusFilter === "open" && "text-gray-500 duration-100 hover:text-gray-400"
- )}
- role="button"
- tabIndex={0}
- onClick={() => setStatusFilter("close")}
- onKeyDown={(evt) => {
- if (evt.key === "Enter") setStatusFilter("close");
+ <p className="text-sm text-bunker-300">
+ Request and review access to secrets in sensitive environments and folders
+ </p>
+ </div>
+ <Tooltip
+ content="To submit Access Requests, your project needs to create Access Request policies first."
+ isDisabled={policiesLoading || !!policies?.length}
+ >
+ <Button
+ onClick={() => {
+ if (subscription && !subscription?.secretApproval) {
+ handlePopUpOpen("upgradePlan");
+ return;
+ }
+ handlePopUpOpen("requestAccess");
}}
+ colorSchema="secondary"
+ leftIcon={<FontAwesomeIcon icon={faPlus} />}
+ isDisabled={policiesLoading || !policies?.length}
>
- <FontAwesomeIcon icon={faCheck} className="mr-2" />
- {!!requestCount && requestCount.finalizedCount} Closed
- </div>
- <div className="flex grow justify-end space-x-8">
+ Request Access
+ </Button>
+ </Tooltip>
+ </div>
+ <Input
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
+ placeholder="Search approval requests by requesting user or environment..."
+ className="flex-1"
+ containerClassName="mb-4"
+ />
+ <div className="flex items-center space-x-8 rounded-t-md border-x border-t border-mineshaft-600 bg-mineshaft-800 px-8 py-3 text-sm">
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={() => setStatusFilter("open")}
+ onKeyDown={(evt) => {
+ if (evt.key === "Enter") setStatusFilter("open");
+ }}
+ className={twMerge(
+ "font-medium",
+ statusFilter === "close" && "text-gray-500 duration-100 hover:text-gray-400"
+ )}
+ >
+ <FontAwesomeIcon icon={faLock} className="mr-2" />
+ {!!requestCount && requestCount?.pendingCount} Pending
+ </div>
+ <div
+ className={twMerge(
+ "font-medium",
+ statusFilter === "open" && "text-gray-500 duration-100 hover:text-gray-400"
+ )}
+ role="button"
+ tabIndex={0}
+ onClick={() => setStatusFilter("close")}
+ onKeyDown={(evt) => {
+ if (evt.key === "Enter") setStatusFilter("close");
+ }}
+ >
+ <FontAwesomeIcon icon={faCheck} className="mr-2" />
+ {!!requestCount && requestCount.finalizedCount} Closed
+ </div>
+ <div className="flex grow justify-end space-x-8">
+ <DropdownMenu>
+ <DropdownMenuTrigger>
+ <Button
+ variant="plain"
+ colorSchema="secondary"
+ className={envFilter ? "text-white" : "text-bunker-300"}
+ rightIcon={<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />}
+ >
+ Environments
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ align="end"
+ sideOffset={1}
+ className="max-h-80 thin-scrollbar overflow-y-auto"
+ >
+ <DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
+ Select an Environment
+ </DropdownMenuLabel>
+ {currentProject?.environments.map(({ slug, name }) => (
+ <DropdownMenuItem
+ onClick={() => setEnvFilter((state) => (state === slug ? undefined : slug))}
+ key={`request-filter-${slug}`}
+ icon={envFilter === slug && <FontAwesomeIcon icon={faCheckCircle} />}
+ iconPos="right"
+ >
+ {name}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ {!!permission.can(ProjectPermissionMemberActions.Read, ProjectPermissionSub.Member) && (
<DropdownMenu>
<DropdownMenuTrigger>
<Button
variant="plain"
colorSchema="secondary"
- className={envFilter ? "text-white" : "text-bunker-300"}
+ className={requestedByFilter ? "text-white" : "text-bunker-300"}
rightIcon={<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />}
>
- Environments
+ Requested By
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent
@@ -408,210 +431,172 @@ export const AccessApprovalRequest = ({
className="max-h-80 thin-scrollbar overflow-y-auto"
>
<DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
- Select an Environment
+ Select Requesting User
</DropdownMenuLabel>
- {currentProject?.environments.map(({ slug, name }) => (
+ {members?.map(({ user: membershipUser, id }) => (
<DropdownMenuItem
- onClick={() => setEnvFilter((state) => (state === slug ? undefined : slug))}
- key={`request-filter-${slug}`}
- icon={envFilter === slug && <FontAwesomeIcon icon={faCheckCircle} />}
+ onClick={() =>
+ setRequestedByFilter((state) =>
+ state === membershipUser.id ? undefined : membershipUser.id
+ )
+ }
+ key={`request-filter-member-${id}`}
+ icon={
+ requestedByFilter === membershipUser.id && (
+ <FontAwesomeIcon icon={faCheckCircle} />
+ )
+ }
iconPos="right"
>
- {name}
+ {membershipUser.username}
</DropdownMenuItem>
))}
</DropdownMenuContent>
</DropdownMenu>
- {!!permission.can(
- ProjectPermissionMemberActions.Read,
- ProjectPermissionSub.Member
- ) && (
- <DropdownMenu>
- <DropdownMenuTrigger>
- <Button
- variant="plain"
- colorSchema="secondary"
- className={requestedByFilter ? "text-white" : "text-bunker-300"}
- rightIcon={
- <FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />
- }
- >
- Requested By
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent
- align="end"
- sideOffset={1}
- className="max-h-80 thin-scrollbar overflow-y-auto"
- >
- <DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
- Select Requesting User
- </DropdownMenuLabel>
- {members?.map(({ user: membershipUser, id }) => (
- <DropdownMenuItem
- onClick={() =>
- setRequestedByFilter((state) =>
- state === membershipUser.id ? undefined : membershipUser.id
- )
- }
- key={`request-filter-member-${id}`}
- icon={
- requestedByFilter === membershipUser.id && (
- <FontAwesomeIcon icon={faCheckCircle} />
- )
- }
- iconPos="right"
- >
- {membershipUser.username}
- </DropdownMenuItem>
- ))}
- </DropdownMenuContent>
- </DropdownMenu>
- )}
- </div>
- </div>
- <div className="flex flex-col rounded-b-md border-x border-t border-b border-mineshaft-600 bg-mineshaft-800">
- {filteredRequests?.length === 0 && !isFiltered && (
- <div className="py-12">
- <EmptyState
- title={`No ${statusFilter === "open" ? "Pending" : "Closed"} Access Requests`}
- />
- </div>
- )}
- {Boolean(!filteredRequests?.length && isFiltered && !areRequestsPending) && (
- <div className="py-12">
- <EmptyState title="No Requests Match Filters" icon={faSearch} />
- </div>
)}
- {!!filteredRequests?.length &&
- filteredRequests?.slice(offset, perPage * page).map((request) => {
- const details = generateRequestDetails(request);
+ </div>
+ </div>
+ <div className="flex flex-col rounded-b-md border-x border-t border-b border-mineshaft-600 bg-mineshaft-800">
+ {filteredRequests?.length === 0 && !isFiltered && (
+ <div className="py-12">
+ <EmptyState
+ title={`No ${statusFilter === "open" ? "Pending" : "Closed"} Access Requests`}
+ />
+ </div>
+ )}
+ {Boolean(!filteredRequests?.length && isFiltered && !areRequestsPending) && (
+ <div className="py-12">
+ <EmptyState title="No Requests Match Filters" icon={faSearch} />
+ </div>
+ )}
+ {!!filteredRequests?.length &&
+ filteredRequests?.slice(offset, perPage * page).map((request) => {
+ const details = generateRequestDetails(request);
- return (
- <div
- key={request.id}
- className="flex w-full cursor-pointer border-b border-mineshaft-600 px-8 py-3 last:border-b-0 hover:bg-mineshaft-700 aria-disabled:opacity-80"
- role="button"
- tabIndex={0}
- onClick={() => handleSelectRequest(request)}
- onKeyDown={(evt) => {
- if (evt.key === "Enter") {
- handleSelectRequest(request);
- }
- }}
- >
- <div className="flex w-full items-center justify-between">
- <div className="flex w-full flex-col justify-between">
- <div className="mb-1 flex w-full items-center">
- <FontAwesomeIcon
- icon={faLock}
- size="xs"
- className="mr-1.5 text-mineshaft-300"
- />
- {generateRequestText(request)}
+ return (
+ <div
+ key={request.id}
+ className="flex w-full cursor-pointer border-b border-mineshaft-600 px-8 py-3 last:border-b-0 hover:bg-mineshaft-700 aria-disabled:opacity-80"
+ role="button"
+ tabIndex={0}
+ onClick={() => handleSelectRequest(request)}
+ onKeyDown={(evt) => {
+ if (evt.key === "Enter") {
+ handleSelectRequest(request);
+ }
+ }}
+ >
+ <div className="flex w-full items-center justify-between">
+ <div className="flex w-full flex-col justify-between">
+ <div className="mb-1 flex w-full items-center">
+ <FontAwesomeIcon
+ icon={faLock}
+ size="xs"
+ className="mr-1.5 text-mineshaft-300"
+ />
+ {generateRequestText(request)}
+ </div>
+ <div className="flex items-center justify-between">
+ <div className="text-xs leading-3 text-gray-500">
+ {membersGroupById?.[request.requestedByUserId]?.user && (
+ <>
+ Requested {formatDistance(new Date(request.createdAt), new Date())}{" "}
+ ago by{" "}
+ {membersGroupById?.[request.requestedByUserId]?.user?.firstName}{" "}
+ {membersGroupById?.[request.requestedByUserId]?.user?.lastName} (
+ {membersGroupById?.[request.requestedByUserId]?.user?.email}){" "}
+ </>
+ )}
+ </div>
+ </div>
+ </div>
+ <div className="flex items-center gap-3">
+ {request.requestedByUserId === user.id && (
+ <div className="flex items-center gap-1.5 text-xs whitespace-nowrap text-bunker-300">
+ <FontAwesomeIcon icon={faUser} size="sm" />
+ <span>Requested By You</span>
</div>
- <div className="flex items-center justify-between">
- <div className="text-xs leading-3 text-gray-500">
- {membersGroupById?.[request.requestedByUserId]?.user && (
- <>
- Requested {formatDistance(new Date(request.createdAt), new Date())}{" "}
- ago by{" "}
- {membersGroupById?.[request.requestedByUserId]?.user?.firstName}{" "}
- {membersGroupById?.[request.requestedByUserId]?.user?.lastName} (
- {membersGroupById?.[request.requestedByUserId]?.user?.email}){" "}
- </>
+ )}
+ <Tooltip content={details.displayData.tooltipContent}>
+ <div>
+ <Badge
+ className="flex items-center gap-1.5 whitespace-nowrap"
+ variant={details.displayData.type}
+ >
+ {details.displayData.icon && (
+ <FontAwesomeIcon icon={details.displayData.icon} />
)}
- </div>
+ <span>{details.displayData.label}</span>
+ </Badge>
</div>
- </div>
- <div className="flex items-center gap-3">
- {request.requestedByUserId === user.id && (
- <div className="flex items-center gap-1.5 text-xs whitespace-nowrap text-bunker-300">
- <FontAwesomeIcon icon={faUser} size="sm" />
- <span>Requested By You</span>
- </div>
- )}
- <Tooltip content={details.displayData.tooltipContent}>
- <div>
- <Badge
- className="flex items-center gap-1.5 whitespace-nowrap"
- variant={details.displayData.type}
- >
- {details.displayData.icon && (
- <FontAwesomeIcon icon={details.displayData.icon} />
- )}
- <span>{details.displayData.label}</span>
- </Badge>
- </div>
- </Tooltip>
- </div>
+ </Tooltip>
</div>
</div>
- );
- })}
- {Boolean(filteredRequests.length) && (
- <Pagination
- className="border-none"
- count={filteredRequests.length}
- page={page}
- perPage={perPage}
- onChangePage={setPage}
- onChangePerPage={handlePerPageChange}
- />
- )}
- </div>
+ </div>
+ );
+ })}
+ {Boolean(filteredRequests.length) && (
+ <Pagination
+ className="border-none"
+ count={filteredRequests.length}
+ page={page}
+ perPage={perPage}
+ onChangePage={setPage}
+ onChangePerPage={handlePerPageChange}
+ />
+ )}
</div>
- {!!policies && (
- <RequestAccessModal
- policies={policies}
- isOpen={popUp.requestAccess.isOpen}
- onOpenChange={() => {
- queryClient.invalidateQueries({
- queryKey: accessApprovalKeys.getAccessApprovalRequests(
- projectSlug,
- envFilter,
- requestedByFilter
- )
- });
- handlePopUpClose("requestAccess");
- }}
- />
- )}
-
- {!!selectedRequest && (
- <ReviewAccessRequestModal
- selectedEnvSlug={envFilter}
- policies={policies || []}
- selectedRequester={requestedByFilter}
- projectSlug={projectSlug}
- request={selectedRequest}
- members={members || []}
- isOpen={popUp.reviewRequest.isOpen}
- onOpenChange={() => {
- handlePopUpClose("reviewRequest");
- setSelectedRequest(null);
- refetchRequests();
- }}
- onUpdate={(request) => {
- // scott: this isn't ideal but our current use of state makes this complicated...
- // we shouldn't be using state like this...
- handleSelectRequest({
- ...selectedRequest,
- isTemporary: request.isTemporary,
- temporaryRange: request.temporaryRange,
- reviewers: []
- });
- }}
- canBypass={generateRequestDetails(selectedRequest).canBypass}
- />
- )}
+ </div>
+ {!!policies && (
+ <RequestAccessModal
+ policies={policies}
+ isOpen={popUp.requestAccess.isOpen}
+ onOpenChange={() => {
+ queryClient.invalidateQueries({
+ queryKey: accessApprovalKeys.getAccessApprovalRequests(
+ projectSlug,
+ envFilter,
+ requestedByFilter
+ )
+ });
+ handlePopUpClose("requestAccess");
+ }}
+ />
+ )}
- <UpgradePlanModal
- text="You need to upgrade your plan to access this feature"
- isOpen={popUp.upgradePlan.isOpen}
- onOpenChange={() => handlePopUpClose("upgradePlan")}
+ {!!selectedRequest && (
+ <ReviewAccessRequestModal
+ selectedEnvSlug={envFilter}
+ policies={policies || []}
+ selectedRequester={requestedByFilter}
+ projectSlug={projectSlug}
+ request={selectedRequest}
+ members={members || []}
+ isOpen={popUp.reviewRequest.isOpen}
+ onOpenChange={() => {
+ handlePopUpClose("reviewRequest");
+ setSelectedRequest(null);
+ refetchRequests();
+ }}
+ onUpdate={(request) => {
+ // scott: this isn't ideal but our current use of state makes this complicated...
+ // we shouldn't be using state like this...
+ handleSelectRequest({
+ ...selectedRequest,
+ isTemporary: request.isTemporary,
+ temporaryRange: request.temporaryRange,
+ reviewers: []
+ });
+ }}
+ canBypass={generateRequestDetails(selectedRequest).canBypass}
/>
- </motion.div>
- </AnimatePresence>
+ )}
+
+ <UpgradePlanModal
+ text="You need to upgrade your plan to access this feature"
+ isOpen={popUp.upgradePlan.isOpen}
+ onOpenChange={() => handlePopUpClose("upgradePlan")}
+ />
+ </>
);
};
diff --git a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/ApprovalPolicyList.tsx b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/ApprovalPolicyList.tsx
index 3d23025357..4daee7e41b 100644
--- a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/ApprovalPolicyList.tsx
+++ b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/ApprovalPolicyList.tsx
@@ -12,7 +12,6 @@ import {
faSearch
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { AnimatePresence, motion } from "framer-motion";
import { twMerge } from "tailwind-merge";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
@@ -240,262 +239,253 @@ export const ApprovalPolicyList = ({ projectId }: IProps) => {
orderDirection === OrderByDirection.DESC && orderBy === col ? faArrowUp : faArrowDown;
return (
- <AnimatePresence mode="wait">
- <motion.div
- key="approval-changes-list"
- transition={{ duration: 0.1 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- className="rounded-md text-gray-300"
- >
- <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="mb-4 flex items-center justify-between">
- <div>
- <div className="flex items-start gap-1">
- <p className="text-xl font-medium text-mineshaft-100">Policies</p>
- <a
- href="https://infisical.com/docs/documentation/platform/pr-workflows"
- target="_blank"
- rel="noopener noreferrer"
- >
- <div className="mt-[0.32rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
- <span>Docs</span>
- <FontAwesomeIcon
- icon={faArrowUpRightFromSquare}
- className="mb-[0.07rem] ml-1.5 text-[10px]"
- />
- </div>
- </a>
- </div>
- <p className="text-sm text-bunker-300">
- Implement granular policies for access requests and secrets management
- </p>
+ <>
+ <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
+ <div className="mb-4 flex items-center justify-between">
+ <div>
+ <div className="flex items-start gap-1">
+ <p className="text-xl font-medium text-mineshaft-100">Policies</p>
+ <a
+ href="https://infisical.com/docs/documentation/platform/pr-workflows"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ <div className="mt-[0.32rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
+ <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
+ <span>Docs</span>
+ <FontAwesomeIcon
+ icon={faArrowUpRightFromSquare}
+ className="mb-[0.07rem] ml-1.5 text-[10px]"
+ />
+ </div>
+ </a>
</div>
- <ProjectPermissionCan
- I={ProjectPermissionActions.Create}
- a={ProjectPermissionSub.SecretApproval}
- >
- {(isAllowed) => (
- <Button
- onClick={() => {
- if (subscription && !subscription?.secretApproval) {
- handlePopUpOpen("upgradePlan");
- return;
- }
- handlePopUpOpen("policyForm");
- }}
- colorSchema="secondary"
- leftIcon={<FontAwesomeIcon icon={faPlus} />}
- isDisabled={!isAllowed}
- >
- Create Policy
- </Button>
- )}
- </ProjectPermissionCan>
+ <p className="text-sm text-bunker-300">
+ Implement granular policies for access requests and secrets management
+ </p>
</div>
- <div className="mb-4 flex items-center gap-2">
- <Input
- value={search}
- onChange={(e) => setSearch(e.target.value)}
- leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
- placeholder="Search policies by name, type, environment or secret path..."
- className="flex-1"
- />
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <IconButton
- ariaLabel="Filter findings"
- variant="plain"
- size="sm"
- className={twMerge(
- "flex h-10 w-11 items-center justify-center overflow-hidden border border-mineshaft-600 bg-mineshaft-800 p-0 transition-all hover:border-primary/60 hover:bg-primary/10",
- isTableFiltered && "border-primary/50 text-primary"
- )}
- >
- <FontAwesomeIcon icon={faFilter} />
- </IconButton>
- </DropdownMenuTrigger>
- <DropdownMenuContent
- className="max-h-[70vh] thin-scrollbar overflow-y-auto"
- align="end"
- >
- <DropdownMenuLabel>Policy Type</DropdownMenuLabel>
- <DropdownMenuItem
- onClick={() =>
- setFilters((prev) => ({
- ...prev,
- type: null
- }))
- }
- icon={!filters && <FontAwesomeIcon icon={faCheckCircle} />}
- iconPos="right"
- >
- All
- </DropdownMenuItem>
- <DropdownMenuItem
- onClick={() =>
- setFilters((prev) => ({
- ...prev,
- type: PolicyType.AccessPolicy
- }))
- }
- icon={
- filters.type === PolicyType.AccessPolicy && (
- <FontAwesomeIcon icon={faCheckCircle} />
- )
+ <ProjectPermissionCan
+ I={ProjectPermissionActions.Create}
+ a={ProjectPermissionSub.SecretApproval}
+ >
+ {(isAllowed) => (
+ <Button
+ onClick={() => {
+ if (subscription && !subscription?.secretApproval) {
+ handlePopUpOpen("upgradePlan");
+ return;
}
- iconPos="right"
- >
- Access Policy
- </DropdownMenuItem>
+ handlePopUpOpen("policyForm");
+ }}
+ colorSchema="secondary"
+ leftIcon={<FontAwesomeIcon icon={faPlus} />}
+ isDisabled={!isAllowed}
+ >
+ Create Policy
+ </Button>
+ )}
+ </ProjectPermissionCan>
+ </div>
+ <div className="mb-4 flex items-center gap-2">
+ <Input
+ value={search}
+ onChange={(e) => setSearch(e.target.value)}
+ leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
+ placeholder="Search policies by name, type, environment or secret path..."
+ className="flex-1"
+ />
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <IconButton
+ ariaLabel="Filter findings"
+ variant="plain"
+ size="sm"
+ className={twMerge(
+ "flex h-10 w-11 items-center justify-center overflow-hidden border border-mineshaft-600 bg-mineshaft-800 p-0 transition-all hover:border-primary/60 hover:bg-primary/10",
+ isTableFiltered && "border-primary/50 text-primary"
+ )}
+ >
+ <FontAwesomeIcon icon={faFilter} />
+ </IconButton>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ className="max-h-[70vh] thin-scrollbar overflow-y-auto"
+ align="end"
+ >
+ <DropdownMenuLabel>Policy Type</DropdownMenuLabel>
+ <DropdownMenuItem
+ onClick={() =>
+ setFilters((prev) => ({
+ ...prev,
+ type: null
+ }))
+ }
+ icon={!filters && <FontAwesomeIcon icon={faCheckCircle} />}
+ iconPos="right"
+ >
+ All
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ onClick={() =>
+ setFilters((prev) => ({
+ ...prev,
+ type: PolicyType.AccessPolicy
+ }))
+ }
+ icon={
+ filters.type === PolicyType.AccessPolicy && (
+ <FontAwesomeIcon icon={faCheckCircle} />
+ )
+ }
+ iconPos="right"
+ >
+ Access Policy
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ onClick={() =>
+ setFilters((prev) => ({
+ ...prev,
+ type: PolicyType.ChangePolicy
+ }))
+ }
+ icon={
+ filters.type === PolicyType.ChangePolicy && (
+ <FontAwesomeIcon icon={faCheckCircle} />
+ )
+ }
+ iconPos="right"
+ >
+ Change Policy
+ </DropdownMenuItem>
+ <DropdownMenuLabel>Environment</DropdownMenuLabel>
+ {currentProject.environments.map((env) => (
<DropdownMenuItem
- onClick={() =>
+ onClick={(e) => {
+ e.preventDefault();
setFilters((prev) => ({
...prev,
- type: PolicyType.ChangePolicy
- }))
- }
+ environmentIds: prev.environmentIds.includes(env.id)
+ ? prev.environmentIds.filter((i) => i !== env.id)
+ : [...prev.environmentIds, env.id]
+ }));
+ }}
+ key={env.id}
icon={
- filters.type === PolicyType.ChangePolicy && (
- <FontAwesomeIcon icon={faCheckCircle} />
+ filters.environmentIds.includes(env.id) && (
+ <FontAwesomeIcon className="text-primary" icon={faCheckCircle} />
)
}
iconPos="right"
>
- Change Policy
+ <span className="capitalize">{env.name}</span>
</DropdownMenuItem>
- <DropdownMenuLabel>Environment</DropdownMenuLabel>
- {currentProject.environments.map((env) => (
- <DropdownMenuItem
- onClick={(e) => {
- e.preventDefault();
- setFilters((prev) => ({
- ...prev,
- environmentIds: prev.environmentIds.includes(env.id)
- ? prev.environmentIds.filter((i) => i !== env.id)
- : [...prev.environmentIds, env.id]
- }));
- }}
- key={env.id}
- icon={
- filters.environmentIds.includes(env.id) && (
- <FontAwesomeIcon className="text-primary" icon={faCheckCircle} />
- )
- }
- iconPos="right"
- >
- <span className="capitalize">{env.name}</span>
- </DropdownMenuItem>
- ))}
- </DropdownMenuContent>
- </DropdownMenu>
- </div>
- <TableContainer>
- <Table>
- <THead>
+ ))}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ </div>
+ <TableContainer>
+ <Table>
+ <THead>
+ <Tr>
+ <Th>
+ <div className="flex items-center">
+ Name
+ <IconButton
+ variant="plain"
+ className={getClassName(PolicyOrderBy.Name)}
+ ariaLabel="sort"
+ onClick={() => handleSort(PolicyOrderBy.Name)}
+ >
+ <FontAwesomeIcon icon={getColSortIcon(PolicyOrderBy.Name)} />
+ </IconButton>
+ </div>
+ </Th>
+ <Th>
+ <div className="flex items-center">
+ Environment
+ <IconButton
+ variant="plain"
+ className={getClassName(PolicyOrderBy.Environment)}
+ ariaLabel="sort"
+ onClick={() => handleSort(PolicyOrderBy.Environment)}
+ >
+ <FontAwesomeIcon icon={getColSortIcon(PolicyOrderBy.Environment)} />
+ </IconButton>
+ </div>
+ </Th>
+ <Th>
+ <div className="flex items-center">
+ Secret Path
+ <IconButton
+ variant="plain"
+ className={getClassName(PolicyOrderBy.SecretPath)}
+ ariaLabel="sort"
+ onClick={() => handleSort(PolicyOrderBy.SecretPath)}
+ >
+ <FontAwesomeIcon icon={getColSortIcon(PolicyOrderBy.SecretPath)} />
+ </IconButton>
+ </div>
+ </Th>
+ <Th>
+ <div className="flex items-center">
+ Type
+ <IconButton
+ variant="plain"
+ className={getClassName(PolicyOrderBy.Type)}
+ ariaLabel="sort"
+ onClick={() => handleSort(PolicyOrderBy.Type)}
+ >
+ <FontAwesomeIcon icon={getColSortIcon(PolicyOrderBy.Type)} />
+ </IconButton>
+ </div>
+ </Th>
+ <Th className="w-5" />
+ </Tr>
+ </THead>
+ <TBody>
+ {isPoliciesLoading && (
+ <TableSkeleton
+ columns={5}
+ innerKey="secret-policies"
+ className="bg-mineshaft-700"
+ />
+ )}
+ {!isPoliciesLoading && !policies?.length && (
<Tr>
- <Th>
- <div className="flex items-center">
- Name
- <IconButton
- variant="plain"
- className={getClassName(PolicyOrderBy.Name)}
- ariaLabel="sort"
- onClick={() => handleSort(PolicyOrderBy.Name)}
- >
- <FontAwesomeIcon icon={getColSortIcon(PolicyOrderBy.Name)} />
- </IconButton>
- </div>
- </Th>
- <Th>
- <div className="flex items-center">
- Environment
- <IconButton
- variant="plain"
- className={getClassName(PolicyOrderBy.Environment)}
- ariaLabel="sort"
- onClick={() => handleSort(PolicyOrderBy.Environment)}
- >
- <FontAwesomeIcon icon={getColSortIcon(PolicyOrderBy.Environment)} />
- </IconButton>
- </div>
- </Th>
- <Th>
- <div className="flex items-center">
- Secret Path
- <IconButton
- variant="plain"
- className={getClassName(PolicyOrderBy.SecretPath)}
- ariaLabel="sort"
- onClick={() => handleSort(PolicyOrderBy.SecretPath)}
- >
- <FontAwesomeIcon icon={getColSortIcon(PolicyOrderBy.SecretPath)} />
- </IconButton>
- </div>
- </Th>
- <Th>
- <div className="flex items-center">
- Type
- <IconButton
- variant="plain"
- className={getClassName(PolicyOrderBy.Type)}
- ariaLabel="sort"
- onClick={() => handleSort(PolicyOrderBy.Type)}
- >
- <FontAwesomeIcon icon={getColSortIcon(PolicyOrderBy.Type)} />
- </IconButton>
- </div>
- </Th>
- <Th className="w-5" />
+ <Td colSpan={5}>
+ <EmptyState title="No Policies Found" icon={faFileShield} />
+ </Td>
</Tr>
- </THead>
- <TBody>
- {isPoliciesLoading && (
- <TableSkeleton
- columns={5}
- innerKey="secret-policies"
- className="bg-mineshaft-700"
- />
- )}
- {!isPoliciesLoading && !policies?.length && (
- <Tr>
- <Td colSpan={5}>
- <EmptyState title="No Policies Found" icon={faFileShield} />
- </Td>
- </Tr>
- )}
- {!!currentProject &&
- filteredPolicies
- ?.slice(offset, perPage * page)
- .map((policy) => (
- <ApprovalPolicyRow
- policy={policy}
- key={policy.id}
- members={members}
- groups={groups}
- onEdit={() => handlePopUpOpen("policyForm", policy)}
- onDelete={() => handlePopUpOpen("deletePolicy", policy)}
- />
- ))}
- </TBody>
- </Table>
- {Boolean(!filteredPolicies.length && policies.length && !isPoliciesLoading) && (
- <EmptyState title="No Policies Match Search" icon={faSearch} />
- )}
- {Boolean(filteredPolicies.length) && (
- <Pagination
- count={filteredPolicies.length}
- page={page}
- perPage={perPage}
- onChangePage={setPage}
- onChangePerPage={handlePerPageChange}
- />
- )}
- </TableContainer>
- </div>
- </motion.div>
+ )}
+ {!!currentProject &&
+ filteredPolicies
+ ?.slice(offset, perPage * page)
+ .map((policy) => (
+ <ApprovalPolicyRow
+ policy={policy}
+ key={policy.id}
+ members={members}
+ groups={groups}
+ onEdit={() => handlePopUpOpen("policyForm", policy)}
+ onDelete={() => handlePopUpOpen("deletePolicy", policy)}
+ />
+ ))}
+ </TBody>
+ </Table>
+ {Boolean(!filteredPolicies.length && policies.length && !isPoliciesLoading) && (
+ <EmptyState title="No Policies Match Search" icon={faSearch} />
+ )}
+ {Boolean(filteredPolicies.length) && (
+ <Pagination
+ count={filteredPolicies.length}
+ page={page}
+ perPage={perPage}
+ onChangePage={setPage}
+ onChangePerPage={handlePerPageChange}
+ />
+ )}
+ </TableContainer>
+ </div>
<AccessPolicyForm
projectId={currentProject.id}
projectSlug={currentProject.slug}
@@ -517,6 +507,6 @@ export const ApprovalPolicyList = ({ projectId }: IProps) => {
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
text="You can add secret approval policy if you switch to Infisical's Enterprise plan."
/>
- </AnimatePresence>
+ </>
);
};
diff --git a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/SecretApprovalRequest.tsx b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/SecretApprovalRequest.tsx
index 509f5f2895..7e5f9236f3 100644
--- a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/SecretApprovalRequest.tsx
+++ b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/SecretApprovalRequest.tsx
@@ -14,7 +14,6 @@ import {
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useSearch } from "@tanstack/react-router";
import { format, formatDistance } from "date-fns";
-import { AnimatePresence, motion } from "framer-motion";
import { twMerge } from "tailwind-merge";
import {
@@ -131,284 +130,250 @@ export const SecretApprovalRequest = () => {
const isFiltered = Boolean(searchFilter || envFilter || committerFilter);
- return (
- <AnimatePresence mode="wait">
- {isSecretApprovalScreen ? (
- <motion.div
- key="approval-changes-details"
- transition={{ duration: 0.1 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
+ return isSecretApprovalScreen ? (
+ <SecretApprovalRequestChanges
+ approvalRequestId={selectedApprovalId || ""}
+ onGoBack={handleGoBackSecretRequestDetail}
+ />
+ ) : (
+ <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
+ <div className="mb-4 flex items-center justify-between">
+ <div>
+ <div className="flex items-start gap-1">
+ <p className="text-xl font-medium text-mineshaft-100">Change Requests</p>
+ <a
+ href="https://infisical.com/docs/documentation/platform/pr-workflows"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ <div className="mt-[0.32rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
+ <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
+ <span>Docs</span>
+ <FontAwesomeIcon
+ icon={faArrowUpRightFromSquare}
+ className="mb-[0.07rem] ml-1.5 text-[10px]"
+ />
+ </div>
+ </a>
+ </div>
+ <p className="text-sm text-bunker-300">Review pending and closed change requests</p>
+ </div>
+ </div>
+ <Input
+ value={searchFilter}
+ onChange={(e) => setSearchFilter(e.target.value)}
+ leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
+ placeholder="Search change requests by author, environment or policy path..."
+ className="flex-1"
+ containerClassName="mb-4"
+ />
+ <div className="flex items-center space-x-8 rounded-t-md border-x border-t border-mineshaft-600 bg-mineshaft-800 px-8 py-3 text-sm">
+ <div
+ role="button"
+ tabIndex={0}
+ onClick={() => setStatusFilter("open")}
+ onKeyDown={(evt) => {
+ if (evt.key === "Enter") setStatusFilter("open");
+ }}
+ className={twMerge(
+ "font-medium",
+ statusFilter === "close" && "text-gray-500 duration-100 hover:text-gray-400"
+ )}
>
- <SecretApprovalRequestChanges
- approvalRequestId={selectedApprovalId || ""}
- onGoBack={handleGoBackSecretRequestDetail}
- />
- </motion.div>
- ) : (
- <motion.div
- key="approval-changes-list"
- transition={{ duration: 0.1 }}
- initial={{ opacity: 0, translateX: 30 }}
- animate={{ opacity: 1, translateX: 0 }}
- exit={{ opacity: 0, translateX: 30 }}
- className="rounded-md text-gray-300"
+ <FontAwesomeIcon icon={faCodeBranch} className="mr-2" />
+ {isSecretApprovalReqCountSuccess && secretApprovalRequestCount?.open} Open
+ </div>
+ <div
+ className={twMerge(
+ "font-medium",
+ statusFilter === "open" && "text-gray-500 duration-100 hover:text-gray-400"
+ )}
+ role="button"
+ tabIndex={0}
+ onClick={() => setStatusFilter("close")}
+ onKeyDown={(evt) => {
+ if (evt.key === "Enter") setStatusFilter("close");
+ }}
>
- <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="mb-4 flex items-center justify-between">
- <div>
- <div className="flex items-start gap-1">
- <p className="text-xl font-medium text-mineshaft-100">Change Requests</p>
- <a
- href="https://infisical.com/docs/documentation/platform/pr-workflows"
- target="_blank"
- rel="noopener noreferrer"
- >
- <div className="mt-[0.32rem] ml-1 inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
- <FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
- <span>Docs</span>
- <FontAwesomeIcon
- icon={faArrowUpRightFromSquare}
- className="mb-[0.07rem] ml-1.5 text-[10px]"
- />
- </div>
- </a>
- </div>
- <p className="text-sm text-bunker-300">Review pending and closed change requests</p>
- </div>
- </div>
- <Input
- value={searchFilter}
- onChange={(e) => setSearchFilter(e.target.value)}
- leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
- placeholder="Search change requests by author, environment or policy path..."
- className="flex-1"
- containerClassName="mb-4"
- />
- <div className="flex items-center space-x-8 rounded-t-md border-x border-t border-mineshaft-600 bg-mineshaft-800 px-8 py-3 text-sm">
- <div
- role="button"
- tabIndex={0}
- onClick={() => setStatusFilter("open")}
- onKeyDown={(evt) => {
- if (evt.key === "Enter") setStatusFilter("open");
- }}
- className={twMerge(
- "font-medium",
- statusFilter === "close" && "text-gray-500 duration-100 hover:text-gray-400"
- )}
+ <FontAwesomeIcon icon={faCheck} className="mr-2" />
+ {isSecretApprovalReqCountSuccess && secretApprovalRequestCount.closed} Closed
+ </div>
+ <div className="flex grow justify-end space-x-8">
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button
+ variant="plain"
+ colorSchema="secondary"
+ className={envFilter ? "text-white" : "text-bunker-300"}
+ rightIcon={<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />}
>
- <FontAwesomeIcon icon={faCodeBranch} className="mr-2" />
- {isSecretApprovalReqCountSuccess && secretApprovalRequestCount?.open} Open
- </div>
- <div
- className={twMerge(
- "font-medium",
- statusFilter === "open" && "text-gray-500 duration-100 hover:text-gray-400"
- )}
- role="button"
- tabIndex={0}
- onClick={() => setStatusFilter("close")}
- onKeyDown={(evt) => {
- if (evt.key === "Enter") setStatusFilter("close");
- }}
+ Environments
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ align="end"
+ sideOffset={1}
+ className="max-h-80 thin-scrollbar overflow-y-auto"
+ >
+ <DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
+ Select an Environment
+ </DropdownMenuLabel>
+ {currentProject?.environments.map(({ slug, name }) => (
+ <DropdownMenuItem
+ onClick={() => setEnvFilter((state) => (state === slug ? undefined : slug))}
+ key={`request-filter-${slug}`}
+ icon={envFilter === slug && <FontAwesomeIcon icon={faCheckCircle} />}
+ iconPos="right"
+ >
+ {name}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ {!!permission.can(ProjectPermissionMemberActions.Read, ProjectPermissionSub.Member) && (
+ <DropdownMenu>
+ <DropdownMenuTrigger>
+ <Button
+ variant="plain"
+ colorSchema="secondary"
+ className={committerFilter ? "text-white" : "text-bunker-300"}
+ rightIcon={<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />}
+ >
+ Author
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ align="end"
+ sideOffset={1}
+ className="max-h-80 thin-scrollbar overflow-y-auto"
>
- <FontAwesomeIcon icon={faCheck} className="mr-2" />
- {isSecretApprovalReqCountSuccess && secretApprovalRequestCount.closed} Closed
- </div>
- <div className="flex grow justify-end space-x-8">
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button
- variant="plain"
- colorSchema="secondary"
- className={envFilter ? "text-white" : "text-bunker-300"}
- rightIcon={
- <FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />
- }
- >
- Environments
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent
- align="end"
- sideOffset={1}
- className="max-h-80 thin-scrollbar overflow-y-auto"
+ <DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
+ Select an Author
+ </DropdownMenuLabel>
+ {members?.map(({ user, id }) => (
+ <DropdownMenuItem
+ onClick={() =>
+ setCommitterFilter((state) => (state === user.id ? undefined : user.id))
+ }
+ key={`request-filter-member-${id}`}
+ icon={committerFilter === user.id && <FontAwesomeIcon icon={faCheckCircle} />}
+ iconPos="right"
>
- <DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
- Select an Environment
- </DropdownMenuLabel>
- {currentProject?.environments.map(({ slug, name }) => (
- <DropdownMenuItem
- onClick={() => setEnvFilter((state) => (state === slug ? undefined : slug))}
- key={`request-filter-${slug}`}
- icon={envFilter === slug && <FontAwesomeIcon icon={faCheckCircle} />}
- iconPos="right"
- >
- {name}
- </DropdownMenuItem>
- ))}
- </DropdownMenuContent>
- </DropdownMenu>
- {!!permission.can(
- ProjectPermissionMemberActions.Read,
- ProjectPermissionSub.Member
- ) && (
- <DropdownMenu>
- <DropdownMenuTrigger>
- <Button
- variant="plain"
- colorSchema="secondary"
- className={committerFilter ? "text-white" : "text-bunker-300"}
- rightIcon={
- <FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />
- }
- >
- Author
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent
- align="end"
- sideOffset={1}
- className="max-h-80 thin-scrollbar overflow-y-auto"
- >
- <DropdownMenuLabel className="sticky top-0 bg-mineshaft-900">
- Select an Author
- </DropdownMenuLabel>
- {members?.map(({ user, id }) => (
- <DropdownMenuItem
- onClick={() =>
- setCommitterFilter((state) => (state === user.id ? undefined : user.id))
- }
- key={`request-filter-member-${id}`}
- icon={
- committerFilter === user.id && <FontAwesomeIcon icon={faCheckCircle} />
- }
- iconPos="right"
- >
- {user.username}
- </DropdownMenuItem>
- ))}
- </DropdownMenuContent>
- </DropdownMenu>
- )}
- </div>
- </div>
- <div className="flex flex-col rounded-b-md border-x border-t border-b border-mineshaft-600 bg-mineshaft-800">
- {isRequestListEmpty && !isFiltered && (
- <div className="py-12">
- <EmptyState
- title={`No ${statusFilter === "open" ? "Open" : "Closed"} Change Requests`}
+ {user.username}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ )}
+ </div>
+ </div>
+ <div className="flex flex-col rounded-b-md border-x border-t border-b border-mineshaft-600 bg-mineshaft-800">
+ {isRequestListEmpty && !isFiltered && (
+ <div className="py-12">
+ <EmptyState
+ title={`No ${statusFilter === "open" ? "Open" : "Closed"} Change Requests`}
+ />
+ </div>
+ )}
+ {secretApprovalRequests.map((secretApproval) => {
+ const {
+ id: reqId,
+ commits,
+ createdAt,
+ reviewers,
+ status,
+ committerUser,
+ hasMerged,
+ updatedAt
+ } = secretApproval;
+ const isReviewed = reviewers.some(
+ ({ status: reviewStatus, userId }) =>
+ userId === userSession.id && reviewStatus === ApprovalStatus.APPROVED
+ );
+ return (
+ <div
+ key={reqId}
+ className="flex border-b border-mineshaft-600 px-8 py-3 last:border-b-0 hover:bg-mineshaft-700"
+ role="button"
+ tabIndex={0}
+ onClick={() => setSelectedApprovalId(secretApproval.id)}
+ onKeyDown={(evt) => {
+ if (evt.key === "Enter") setSelectedApprovalId(secretApproval.id);
+ }}
+ >
+ <div className="flex flex-col">
+ <div className="mb-1 text-sm">
+ <FontAwesomeIcon
+ icon={faCodeBranch}
+ size="sm"
+ className="mr-1.5 text-mineshaft-300"
/>
+ {secretApproval.isReplicated
+ ? `${commits.length} secret pending import`
+ : generateCommitText(commits)}
+ <span className="text-xs text-bunker-300"> #{secretApproval.slug}</span>
</div>
- )}
- {secretApprovalRequests.map((secretApproval) => {
- const {
- id: reqId,
- commits,
- createdAt,
- reviewers,
- status,
- committerUser,
- hasMerged,
- updatedAt
- } = secretApproval;
- const isReviewed = reviewers.some(
- ({ status: reviewStatus, userId }) =>
- userId === userSession.id && reviewStatus === ApprovalStatus.APPROVED
- );
- return (
- <div
- key={reqId}
- className="flex border-b border-mineshaft-600 px-8 py-3 last:border-b-0 hover:bg-mineshaft-700"
- role="button"
- tabIndex={0}
- onClick={() => setSelectedApprovalId(secretApproval.id)}
- onKeyDown={(evt) => {
- if (evt.key === "Enter") setSelectedApprovalId(secretApproval.id);
- }}
- >
- <div className="flex flex-col">
- <div className="mb-1 text-sm">
- <FontAwesomeIcon
- icon={faCodeBranch}
- size="sm"
- className="mr-1.5 text-mineshaft-300"
- />
- {secretApproval.isReplicated
- ? `${commits.length} secret pending import`
- : generateCommitText(commits)}
- <span className="text-xs text-bunker-300"> #{secretApproval.slug}</span>
- </div>
- <span className="text-xs leading-3 text-gray-500">
- Opened {formatDistance(new Date(createdAt), new Date())} ago by{" "}
- {committerUser ? (
- <>
- {committerUser?.firstName || ""} {committerUser?.lastName || ""} (
- {committerUser?.email})
- </>
- ) : (
- <span className="text-gray-600">Deleted User</span>
- )}
- {!isReviewed && status === "open" && " - Review required"}
- </span>
- </div>
- {status === "close" && (
- <Tooltip
- content={updatedAt ? format(new Date(updatedAt), "M/dd/yyyy h:mm a") : ""}
- >
- <div className="my-auto ml-auto">
- <Badge
- variant={hasMerged ? "success" : "danger"}
- className="flex h-min items-center gap-1"
- >
- <FontAwesomeIcon icon={hasMerged ? faCodeMerge : faXmark} />
- {hasMerged ? "Merged" : "Rejected"}
- </Badge>
- </div>
- </Tooltip>
- )}
- </div>
- );
- })}
- {Boolean(
- !secretApprovalRequests.length && isFiltered && !isApprovalRequestLoading
- ) && (
- <div className="py-12">
- <EmptyState title="No Requests Match Filters" icon={faSearch} />
- </div>
- )}
- {Boolean(totalApprovalCount) && (
- <Pagination
- className="border-none"
- count={totalApprovalCount}
- page={page}
- perPage={perPage}
- onChangePage={setPage}
- onChangePerPage={handlePerPageChange}
- />
- )}
- {isApprovalRequestLoading && (
- <div>
- {Array.apply(0, Array(3)).map((_x, index) => (
- <div
- key={`approval-request-loading-${index + 1}`}
- className="flex flex-col px-8 py-4 hover:bg-mineshaft-700"
+ <span className="text-xs leading-3 text-gray-500">
+ Opened {formatDistance(new Date(createdAt), new Date())} ago by{" "}
+ {committerUser ? (
+ <>
+ {committerUser?.firstName || ""} {committerUser?.lastName || ""} (
+ {committerUser?.email})
+ </>
+ ) : (
+ <span className="text-gray-600">Deleted User</span>
+ )}
+ {!isReviewed && status === "open" && " - Review required"}
+ </span>
+ </div>
+ {status === "close" && (
+ <Tooltip content={updatedAt ? format(new Date(updatedAt), "M/dd/yyyy h:mm a") : ""}>
+ <div className="my-auto ml-auto">
+ <Badge
+ variant={hasMerged ? "success" : "danger"}
+ className="flex h-min items-center gap-1"
>
- <div className="mb-2 flex items-center">
- <FontAwesomeIcon icon={faCodeBranch} className="mr-2" />
- <Skeleton className="w-1/4 bg-mineshaft-600" />
- </div>
- <Skeleton className="w-1/2 bg-mineshaft-600" />
- </div>
- ))}
- </div>
+ <FontAwesomeIcon icon={hasMerged ? faCodeMerge : faXmark} />
+ {hasMerged ? "Merged" : "Rejected"}
+ </Badge>
+ </div>
+ </Tooltip>
)}
</div>
+ );
+ })}
+ {Boolean(!secretApprovalRequests.length && isFiltered && !isApprovalRequestLoading) && (
+ <div className="py-12">
+ <EmptyState title="No Requests Match Filters" icon={faSearch} />
+ </div>
+ )}
+ {Boolean(totalApprovalCount) && (
+ <Pagination
+ className="border-none"
+ count={totalApprovalCount}
+ page={page}
+ perPage={perPage}
+ onChangePage={setPage}
+ onChangePerPage={handlePerPageChange}
+ />
+ )}
+ {isApprovalRequestLoading && (
+ <div>
+ {Array.apply(0, Array(3)).map((_x, index) => (
+ <div
+ key={`approval-request-loading-${index + 1}`}
+ className="flex flex-col px-8 py-4 hover:bg-mineshaft-700"
+ >
+ <div className="mb-2 flex items-center">
+ <FontAwesomeIcon icon={faCodeBranch} className="mr-2" />
+ <Skeleton className="w-1/4 bg-mineshaft-600" />
+ </div>
+ <Skeleton className="w-1/2 bg-mineshaft-600" />
+ </div>
+ ))}
</div>
- </motion.div>
- )}
- </AnimatePresence>
+ )}
+ </div>
+ </div>
);
};
diff --git a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx
index 9a99208a5a..24d3063140 100644
--- a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx
+++ b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx
@@ -228,7 +228,7 @@ export const SecretApprovalRequestChanges = ({ approvalRequestId, onGoBack }: Pr
return (
<div className="flex flex-col space-x-6 lg:flex-row">
<div className="flex-1 lg:max-w-[calc(100%-17rem)]">
- <div className="sticky -top-8 z-20 flex items-center space-x-4 bg-bunker-800 pt-2 pb-6">
+ <div className="sticky -top-10 z-20 flex items-center space-x-4 bg-bunker-800 pt-2 pb-6">
<IconButton variant="outline_bg" ariaLabel="go-back" onClick={onGoBack}>
<FontAwesomeIcon icon={faArrowLeft} />
</IconButton>
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
index da31fcf093..242daf0d97 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
@@ -3,9 +3,14 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
import { subject } from "@casl/ability";
-import { faArrowDown, faArrowUp, faInfoCircle } from "@fortawesome/free-solid-svg-icons";
+import {
+ faArrowDown,
+ faArrowUp,
+ faChevronLeft,
+ faInfoCircle
+} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { useNavigate, useParams, useSearch } from "@tanstack/react-router";
+import { Link, useNavigate, useParams, useSearch } from "@tanstack/react-router";
import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
@@ -760,7 +765,17 @@ const Page = () => {
);
return (
- <div className="container mx-auto flex max-w-7xl flex-col text-mineshaft-50 dark:scheme-dark">
+ <div className="mx-auto flex max-w-8xl flex-col text-mineshaft-50 dark:scheme-dark">
+ <Link
+ to="/projects/secret-management/$projectId/overview"
+ params={{
+ projectId
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Secrets Overview
+ </Link>
<PageHeader
scope="project"
title="Secrets Management"
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx
index 18f83cc208..146820bde0 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx
@@ -383,7 +383,7 @@ export const CommitForm: React.FC<CommitFormProps> = ({
</div>
}
subTitle="Write a commit message and review the changes you're about to save."
- className="max-h-[90vh] max-w-[95%] md:max-w-7xl"
+ className="max-h-[90vh] max-w-[95%] md:max-w-8xl"
>
<div className="space-y-6">
{/* Changes List */}
diff --git a/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx b/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx
index f4b474b9ef..ea5150e5e5 100644
--- a/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx
+++ b/frontend/src/pages/secret-manager/SecretRotationPage/SecretRotationPage.tsx
@@ -145,7 +145,7 @@ const Page = () => {
};
return (
- <div className="container mx-auto w-full max-w-7xl bg-bunker-800 text-white">
+ <div className="container mx-auto w-full max-w-8xl bg-bunker-800 text-white">
<PageHeader
scope="project"
title="Secret Rotation"
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx
index 548c1c8479..c009167ed8 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx
@@ -73,7 +73,7 @@ const PageContent = () => {
return (
<>
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 font-inter text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<Button
variant="link"
type="submit"
diff --git a/frontend/src/pages/secret-manager/SettingsPage/SettingsPage.tsx b/frontend/src/pages/secret-manager/SettingsPage/SettingsPage.tsx
index a977750134..a367aad754 100644
--- a/frontend/src/pages/secret-manager/SettingsPage/SettingsPage.tsx
+++ b/frontend/src/pages/secret-manager/SettingsPage/SettingsPage.tsx
@@ -40,18 +40,18 @@ export const SettingsPage = () => {
<Helmet>
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
</Helmet>
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader
scope="project"
title="Settings"
description="Configure your secret manager's encryption, environments, webhooks and other configurations."
/>
- <Tabs defaultValue={tabs[0].key}>
+ <Tabs orientation="vertical" defaultValue={tabs[0].key}>
<TabList>
{tabs
.filter((el) => !el.isHidden)
.map((tab) => (
- <Tab value={tab.key} key={tab.key}>
+ <Tab variant="project" value={tab.key} key={tab.key}>
{tab.name}
</Tab>
))}
diff --git a/frontend/src/pages/secret-scanning/SecretScanningDataSourceByIdPage/SecretScanningDataSourceByIdPage.tsx b/frontend/src/pages/secret-scanning/SecretScanningDataSourceByIdPage/SecretScanningDataSourceByIdPage.tsx
index 8ab394f2bf..6724f71960 100644
--- a/frontend/src/pages/secret-scanning/SecretScanningDataSourceByIdPage/SecretScanningDataSourceByIdPage.tsx
+++ b/frontend/src/pages/secret-scanning/SecretScanningDataSourceByIdPage/SecretScanningDataSourceByIdPage.tsx
@@ -55,8 +55,8 @@ const PageContent = () => {
}
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 font-inter text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 font-inter text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<Button
variant="link"
type="submit"
diff --git a/frontend/src/pages/secret-scanning/SecretScanningDataSourcesPage/SecretScanningDataSourcesPage.tsx b/frontend/src/pages/secret-scanning/SecretScanningDataSourcesPage/SecretScanningDataSourcesPage.tsx
index 71ffd82862..21375ef0b8 100644
--- a/frontend/src/pages/secret-scanning/SecretScanningDataSourcesPage/SecretScanningDataSourcesPage.tsx
+++ b/frontend/src/pages/secret-scanning/SecretScanningDataSourcesPage/SecretScanningDataSourcesPage.tsx
@@ -23,8 +23,8 @@ export const SecretScanningDataSourcesPage = () => {
a={ProjectPermissionSub.SecretScanningDataSources}
>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Data Sources"
diff --git a/frontend/src/pages/secret-scanning/SecretScanningFindingsPage/SecretScanningFindingsPage.tsx b/frontend/src/pages/secret-scanning/SecretScanningFindingsPage/SecretScanningFindingsPage.tsx
index 320d294288..d576e24e06 100644
--- a/frontend/src/pages/secret-scanning/SecretScanningFindingsPage/SecretScanningFindingsPage.tsx
+++ b/frontend/src/pages/secret-scanning/SecretScanningFindingsPage/SecretScanningFindingsPage.tsx
@@ -21,8 +21,8 @@ export const SecretScanningFindingsPage = () => {
a={ProjectPermissionSub.SecretScanningFindings}
>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Findings"
diff --git a/frontend/src/pages/secret-scanning/SettingsPage/SettingsPage.tsx b/frontend/src/pages/secret-scanning/SettingsPage/SettingsPage.tsx
index 84a885cffa..c481004ba1 100644
--- a/frontend/src/pages/secret-scanning/SettingsPage/SettingsPage.tsx
+++ b/frontend/src/pages/secret-scanning/SettingsPage/SettingsPage.tsx
@@ -17,16 +17,20 @@ export const SettingsPage = () => {
<Helmet>
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
</Helmet>
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader
scope="project"
title="Settings"
description="Configure your Secret Scanning product's configurations."
/>
- <Tabs defaultValue="tab-project-general">
+ <Tabs orientation="vertical" defaultValue="tab-project-general">
<TabList>
- <Tab value="tab-project-general">General</Tab>
- <Tab value="tab-project-secret-scanning">Scanning Settings</Tab>
+ <Tab variant="project" value="tab-project-general">
+ General
+ </Tab>
+ <Tab variant="project" value="tab-project-secret-scanning">
+ Scanning Settings
+ </Tab>
</TabList>
<TabPanel value="tab-project-general">
<ProjectGeneralTab />
diff --git a/frontend/src/pages/ssh/SettingsPage/SettingsPage.tsx b/frontend/src/pages/ssh/SettingsPage/SettingsPage.tsx
index e820e14886..6594762467 100644
--- a/frontend/src/pages/ssh/SettingsPage/SettingsPage.tsx
+++ b/frontend/src/pages/ssh/SettingsPage/SettingsPage.tsx
@@ -16,16 +16,20 @@ export const SettingsPage = () => {
<Helmet>
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
</Helmet>
- <div className="w-full max-w-7xl">
+ <div className="w-full max-w-8xl">
<PageHeader
scope="project"
title="Settings"
description="Configure your SSH product's configurations."
/>
- <Tabs defaultValue="tab-project-general">
+ <Tabs orientation="vertical" defaultValue="tab-project-general">
<TabList>
- <Tab value="tab-project-general">General</Tab>
- <Tab value="tab-ssh-settings">SSH Settings</Tab>
+ <Tab variant="project" value="tab-project-general">
+ General
+ </Tab>
+ <Tab variant="project" value="tab-ssh-settings">
+ SSH Settings
+ </Tab>
</TabList>
<TabPanel value="tab-project-general">
<ProjectGeneralTab />
diff --git a/frontend/src/pages/ssh/SshCaByIDPage/SshCaByIDPage.tsx b/frontend/src/pages/ssh/SshCaByIDPage/SshCaByIDPage.tsx
index 4f83255941..122a6816a3 100644
--- a/frontend/src/pages/ssh/SshCaByIDPage/SshCaByIDPage.tsx
+++ b/frontend/src/pages/ssh/SshCaByIDPage/SshCaByIDPage.tsx
@@ -1,5 +1,7 @@
import { Helmet } from "react-helmet";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
@@ -67,10 +69,24 @@ const Page = () => {
};
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
- <PageHeader scope="project" title={data.friendlyName}>
+ <div className="mx-auto mb-6 w-full max-w-8xl">
+ <Link
+ to="/projects/ssh/$projectId/cas"
+ params={{
+ projectId
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Certificate Authorities
+ </Link>
+ <PageHeader
+ scope="project"
+ description="Configure Certificate Authority"
+ title={data.friendlyName}
+ >
<DropdownMenu>
<DropdownMenuTrigger asChild className="rounded-lg">
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
diff --git a/frontend/src/pages/ssh/SshCasPage/SshCasPage.tsx b/frontend/src/pages/ssh/SshCasPage/SshCasPage.tsx
index 1156de3f00..b64ff9ac9b 100644
--- a/frontend/src/pages/ssh/SshCasPage/SshCasPage.tsx
+++ b/frontend/src/pages/ssh/SshCasPage/SshCasPage.tsx
@@ -13,8 +13,8 @@ export const SshCasPage = () => {
<title>{t("common.head-title", { title: "SSH" })}</title>
</Helmet>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="SSH Certificate Authorities"
diff --git a/frontend/src/pages/ssh/SshCertsPage/SshCertsPage.tsx b/frontend/src/pages/ssh/SshCertsPage/SshCertsPage.tsx
index 0078bd4b2a..a140a49785 100644
--- a/frontend/src/pages/ssh/SshCertsPage/SshCertsPage.tsx
+++ b/frontend/src/pages/ssh/SshCertsPage/SshCertsPage.tsx
@@ -13,8 +13,8 @@ export const SshCertsPage = () => {
<title>{t("common.head-title", { title: "Certificates" })}</title>
</Helmet>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="SSH Certificates"
diff --git a/frontend/src/pages/ssh/SshHostGroupDetailsByIDPage/SshHostGroupDetailsByIDPage.tsx b/frontend/src/pages/ssh/SshHostGroupDetailsByIDPage/SshHostGroupDetailsByIDPage.tsx
index 8cbca68489..a035175e7e 100644
--- a/frontend/src/pages/ssh/SshHostGroupDetailsByIDPage/SshHostGroupDetailsByIDPage.tsx
+++ b/frontend/src/pages/ssh/SshHostGroupDetailsByIDPage/SshHostGroupDetailsByIDPage.tsx
@@ -1,6 +1,8 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { useNavigate, useParams } from "@tanstack/react-router";
+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { Link, useNavigate, useParams } from "@tanstack/react-router";
import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
@@ -68,10 +70,20 @@ const Page = () => {
};
return (
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
{data && (
- <div className="mx-auto mb-6 w-full max-w-7xl">
- <PageHeader scope="project" title={data.name}>
+ <div className="mx-auto mb-6 w-full max-w-8xl">
+ <Link
+ to="/projects/ssh/$projectId/overview"
+ params={{
+ projectId
+ }}
+ className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Hosts
+ </Link>
+ <PageHeader scope="project" title={data.name} description="Configure SSH Group">
<DropdownMenu>
<DropdownMenuTrigger asChild className="rounded-lg">
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
diff --git a/frontend/src/pages/ssh/SshHostsPage/SshHostsPage.tsx b/frontend/src/pages/ssh/SshHostsPage/SshHostsPage.tsx
index 7c83eff1d5..647a10cad3 100644
--- a/frontend/src/pages/ssh/SshHostsPage/SshHostsPage.tsx
+++ b/frontend/src/pages/ssh/SshHostsPage/SshHostsPage.tsx
@@ -13,8 +13,8 @@ export const SshHostsPage = () => {
<title>{t("common.head-title", { title: "SSH" })}</title>
</Helmet>
<div className="h-full bg-bunker-800">
- <div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
- <div className="mx-auto mb-6 w-full max-w-7xl">
+ <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto mb-6 w-full max-w-8xl">
<PageHeader
scope="project"
title="Hosts"