feat(secret-approval): implemented the new policy based approval system bare version

This commit is contained in:
Akhil Mohan
2023-10-05 20:34:50 +05:30
parent fc43511f5d
commit 63588b4e44
27 changed files with 1033 additions and 165 deletions
@@ -1,6 +1,6 @@
import Link from "next/link";
import { useRouter } from "next/router";
import { faAngleRight } from "@fortawesome/free-solid-svg-icons";
import { faAngleRight, faShield } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useOrganization, useWorkspace } from "@app/context";
@@ -16,6 +16,7 @@ type Props = {
onEnvChange?: (slug: string) => void;
secretPath?: string;
isFolderMode?: boolean;
isProtectedBranch?: boolean;
};
// TODO: make links clickable and clean up
@@ -42,7 +43,8 @@ export default function NavHeader({
userAvailableEnvs = [],
onEnvChange,
isFolderMode,
secretPath = "/"
secretPath = "/",
isProtectedBranch = false
}: Props): JSX.Element {
const { currentWorkspace } = useWorkspace();
const { currentOrg } = useOrganization();
@@ -151,6 +153,7 @@ export default function NavHeader({
</div>
);
})}
{isProtectedBranch && <FontAwesomeIcon icon={faShield} className="text-primary" />}
</div>
);
}