Skip to content

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

feat: run through check to all frontend urls

=d1547564f98d
diff --git a/frontend/src/components/signup/TeamInviteStep.tsx b/frontend/src/components/signup/TeamInviteStep.tsx
index 60276d2173..63588ca5c2 100644
--- a/frontend/src/components/signup/TeamInviteStep.tsx
+++ b/frontend/src/components/signup/TeamInviteStep.tsx
@@ -4,6 +4,7 @@ import { useRouter } from "next/router";
import { useAddUsersToOrg } from "@app/hooks/api";
import { useFetchServerStatus } from "@app/hooks/api/serverDetails";
+import { ProjectType } from "@app/hooks/api/workspace/types";
import { usePopUp } from "@app/hooks/usePopUp";
import { Button, EmailServiceSetupModal } from "../v2";
@@ -22,7 +23,7 @@ export default function TeamInviteStep(): JSX.Element {
// Redirect user to the getting started page
const redirectToHome = async () => {
- router.push(`/org/${localStorage.getItem("orgData.id")}/overview`);
+ router.push(`/org/${localStorage.getItem("orgData.id")}/${ProjectType.SecretManager}/overview`);
};
const inviteUsers = async ({ emails: inviteEmails }: { emails: string }) => {
diff --git a/frontend/src/components/v2/projects/NewProjectModal.tsx b/frontend/src/components/v2/projects/NewProjectModal.tsx
index a081ef4f04..839153ea2e 100644
--- a/frontend/src/components/v2/projects/NewProjectModal.tsx
+++ b/frontend/src/components/v2/projects/NewProjectModal.tsx
@@ -32,6 +32,7 @@ import {
useSubscription,
useUser
} from "@app/context";
+import { getWorkspaceHomePage } from "@app/helpers/workspace";
import {
fetchOrgUsers,
useAddUserToWsNonE2EE,
@@ -120,7 +121,7 @@ const NewProjectForm = ({ onOpenChange, projectType }: NewProjectFormProps) => {
try {
const {
data: {
- project: { id: newProjectId }
+ project
}
} = await createWs.mutateAsync({
projectName: name,
@@ -129,6 +130,7 @@ const NewProjectForm = ({ onOpenChange, projectType }: NewProjectFormProps) => {
template,
type: projectType
});
+ const { id: newProjectId } = project
if (addMembers) {
const orgUsers = await fetchOrgUsers(currentOrg.id);
@@ -148,7 +150,7 @@ const NewProjectForm = ({ onOpenChange, projectType }: NewProjectFormProps) => {
createNotification({ text: "Project created", type: "success" });
reset();
onOpenChange(false);
- router.push(`/${projectType}/${newProjectId}/${projectType}/overview`);
+ router.push(getWorkspaceHomePage(project));
} catch (err) {
console.error(err);
createNotification({ text: "Failed to create project", type: "error" });
diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx
index 0cbe2362d4..07a40156a9 100644
--- a/frontend/src/layouts/AppLayout/AppLayout.tsx
+++ b/frontend/src/layouts/AppLayout/AppLayout.tsx
@@ -41,6 +41,7 @@ import { usePopUp, useToggle } from "@app/hooks";
import { useGetOrgTrialUrl, useLogoutUser, useSelectOrganization } from "@app/hooks/api";
import { MfaMethod } from "@app/hooks/api/auth/types";
import { AuthMethod } from "@app/hooks/api/users/types";
+import { ProjectType } from "@app/hooks/api/workspace/types";
import { InsecureConnectionBanner } from "@app/layouts/AppLayout/components/InsecureConnectionBanner";
import { ProjectSelect } from "@app/layouts/AppLayout/components/ProjectSelect";
import { navigateUserToOrg } from "@app/views/Login/Login.utils";
@@ -340,30 +341,40 @@ export const AppLayout = ({ children }: LayoutProps) => {
<ProjectSidebarItem />
{router.pathname.startsWith("/org") && (
<Menu className="mt-4">
- <Link href={`/org/${currentOrg?.id}/secret-manager/overview`} passHref>
+ <Link
+ href={`/org/${currentOrg?.id}/${ProjectType.SecretManager}/overview`}
+ passHref
+ >
<a>
<MenuItem
- isSelected={router.asPath.includes("/secret-manager/overview")}
+ isSelected={router.asPath.includes(
+ `/${ProjectType.SecretManager}/overview`
+ )}
icon="system-outline-165-view-carousel"
>
Secret Manager
</MenuItem>
</a>
</Link>
- <Link href={`/org/${currentOrg?.id}/cert-manager/overview`} passHref>
+ <Link
+ href={`/org/${currentOrg?.id}/${ProjectType.CertificateManager}/overview`}
+ passHref
+ >
<a>
<MenuItem
- isSelected={router.asPath.includes("/cert-manager/overview")}
+ isSelected={router.asPath.includes(
+ `/${ProjectType.CertificateManager}/overview`
+ )}
icon="system-outline-165-view-carousel"
>
Cert Manager
</MenuItem>
</a>
</Link>
- <Link href={`/org/${currentOrg?.id}/cmek/overview`} passHref>
+ <Link href={`/org/${currentOrg?.id}/${ProjectType.Cmek}/overview`} passHref>
<a>
<MenuItem
- isSelected={router.asPath.includes("/cmek/overview")}
+ isSelected={router.asPath.includes(`/${ProjectType.Cmek}/overview`)}
icon="system-outline-165-view-carousel"
>
Cmek
diff --git a/frontend/src/layouts/AppLayout/ErrorBoundary.tsx b/frontend/src/layouts/AppLayout/ErrorBoundary.tsx
index 55acf3433d..982dce8d22 100644
--- a/frontend/src/layouts/AppLayout/ErrorBoundary.tsx
+++ b/frontend/src/layouts/AppLayout/ErrorBoundary.tsx
@@ -5,6 +5,7 @@ import { faBugs, faHome } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Button } from "@app/components/v2";
+import { ProjectType } from "@app/hooks/api/workspace/types";
interface ErrorBoundaryProps {
children: ReactNode;
@@ -62,7 +63,7 @@ const ErrorPage = ({ error }: { error: Error | null }) => {
size="xs"
onClick={() =>
// we need to go to /org/${orgId}/overview, but we need to do a full page reload to ensure that the error the user is facing is properly reset.
- window.location.assign(`/org/${orgId}/overview`)
+ window.location.assign(`/org/${orgId}/${ProjectType.SecretManager}/overview`)
}
>
<FontAwesomeIcon icon={faHome} className="mr-2" />
diff --git a/frontend/src/pages/org/[id]/secret-manager/overview.tsx b/frontend/src/pages/org/[id]/secret-manager/overview.tsx
index 0e5c2cec8a..56eefa1e1d 100644
--- a/frontend/src/pages/org/[id]/secret-manager/overview.tsx
+++ b/frontend/src/pages/org/[id]/secret-manager/overview.tsx
@@ -1,39 +1,27 @@
// REFACTOR(akhilmhdh): This file needs to be split into multiple components too complex
-import { ReactNode, useEffect, useMemo, useState } from "react";
+import { ReactNode, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
-import { IconProp } from "@fortawesome/fontawesome-svg-core";
-import { faSlack } from "@fortawesome/free-brands-svg-icons";
import { faFolderOpen, faStar } from "@fortawesome/free-regular-svg-icons";
import {
faArrowDownAZ,
faArrowRight,
- faArrowUpRightFromSquare,
faArrowUpZA,
faBorderAll,
- faCheck,
- faCheckCircle,
- faClipboard,
faExclamationCircle,
- faHandPeace,
faList,
faMagnifyingGlass,
- faNetworkWired,
- faPlug,
faPlus,
faSearch,
- faStar as faSolidStar,
- faUserPlus
+ faStar as faSolidStar
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import * as Tabs from "@radix-ui/react-tabs";
import { createNotification } from "@app/components/notifications";
import { OrgPermissionCan } from "@app/components/permissions";
-import onboardingCheck from "@app/components/utilities/checks/OnboardingCheck";
import {
Button,
IconButton,
@@ -48,12 +36,11 @@ import {
OrgPermissionActions,
OrgPermissionSubjects,
useOrganization,
- useSubscription,
- useUser
+ useSubscription
} from "@app/context";
import { getWorkspaceHomePage } from "@app/helpers/workspace";
import { usePagination, useResetPageHelper } from "@app/hooks";
-import { useGetUserWorkspaces, useRegisterUserAction } from "@app/hooks/api";
+import { useGetUserWorkspaces } from "@app/hooks/api";
import { OrderByDirection } from "@app/hooks/api/generic/types";
// import { fetchUserWsKey } from "@app/hooks/api/keys/queries";
import { useFetchServerStatus } from "@app/hooks/api/serverDetails";
@@ -63,32 +50,6 @@ import { useGetUserProjectFavorites } from "@app/hooks/api/users/queries";
import { ProjectType } from "@app/hooks/api/workspace/types";
import { usePopUp } from "@app/hooks/usePopUp";
-const features = [
- {
- id: 0,
- name: "Kubernetes Operator",
- link: "https://infisical.com/docs/documentation/getting-started/kubernetes",
- description:
- "Pull secrets into your Kubernetes containers and automatically redeploy upon secret changes."
- },
- {
- id: 1,
- name: "Infisical Agent",
- link: "https://infisical.com/docs/infisical-agent/overview",
- description: "Inject secrets into your apps without modifying any application logic."
- }
-];
-
-type ItemProps = {
- text: string;
- subText: string;
- complete: boolean;
- icon: IconProp;
- time: string;
- userAction?: string;
- link?: string;
-};
-
enum ProjectsViewMode {
GRID = "grid",
LIST = "list"
@@ -98,373 +59,6 @@ enum ProjectOrderBy {
Name = "name"
}
-function copyToClipboard(id: string, setState: (value: boolean) => void) {
- // Get the text field
- const copyText = document.getElementById(id) as HTMLInputElement;
-
- // Select the text field
- copyText.select();
- copyText.setSelectionRange(0, 99999); // For mobile devices
-
- // Copy the text inside the text field
- navigator.clipboard.writeText(copyText.value);
-
- setState(true);
- setTimeout(() => setState(false), 2000);
- // Alert the copied text
- // alert("Copied the text: " + copyText.value);
-}
-
-const CodeItem = ({
- isCopied,
- setIsCopied,
- textExplanation,
- code,
- id
-}: {
- isCopied: boolean;
- setIsCopied: (value: boolean) => void;
- textExplanation: string;
- code: string;
- id: string;
-}) => {
- return (
- <>
- <p className="mb-2 mt-4 text-sm leading-normal text-bunker-300">{textExplanation}</p>
- <div className="flex flex-row items-center justify-between rounded-md border border-mineshaft-600 bg-bunker px-3 py-2 font-mono text-sm">
- <input disabled value={code} id={id} className="w-full bg-transparent text-bunker-200" />
- <button
- type="button"
- onClick={() => copyToClipboard(id, setIsCopied)}
- className="h-full pl-3.5 pr-2 text-bunker-300 duration-200 hover:text-primary-200"
- >
- {isCopied ? (
- <FontAwesomeIcon icon={faCheck} className="pr-0.5" />
- ) : (
- <FontAwesomeIcon icon={faClipboard} />
- )}
- </button>
- </div>
- </>
- );
-};
-
-const TabsObject = () => {
- const [downloadCodeCopied, setDownloadCodeCopied] = useState(false);
- const [downloadCode2Copied, setDownloadCode2Copied] = useState(false);
- const [loginCodeCopied, setLoginCodeCopied] = useState(false);
- const [initCodeCopied, setInitCodeCopied] = useState(false);
- const [runCodeCopied, setRunCodeCopied] = useState(false);
-
- return (
- <Tabs.Root
- className="flex w-full cursor-default flex-col rounded-md border border-mineshaft-600"
- defaultValue="tab1"
- >
- <Tabs.List
- className="flex shrink-0 border-b border-mineshaft-600"
- aria-label="Manage your account"
- >
- <Tabs.Trigger
- className="flex h-10 flex-1 cursor-default select-none items-center justify-center bg-bunker-700 px-5 text-sm leading-none text-bunker-300 outline-none first:rounded-tl-md last:rounded-tr-md data-[state=active]:border-b data-[state=active]:border-primary data-[state=active]:font-medium data-[state=active]:text-primary data-[state=active]:focus:relative"
- value="tab1"
- >
- MacOS
- </Tabs.Trigger>
- <Tabs.Trigger
- className="flex h-10 flex-1 cursor-default select-none items-center justify-center bg-bunker-700 px-5 text-sm leading-none text-bunker-300 outline-none first:rounded-tl-md last:rounded-tr-md data-[state=active]:border-b data-[state=active]:border-primary data-[state=active]:font-medium data-[state=active]:text-primary data-[state=active]:focus:relative"
- value="tab2"
- >
- Windows
- </Tabs.Trigger>
- {/* <Tabs.Trigger
- className="bg-bunker-700 px-5 h-10 flex-1 flex items-center justify-center text-sm leading-none text-bunker-300 select-none first:rounded-tl-md last:rounded-tr-md data-[state=active]:text-primary data-[state=active]:font-medium data-[state=active]:focus:relative data-[state=active]:border-b data-[state=active]:border-primary outline-none cursor-default"
- value="tab3"
- >
- Arch Linux
- </Tabs.Trigger> */}
- <a
- target="_blank"
- rel="noopener noreferrer"
- className="flex h-10 flex-1 cursor-default select-none items-center justify-center bg-bunker-700 px-5 text-sm leading-none text-bunker-300 outline-none duration-200 first:rounded-tl-md last:rounded-tr-md hover:text-bunker-100 data-[state=active]:border-b data-[state=active]:border-primary data-[state=active]:font-medium data-[state=active]:text-primary data-[state=active]:focus:relative"
- href="https://infisical.com/docs/cli/overview"
- >
- Other Platforms <FontAwesomeIcon icon={faArrowUpRightFromSquare} className="ml-2" />
- </a>
- </Tabs.List>
- <Tabs.Content
- className="grow cursor-default rounded-b-md bg-bunker-700 p-5 pt-0 outline-none"
- value="tab1"
- >
- <CodeItem
- isCopied={downloadCodeCopied}
- setIsCopied={setDownloadCodeCopied}
- textExplanation="1. Download CLI"
- code="brew install infisical/get-cli/infisical"
- id="downloadCode"
- />
- <CodeItem
- isCopied={loginCodeCopied}
- setIsCopied={setLoginCodeCopied}
- textExplanation="2. Login"
- code="infisical login"
- id="loginCode"
- />
- <CodeItem
- isCopied={initCodeCopied}
- setIsCopied={setInitCodeCopied}
- textExplanation="3. Choose Project"
- code="infisical init"
- id="initCode"
- />
- <CodeItem
- isCopied={runCodeCopied}
- setIsCopied={setRunCodeCopied}
- textExplanation="4. Done! Now, you can prepend your usual start script with:"
- code="infisical run -- [YOUR USUAL CODE START SCRIPT GOES HERE]"
- id="runCode"
- />
- <p className="mt-2 text-sm text-bunker-300">
- You can find example of start commands for different frameworks{" "}
- <a
- className="text-primary underline underline-offset-2"
- target="_blank"
- rel="noopener noreferrer"
- href="https://infisical.com/docs/integrations/overview"
- >
- here
- </a>
- .{" "}
- </p>
- </Tabs.Content>
- <Tabs.Content className="grow rounded-b-md bg-bunker-700 p-5 pt-0 outline-none" value="tab2">
- <CodeItem
- isCopied={downloadCodeCopied}
- setIsCopied={setDownloadCodeCopied}
- textExplanation="1. Download CLI"
- code="scoop bucket add org https://github.com/Infisical/scoop-infisical.git"
- id="downloadCodeW"
- />
- <div className="mt-2 flex flex-row items-center justify-between rounded-md border border-mineshaft-600 bg-bunker px-3 py-2 font-mono text-sm">
- <input
- disabled
- value="scoop install infisical"
- id="downloadCodeW2"
- className="w-full bg-transparent text-bunker-200"
- />
- <button
- type="button"
- onClick={() => copyToClipboard("downloadCodeW2", setDownloadCode2Copied)}
- className="h-full pl-3.5 pr-2 text-bunker-300 duration-200 hover:text-primary-200"
- >
- {downloadCode2Copied ? (
- <FontAwesomeIcon icon={faCheck} className="pr-0.5" />
- ) : (
- <FontAwesomeIcon icon={faClipboard} />
- )}
- </button>
- </div>
- <CodeItem
- isCopied={loginCodeCopied}
- setIsCopied={setLoginCodeCopied}
- textExplanation="2. Login"
- code="infisical login"
- id="loginCodeW"
- />
- <CodeItem
- isCopied={initCodeCopied}
- setIsCopied={setInitCodeCopied}
- textExplanation="3. Choose Project"
- code="infisical init"
- id="initCodeW"
- />
- <CodeItem
- isCopied={runCodeCopied}
- setIsCopied={setRunCodeCopied}
- textExplanation="4. Done! Now, you can prepend your usual start script with:"
- code="infisical run -- [YOUR USUAL CODE START SCRIPT GOES HERE]"
- id="runCodeW"
- />
- <p className="mt-2 text-sm text-bunker-300">
- You can find example of start commands for different frameworks{" "}
- <a
- className="text-primary underline underline-offset-2"
- target="_blank"
- rel="noopener noreferrer"
- href="https://infisical.com/docs/integrations/overview"
- >
- here
- </a>
- .{" "}
- </p>
- </Tabs.Content>
- </Tabs.Root>
- );
-};
-
-const LearningItem = ({
- text,
- subText,
- complete,
- icon,
- time,
- userAction,
- link
-}: ItemProps): JSX.Element => {
- const registerUserAction = useRegisterUserAction();
- if (link) {
- return (
- <a
- target={`${link.includes("https") ? "_blank" : "_self"}`}
- rel="noopener noreferrer"
- className={`w-full ${complete && "opacity-30 duration-200 hover:opacity-100"}`}
- href={link}
- >
- <div
- className={`${
- complete ? "bg-gradient-to-r from-primary-500/70 p-[0.07rem]" : ""
- } mb-3 rounded-md`}
- >
- <div
- onKeyDown={() => null}
- role="button"
- tabIndex={0}
- onClick={async () => {
- if (userAction && userAction !== "first_time_secrets_pushed") {
- await registerUserAction.mutateAsync(userAction);
- }
- }}
- className={`group relative flex h-[5.5rem] w-full items-center justify-between overflow-hidden rounded-md border ${
- complete
- ? "cursor-default border-mineshaft-900 bg-gradient-to-r from-[#0e1f01] to-mineshaft-700"
- : "cursor-pointer border-mineshaft-600 bg-mineshaft-800 shadow-xl hover:bg-mineshaft-700"
- } text-mineshaft-100 duration-200`}
- >
- <div className="mr-4 flex flex-row items-center">
- <FontAwesomeIcon icon={icon} className="mx-2 w-16 text-4xl" />
- {complete && (
- <div className="absolute left-12 top-10 flex h-7 w-7 items-center justify-center rounded-full bg-bunker-500 p-2 group-hover:bg-mineshaft-700">
- <FontAwesomeIcon icon={faCheckCircle} className="h-5 w-5 text-4xl text-primary" />
- </div>
- )}
- <div className="flex flex-col items-start">
- <div className="mt-0.5 text-xl font-semibold">{text}</div>
- <div className="text-sm font-normal">{subText}</div>
- </div>
- </div>
- <div
- className={`w-32 pr-8 text-right text-sm font-semibold ${complete && "text-primary"}`}
- >
- {complete ? "Complete!" : `About ${time}`}
- </div>
- {/* {complete && <div className="absolute bottom-0 left-0 h-1 w-full bg-primary" />} */}
- </div>
- </div>
- </a>
- );
- }
- return (
- <div
- onKeyDown={() => null}
- role="button"
- tabIndex={0}
- onClick={async () => {
- if (userAction) {
- await registerUserAction.mutateAsync(userAction);
- }
- }}
- className="relative my-1.5 flex h-[5.5rem] w-full cursor-pointer items-center justify-between overflow-hidden rounded-md border border-dashed border-bunker-400 bg-bunker-700 py-2 pl-2 pr-6 shadow-xl duration-200 hover:bg-bunker-500"
- >
- <div className="mr-4 flex flex-row items-center">
- <FontAwesomeIcon icon={icon} className="mx-2 w-16 text-4xl" />
- {complete && (
- <div className="absolute left-11 top-10 h-7 w-7 rounded-full bg-bunker-700">
- <FontAwesomeIcon
- icon={faCheckCircle}
- className="absolute left-12 top-16 h-5 w-5 text-4xl text-primary"
- />
- </div>
- )}
- <div className="flex flex-col items-start">
- <div className="mt-0.5 text-xl font-semibold">{text}</div>
- <div className="mt-0.5 text-sm font-normal">{subText}</div>
- </div>
- </div>
- <div className={`w-28 pr-4 text-right text-sm font-semibold ${complete && "text-primary"}`}>
- {complete ? "Complete!" : `About ${time}`}
- </div>
- {complete && <div className="absolute bottom-0 left-0 h-1 w-full bg-primary" />}
- </div>
- );
-};
-
-const LearningItemSquare = ({
- text,
- subText,
- complete,
- icon,
- time,
- userAction,
- link
-}: ItemProps): JSX.Element => {
- const registerUserAction = useRegisterUserAction();
- return (
- <a
- target={`${link?.includes("https") ? "_blank" : "_self"}`}
- rel="noopener noreferrer"
- className={`w-full ${complete && "opacity-30 duration-200 hover:opacity-100"}`}
- href={link}
- >
- <div
- className={`${
- complete ? "bg-gradient-to-r from-primary-500/70 p-[0.07rem]" : ""
- } w-full rounded-md`}
- >
- <div
- onKeyDown={() => null}
- role="button"
- tabIndex={0}
- onClick={async () => {
- if (userAction && userAction !== "first_time_secrets_pushed") {
- await registerUserAction.mutateAsync(userAction);
- }
- }}
- className={`group relative flex w-full items-center justify-between overflow-hidden rounded-md border ${
- complete
- ? "cursor-default border-mineshaft-900 bg-gradient-to-r from-[#0e1f01] to-mineshaft-700"
- : "cursor-pointer border-mineshaft-600 bg-mineshaft-800 shadow-xl hover:bg-mineshaft-700"
- } text-mineshaft-100 duration-200`}
- >
- <div className="flex w-full flex-col items-center px-6 py-4">
- <div className="flex w-full flex-row items-start justify-between">
- <FontAwesomeIcon
- icon={icon}
- className="w-16 pt-2 text-5xl text-mineshaft-200 duration-100 group-hover:text-mineshaft-100"
- />
- {complete && (
- <div className="absolute left-14 top-12 flex h-7 w-7 items-center justify-center rounded-full bg-bunker-500 p-2 group-hover:bg-mineshaft-700">
- <FontAwesomeIcon icon={faCheckCircle} className="h-5 w-5 text-4xl text-primary" />
- </div>
- )}
- <div
- className={`text-right text-sm font-normal text-mineshaft-300 ${
- complete ? "font-semibold text-primary" : ""
- }`}
- >
- {complete ? "Complete!" : `About ${time}`}
- </div>
- </div>
- <div className="flex w-full flex-col items-start justify-start pt-4">
- <div className="mt-0.5 text-lg font-medium">{text}</div>
- <div className="text-sm font-normal text-mineshaft-300">{subText}</div>
- </div>
- </div>
- </div>
- </div>
- </a>
- );
-};
-
const formatTitle = (type: ProjectType) => {
if (type === ProjectType.SecretManager) return "Secret Managers";
if (type === ProjectType.CertificateManager) return "Cert Managers";
@@ -483,7 +77,6 @@ export const ProductOverview = ({ type }: Props) => {
const { data: workspaces, isLoading: isWorkspaceLoading } = useGetUserWorkspaces({ type });
const { currentOrg } = useOrganization();
- const routerOrgId = String(router.query.id);
const orgWorkspaces = workspaces || [];
const { data: projectFavorites, isLoading: isProjectFavoritesLoading } =
useGetUserProjectFavorites(currentOrg?.id!);
@@ -496,12 +89,7 @@ export const ProductOverview = ({ type }: Props) => {
"upgradePlan"
] as const);
- const [hasUserClickedSlack, setHasUserClickedSlack] = useState(false);
- const [hasUserClickedIntro, setHasUserClickedIntro] = useState(false);
- const [hasUserPushedSecrets, setHasUserPushedSecrets] = useState(false);
- const [usersInOrg, setUsersInOrg] = useState(false);
const [searchFilter, setSearchFilter] = useState("");
- const { user } = useUser();
const { data: serverDetails } = useFetchServerStatus();
const [projectsViewMode, setProjectsViewMode] = useState<ProjectsViewMode>(
(localStorage.getItem("projectsViewMode") as ProjectsViewMode) || ProjectsViewMode.GRID
@@ -513,16 +101,6 @@ export const ProductOverview = ({ type }: Props) => {
? subscription.workspacesUsed < subscription.workspaceLimit
: true;
- useEffect(() => {
- onboardingCheck({
- orgId: routerOrgId,
- setHasUserClickedIntro,
- setHasUserClickedSlack,
- setHasUserPushedSecrets,
- setUsersInOrg
- });
- }, []);
-
const isWorkspaceEmpty = !isProjectViewLoading && orgWorkspaces?.length === 0;
const {
@@ -917,127 +495,6 @@ export const ProductOverview = ({ type }: Props) => {
</div>
)}
</div>
- <div className="mb-4 flex flex-col items-start justify-start px-6 py-6 pb-6 text-3xl">
- <p className="mr-4 font-semibold text-white">Explore Infisical</p>
- <div className="mt-4 grid w-full grid-cols-3 gap-4">
- {features.map((feature) => (
- <div
- key={feature.id}
- className="relative flex h-full w-full flex-col gap-2 overflow-auto rounded-md border border-mineshaft-600 bg-mineshaft-800 p-4"
- >
- <div className="mt-0 text-lg text-mineshaft-100">{feature.name}</div>
- <div className="line-clamp overflwo-auto mb-4 mt-2 h-full text-[15px] font-light text-mineshaft-300">
- {feature.description}
- </div>
- <div className="flex w-full flex-col items-start gap-2 xl:flex-row xl:items-center">
- <p className="left-0 text-[15px] font-light text-mineshaft-300">
- Setup time: 20 min
- </p>
- <a
- target="_blank"
- rel="noopener noreferrer"
- className="group ml-0 w-max cursor-default rounded-full border border-mineshaft-600 bg-mineshaft-900 py-2 px-4 text-sm text-mineshaft-300 transition-all hover:border-primary-500/80 hover:bg-primary-800/20 hover:text-mineshaft-200 xl:ml-auto"
- href={feature.link}
- >
- Learn more{" "}
- <FontAwesomeIcon
- icon={faArrowRight}
- className="s pl-1.5 pr-0.5 duration-200 group-hover:pl-2 group-hover:pr-0"
- />
- </a>
- </div>
- </div>
- ))}
- </div>
- </div>
- {!(new Date().getTime() - new Date(user?.createdAt).getTime() < 30 * 24 * 60 * 60 * 1000) && (
- <div className="mb-4 flex flex-col items-start justify-start px-6 pb-0 text-3xl">
- <p className="mr-4 mb-4 font-semibold text-white">Onboarding Guide</p>
- <div className="mb-3 grid w-full grid-cols-1 gap-3 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4">
- <LearningItemSquare
- text="Watch Infisical demo"
- subText="Set up Infisical in 3 min."
- complete={hasUserClickedIntro}
- icon={faHandPeace}
- time="3 min"
- userAction="intro_cta_clicked"
- link="https://www.youtube.com/watch?v=PK23097-25I"
- />
- {orgWorkspaces.length !== 0 && (
- <>
- <LearningItemSquare
- text="Add your secrets"
- subText="Drop a .env file or type your secrets."
- complete={hasUserPushedSecrets}
- icon={faPlus}
- time="1 min"
- userAction="first_time_secrets_pushed"
- link={`/project/${orgWorkspaces[0]?.id}/secrets/overview`}
- />
- <LearningItemSquare
- text="Invite your teammates"
- subText="Infisical is better used as a team."
- complete={usersInOrg}
- icon={faUserPlus}
- time="2 min"
- link={`/org/${router.query.id}/members?action=invite`}
- />
- </>
- )}
- <div className="block xl:hidden 2xl:block">
- <LearningItemSquare
- text="Join Infisical Slack"
- subText="Have any questions? Ask us!"
- complete={hasUserClickedSlack}
- icon={faSlack}
- time="1 min"
- userAction="slack_cta_clicked"
- link="https://infisical.com/slack"
- />
- </div>
- </div>
- {orgWorkspaces.length !== 0 && (
- <div className="group relative mb-3 flex h-full w-full cursor-default flex-col items-center justify-between overflow-hidden rounded-md border border-mineshaft-600 bg-mineshaft-800 pl-2 pr-2 pt-4 pb-2 text-mineshaft-100 shadow-xl duration-200">
- <div className="mb-4 flex w-full flex-row items-center pr-4">
- <div className="mr-4 flex w-full flex-row items-center">
- <FontAwesomeIcon icon={faNetworkWired} className="mx-2 w-16 text-4xl" />
- {false && (
- <div className="absolute left-12 top-10 flex h-7 w-7 items-center justify-center rounded-full bg-bunker-500 p-2 group-hover:bg-mineshaft-700">
- <FontAwesomeIcon
- icon={faCheckCircle}
- className="h-5 w-5 text-4xl text-green"
- />
- </div>
- )}
- <div className="flex flex-col items-start pl-0.5">
- <div className="mt-0.5 text-xl font-semibold">Inject secrets locally</div>
- <div className="text-sm font-normal">
- Replace .env files with a more secure and efficient alternative.
- </div>
- </div>
- </div>
- <div
- className={`w-28 pr-4 text-right text-sm font-semibold ${false && "text-green"}`}
- >
- About 2 min
- </div>
- </div>
- <TabsObject />
- {false && <div className="absolute bottom-0 left-0 h-1 w-full bg-green" />}
- </div>
- )}
- {orgWorkspaces.length !== 0 && (
- <LearningItem
- text="Integrate Infisical with your infrastructure"
- subText="Connect Infisical to various 3rd party services and platforms."
- complete={false}
- icon={faPlug}
- time="15 min"
- link="https://infisical.com/docs/integrations/overview"
- />
- )}
- </div>
- )}
<NewProjectModal
isOpen={popUp.addNewWs.isOpen}
onOpenChange={(isOpen) => handlePopUpToggle("addNewWs", isOpen)}
diff --git a/frontend/src/views/Login/Login.utils.tsx b/frontend/src/views/Login/Login.utils.tsx
index 71089532a1..dc714e4b0a 100644
--- a/frontend/src/views/Login/Login.utils.tsx
+++ b/frontend/src/views/Login/Login.utils.tsx
@@ -13,7 +13,7 @@ export const navigateUserToOrg = async (router: NextRouter, organizationId?: str
if (organizationId) {
localStorage.setItem("orgData.id", organizationId);
- router.push(`/org/${organizationId}/overview`);
+ router.push(`/org/${organizationId}/${ProjectType.SecretManager}/overview`);
return;
}