diff --git a/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx b/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx index f24055278..965966fe4 100644 --- a/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx +++ b/frontend/src/views/Settings/ProjectSettingsPage/ProjectSettingsPage.tsx @@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next"; import { Tab } from "@headlessui/react"; import { useWorkspace } from "@app/context"; -import { ProjectVersion } from "@app/hooks/api/workspace/types"; +import { ProjectType, ProjectVersion } from "@app/hooks/api/workspace/types"; import { EncryptionTab } from "./components/EncryptionTab"; import { ProjectGeneralTab } from "./components/ProjectGeneralTab"; @@ -18,7 +18,9 @@ export const ProjectSettingsPage = () => { { name: "Encryption", key: "tab-project-encryption", - isHidden: currentWorkspace?.version !== ProjectVersion.V3 + isHidden: + currentWorkspace?.version !== ProjectVersion.V3 || + currentWorkspace?.type !== ProjectType.SecretManager }, { name: "Workflow Integrations", key: "tab-workflow-integrations" }, { name: "Webhooks", key: "tab-project-webhooks" } @@ -53,11 +55,12 @@ export const ProjectSettingsPage = () => { - {currentWorkspace?.version === ProjectVersion.V3 && ( - - - - )} + {currentWorkspace?.version === ProjectVersion.V3 && + currentWorkspace?.type === ProjectType.SecretManager && ( + + + + )} diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx index d5c7a5c23..698665e47 100644 --- a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx +++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectGeneralTab/ProjectGeneralTab.tsx @@ -1,5 +1,5 @@ import { useWorkspace } from "@app/context"; -import { ProjectVersion } from "@app/hooks/api/workspace/types"; +import { ProjectType, ProjectVersion } from "@app/hooks/api/workspace/types"; import { AuditLogsRetentionSection } from "../AuditLogsRetentionSection"; import { AutoCapitalizationSection } from "../AutoCapitalizationSection"; @@ -13,17 +13,20 @@ import { SecretTagsSection } from "../SecretTagsSection"; export const ProjectGeneralTab = () => { const { currentWorkspace } = useWorkspace(); + const isSecretManager = currentWorkspace?.type === ProjectType.SecretManager; return (
- - - - + {isSecretManager && } + {isSecretManager && } + {isSecretManager && } + {isSecretManager && } - - {currentWorkspace?.version !== ProjectVersion.V3 && } + {isSecretManager && } + {currentWorkspace?.version !== ProjectVersion.V3 && isSecretManager && ( + + )}
);