mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 03:31:27 +00:00
feat: fixed all ts url errors
This commit is contained in:
@@ -46,7 +46,6 @@ import { useGetProjectSecretsDetails } from "@app/hooks/api/dashboard";
|
||||
import { DashboardSecretsOrderBy } from "@app/hooks/api/dashboard/types";
|
||||
import { useGetFolderCommitsCount } from "@app/hooks/api/folderCommits";
|
||||
import { OrderByDirection } from "@app/hooks/api/generic/types";
|
||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
||||
import { hasSecretReadValueOrDescribePermission } from "@app/lib/fn/permission";
|
||||
import { SecretRotationListView } from "@app/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView";
|
||||
|
||||
@@ -191,7 +190,7 @@ const Page = () => {
|
||||
type: "error"
|
||||
});
|
||||
navigate({
|
||||
to: `/${ProjectType.SecretManager}/$projectId/overview` as const,
|
||||
to: "/projects/$projectId/secret-manager/overview",
|
||||
params: {
|
||||
projectId: workspaceId
|
||||
}
|
||||
@@ -317,7 +316,7 @@ const Page = () => {
|
||||
const handleOnClickRollbackMode = () => {
|
||||
if (isPITEnabled) {
|
||||
navigate({
|
||||
to: `/${ProjectType.SecretManager}/$projectId/commits/$environment/$folderId` as const,
|
||||
to: "/projects/$projectId/secret-manager/commits/$environment/$folderId",
|
||||
params: {
|
||||
projectId: workspaceId,
|
||||
folderId,
|
||||
|
||||
+2
-6
@@ -990,9 +990,7 @@ export const SecretDetailSidebar = ({
|
||||
className="z-[100] capitalize"
|
||||
>
|
||||
<Link
|
||||
to={
|
||||
`/${ProjectType.SecretManager}/$projectId/members/$membershipId` as const
|
||||
}
|
||||
to="/projects/$projectId/members/$membershipId"
|
||||
params={{
|
||||
projectId: currentWorkspace.id,
|
||||
membershipId: user.membershipId
|
||||
@@ -1023,9 +1021,7 @@ export const SecretDetailSidebar = ({
|
||||
className="z-[100]"
|
||||
>
|
||||
<Link
|
||||
to={
|
||||
`/${ProjectType.SecretManager}/$projectId/identities/$identityId` as const
|
||||
}
|
||||
to="/projects/$projectId/identities/$identityId"
|
||||
params={{
|
||||
projectId: currentWorkspace.id,
|
||||
identityId: identity.id
|
||||
|
||||
@@ -1,51 +1,44 @@
|
||||
import {
|
||||
createFileRoute,
|
||||
linkOptions,
|
||||
stripSearchParams,
|
||||
} from '@tanstack/react-router'
|
||||
import { zodValidator } from '@tanstack/zod-adapter'
|
||||
import { z } from 'zod'
|
||||
import { createFileRoute, linkOptions, stripSearchParams } from "@tanstack/react-router";
|
||||
import { zodValidator } from "@tanstack/zod-adapter";
|
||||
import { z } from "zod";
|
||||
|
||||
import { SecretDashboardPathBreadcrumb } from '@app/components/navigation/SecretDashboardPathBreadcrumb'
|
||||
import { BreadcrumbTypes } from '@app/components/v2'
|
||||
import { SecretDashboardPathBreadcrumb } from "@app/components/navigation/SecretDashboardPathBreadcrumb";
|
||||
import { BreadcrumbTypes } from "@app/components/v2";
|
||||
|
||||
import { SecretDashboardPage } from './SecretDashboardPage'
|
||||
import { SecretDashboardPage } from "./SecretDashboardPage";
|
||||
|
||||
const SecretDashboardPageQueryParamsSchema = z.object({
|
||||
secretPath: z.string().catch('/'),
|
||||
search: z.string().catch(''),
|
||||
tags: z.string().catch(''),
|
||||
})
|
||||
secretPath: z.string().catch("/"),
|
||||
search: z.string().catch(""),
|
||||
tags: z.string().catch("")
|
||||
});
|
||||
export const Route = createFileRoute(
|
||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/secrets/$envSlug',
|
||||
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/secrets/$envSlug"
|
||||
)({
|
||||
component: SecretDashboardPage,
|
||||
validateSearch: zodValidator(SecretDashboardPageQueryParamsSchema),
|
||||
search: {
|
||||
middlewares: [stripSearchParams({ secretPath: '/', search: '', tags: '' })],
|
||||
middlewares: [stripSearchParams({ secretPath: "/", search: "", tags: "" })]
|
||||
},
|
||||
beforeLoad: ({ context, params, search }) => {
|
||||
const secretPathSegments = search.secretPath.split('/').filter(Boolean)
|
||||
const secretPathSegments = search.secretPath.split("/").filter(Boolean);
|
||||
return {
|
||||
breadcrumbs: [
|
||||
...context.breadcrumbs,
|
||||
{
|
||||
type: BreadcrumbTypes.Dropdown,
|
||||
label:
|
||||
context.project.environments.find(
|
||||
(el) => el.slug === params.envSlug,
|
||||
)?.name || '',
|
||||
dropdownTitle: 'Environments',
|
||||
label: context.project.environments.find((el) => el.slug === params.envSlug)?.name || "",
|
||||
dropdownTitle: "Environments",
|
||||
links: context.project.environments.map((el) => ({
|
||||
label: el.name,
|
||||
link: linkOptions({
|
||||
to: '/secret-manager/$projectId/secrets/$envSlug',
|
||||
to: "/projects/$projectId/secret-manager/secrets/$envSlug",
|
||||
params: {
|
||||
projectId: params.projectId,
|
||||
envSlug: el.slug,
|
||||
},
|
||||
}),
|
||||
})),
|
||||
envSlug: el.slug
|
||||
}
|
||||
})
|
||||
}))
|
||||
},
|
||||
...secretPathSegments.map((_, index) => ({
|
||||
type: BreadcrumbTypes.Component,
|
||||
@@ -56,9 +49,9 @@ export const Route = createFileRoute(
|
||||
environmentSlug={params.envSlug}
|
||||
projectId={params.projectId}
|
||||
/>
|
||||
),
|
||||
})),
|
||||
],
|
||||
}
|
||||
},
|
||||
})
|
||||
)
|
||||
}))
|
||||
]
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user