feat: completed org breadcrumbs

This commit is contained in:
=
2025-01-20 22:58:59 +05:30
parent 338961480c
commit 1b1fe2a700
29 changed files with 514 additions and 295 deletions
@@ -5,7 +5,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { useSearch } from "@tanstack/react-router";
import { OrgPermissionCan } from "@app/components/permissions";
import { Button, NoticeBanner, Pagination } from "@app/components/v2";
import { Button, NoticeBanner, PageHeader, Pagination } from "@app/components/v2";
import { ROUTE_PATHS } from "@app/const/routes";
import {
OrgPermissionActions,
@@ -111,11 +111,11 @@ export const SecretScanningPage = withPermission(
<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 px-6">
<div className="mt-6 text-3xl font-semibold text-gray-200">Secret Scanning</div>
<div className="mb-6 text-lg text-mineshaft-300">
Automatically monitor your GitHub activity and prevent secret leaks
</div>
<div className="w-full max-w-7xl">
<PageHeader
title="Secret Scanning"
description="Automatically monitor your GitHub activity and prevent secret leaks"
/>
{config.isSecretScanningDisabled && (
<NoticeBanner title="Secret scanning is in maintenance" className="mb-4">
We are working on improving the performance of secret scanning due to increased
@@ -210,4 +210,4 @@ export const SecretScanningPage = withPermission(
action: OrgPermissionActions.Read,
subject: OrgPermissionSubjects.SecretScanning
}
);
);
@@ -1,4 +1,4 @@
import { createFileRoute, stripSearchParams } from "@tanstack/react-router";
import { createFileRoute, linkOptions, stripSearchParams } from "@tanstack/react-router";
import { zodValidator } from "@tanstack/zod-adapter";
import { z } from "zod";
@@ -12,8 +12,8 @@ const SecretScanningQueryParams = z.object({
export const Route = createFileRoute(
"/_authenticate/_inject-org-details/organization/_layout/secret-scanning"
)({
component: SecretScanningPage,
validateSearch: zodValidator(SecretScanningQueryParams),
component: SecretScanningPage,
search: {
middlewares: [
stripSearchParams({
@@ -21,5 +21,16 @@ export const Route = createFileRoute(
state: ""
})
]
}
},
context: () => ({
breadcrumbs: [
{
label: "home",
link: linkOptions({ to: "/" })
},
{
label: "secret scanning"
}
]
})
});