mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
feat: moved more of isLoading to isPending
This commit is contained in:
@@ -130,7 +130,7 @@ export const Mfa = ({ successCallback, closeMfa, hideLogo, email, method }: Prop
|
||||
return (
|
||||
<div className="mx-auto w-max pb-4 pt-4 md:mb-16 md:px-8">
|
||||
{!hideLogo && (
|
||||
<Link href="/">
|
||||
<Link to="/">
|
||||
<div className="mb-4 flex justify-center">
|
||||
<img src="/images/gradientLogo.svg" height={90} width={120} alt="Infisical logo" />
|
||||
</div>
|
||||
@@ -193,7 +193,7 @@ export const Mfa = ({ successCallback, closeMfa, hideLogo, email, method }: Prop
|
||||
</form>
|
||||
{method === MfaMethod.TOTP && (
|
||||
<div className="mt-2 flex flex-row justify-center text-sm text-bunker-400">
|
||||
<Link href="/verify-email">
|
||||
<Link to="/verify-email">
|
||||
<span className="cursor-pointer duration-200 hover:text-bunker-200 hover:underline hover:decoration-primary-700 hover:underline-offset-4">
|
||||
Lost your recovery codes? Reset your account
|
||||
</span>
|
||||
|
||||
@@ -385,7 +385,7 @@ export const InitialStep = ({ setStep, email, setEmail, password, setPassword }:
|
||||
shouldDisplayLoginMethod(LoginMethod.GITHUB) ||
|
||||
shouldDisplayLoginMethod(LoginMethod.GITLAB)) ? (
|
||||
<div className="mt-6 flex flex-row text-sm text-bunker-400">
|
||||
<Link href="/signup">
|
||||
<Link to="/signup">
|
||||
<span className="cursor-pointer duration-200 hover:text-bunker-200 hover:underline hover:decoration-primary-700 hover:underline-offset-4">
|
||||
Don't have an account yet? {t("login.create-account")}
|
||||
</span>
|
||||
@@ -396,7 +396,7 @@ export const InitialStep = ({ setStep, email, setEmail, password, setPassword }:
|
||||
)}
|
||||
{shouldDisplayLoginMethod(LoginMethod.EMAIL) && (
|
||||
<div className="mt-2 flex flex-row text-sm text-bunker-400">
|
||||
<Link href="/verify-email">
|
||||
<Link to="/verify-email">
|
||||
<span className="cursor-pointer duration-200 hover:text-bunker-200 hover:underline hover:decoration-primary-700 hover:underline-offset-4">
|
||||
Forgot password? Recover your account
|
||||
</span>
|
||||
|
||||
@@ -357,7 +357,7 @@ export const PasswordStep = ({ providerAuthToken, email, password, setPassword }
|
||||
Infisical Master Password serves as a decryption mechanism so that even Google is not able
|
||||
to access your secrets.
|
||||
</span>
|
||||
<Link href="/verify-email">
|
||||
<Link to="/verify-email">
|
||||
<span className="mt-2 cursor-pointer duration-200 hover:text-bunker-200 hover:underline hover:decoration-primary-700 hover:underline-offset-4">
|
||||
{t("login.forgot-password")}
|
||||
</span>
|
||||
|
||||
@@ -50,9 +50,13 @@ export const LoginSsoPage = () => {
|
||||
<meta property="og:title" content={t("login.og-title") ?? ""} />
|
||||
<meta name="og:description" content={t("login.og-description") ?? ""} />
|
||||
</Helmet>
|
||||
<Link href="/">
|
||||
<Link to="/">
|
||||
<div className="mb-4 mt-20 flex justify-center">
|
||||
<img src="/images/gradientLogo.svg" height={90} width={120} alt="Infisical logo" />
|
||||
<img
|
||||
src="/images/gradientLogo.svg"
|
||||
style={{ height: "90px", width: "120px" }}
|
||||
alt="Infisical logo"
|
||||
/>
|
||||
</div>
|
||||
</Link>
|
||||
<div>{renderView()}</div>;
|
||||
|
||||
@@ -224,7 +224,7 @@ export const SelectOrganizationPage = () => {
|
||||
/>
|
||||
) : (
|
||||
<div className="mx-auto mt-20 w-fit rounded-lg border-2 border-mineshaft-500 p-10 shadow-lg">
|
||||
<Link href="/">
|
||||
<Link to="/">
|
||||
<div className="mb-4 flex justify-center">
|
||||
<img
|
||||
src="/images/gradientLogo.svg"
|
||||
|
||||
@@ -87,7 +87,7 @@ const Page = () => {
|
||||
leftIcon={<FontAwesomeIcon icon={faChevronLeft} />}
|
||||
onClick={() =>
|
||||
navigate({
|
||||
to: `/${ProjectType.CertificateManager}/${projectId}/overview` as const,
|
||||
to: `/${ProjectType.CertificateManager}/$projectId/overview` as const,
|
||||
params: {
|
||||
projectId
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export const OrgWorkflowIntegrationTab = withPermission(
|
||||
] as const);
|
||||
|
||||
const { currentOrg } = useOrganization();
|
||||
const { data: workflowIntegrations, isLoading: isWorkflowIntegrationsLoading } =
|
||||
const { data: workflowIntegrations, isPending: isWorkflowIntegrationsLoading } =
|
||||
useGetWorkflowIntegrations(currentOrg?.id);
|
||||
|
||||
const { mutateAsync: deleteSlackIntegration } = useDeleteSlackIntegration();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useEffect } from "react";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useNavigate } from "@tanstack/react-router";
|
||||
import axios from "axios";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -38,7 +37,6 @@ export const SlackIntegrationForm = ({ id, onClose }: Props) => {
|
||||
resolver: zodResolver(slackFormSchema)
|
||||
});
|
||||
|
||||
const navigate = useNavigate();
|
||||
const [isConnectLoading, setIsConnectLoading] = useToggle(false);
|
||||
const { currentOrg } = useOrganization();
|
||||
const { data: slackIntegration } = useGetSlackIntegrationById(id);
|
||||
|
||||
@@ -88,7 +88,7 @@ export const MembersTable = ({ handlePopUpOpen }: Props) => {
|
||||
toggleOrderDirection
|
||||
} = usePagination<MembersOrderBy>(MembersOrderBy.Name, { initPerPage: 20 });
|
||||
|
||||
const { data: members = [], isLoading: isMembersLoading } = useGetWorkspaceUsers(workspaceId);
|
||||
const { data: members = [], isPending: isMembersLoading } = useGetWorkspaceUsers(workspaceId);
|
||||
|
||||
const filteredUsers = useMemo(
|
||||
() =>
|
||||
|
||||
@@ -192,7 +192,7 @@ export const OverviewPage = () => {
|
||||
environments: (userAvailableEnvs || []).map(({ slug }) => slug)
|
||||
});
|
||||
|
||||
const { isLoading: isOverviewLoading, data: overview } = useGetProjectSecretsOverview(
|
||||
const { isPending: isOverviewLoading, data: overview } = useGetProjectSecretsOverview(
|
||||
{
|
||||
projectId: workspaceId,
|
||||
environments: visibleEnvs.map((env) => env.slug),
|
||||
|
||||
@@ -58,7 +58,7 @@ export const CreateSecretForm = ({ secretPath = "/", onClose }: Props) => {
|
||||
|
||||
const { mutateAsync: createSecretV3 } = useCreateSecretV3();
|
||||
const { mutateAsync: createFolder } = useCreateFolder();
|
||||
const { data: projectTags, isLoading: isTagsLoading } = useGetWsTags(
|
||||
const { data: projectTags, isPending: isTagsLoading } = useGetWsTags(
|
||||
canReadTags ? workspaceId : ""
|
||||
);
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export const CreateSecretForm = ({
|
||||
|
||||
const { permission } = useProjectPermission();
|
||||
const canReadTags = permission.can(ProjectPermissionActions.Read, ProjectPermissionSub.Tags);
|
||||
const { data: projectTags, isLoading: isTagsLoading } = useGetWsTags(
|
||||
const { data: projectTags, isPending: isTagsLoading } = useGetWsTags(
|
||||
canReadTags ? workspaceId : ""
|
||||
);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ export const EditDynamicSecretForm = ({
|
||||
onClose,
|
||||
secretPath
|
||||
}: Props) => {
|
||||
const { data: dynamicSecretDetails, isLoading: isDynamicSecretLoading } =
|
||||
const { data: dynamicSecretDetails, isPending: isDynamicSecretLoading } =
|
||||
useGetDynamicSecretDetails({
|
||||
projectSlug,
|
||||
environmentSlug: environment,
|
||||
|
||||
@@ -38,7 +38,7 @@ export const RotationOutputForm = ({ onSubmit, onCancel, outputSchema = {} }: Pr
|
||||
const secretPath = watch("secretPath");
|
||||
const selectedSecrets = watch("secrets");
|
||||
|
||||
const { data: secrets, isLoading: isSecretsLoading } = useGetProjectSecrets({
|
||||
const { data: secrets, isPending: isSecretsLoading } = useGetProjectSecrets({
|
||||
workspaceId,
|
||||
environment,
|
||||
secretPath
|
||||
|
||||
@@ -145,11 +145,11 @@ export const AwsSecretManagerConfigurePage = () => {
|
||||
});
|
||||
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
const { data: integrationAuthAwsKmsKeys, isLoading: isIntegrationAuthAwsKmsKeysLoading } =
|
||||
const { data: integrationAuthAwsKmsKeys, isPending: isIntegrationAuthAwsKmsKeysLoading } =
|
||||
useGetIntegrationAuthAwsKmsKeys({
|
||||
integrationAuthId: String(integrationAuthId),
|
||||
region: selectedAWSRegion
|
||||
|
||||
@@ -38,11 +38,11 @@ export const DatabricksConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
const { data: integrationAuthScopes, isLoading: isIntegrationAuthScopesLoading } =
|
||||
const { data: integrationAuthScopes, isPending: isIntegrationAuthScopesLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
@@ -40,10 +40,10 @@ export const FlyioConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
const { data: integrationAuthApps = [], isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps = [], isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
@@ -82,7 +82,7 @@ export const GcpSecretManagerConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
@@ -148,7 +148,7 @@ export const GithubConfigurePage = () => {
|
||||
});
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId);
|
||||
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId
|
||||
});
|
||||
|
||||
@@ -91,12 +91,12 @@ export const GitlabConfigurePage = () => {
|
||||
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? "",
|
||||
...(targetTeamId ? { teamId: targetTeamId } : {})
|
||||
});
|
||||
const { data: integrationAuthTeams, isLoading: isintegrationAuthTeamsLoading } =
|
||||
const { data: integrationAuthTeams, isPending: isintegrationAuthTeamsLoading } =
|
||||
useGetIntegrationAuthTeams((integrationAuthId as string) ?? "");
|
||||
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
@@ -66,7 +66,7 @@ export const HashicorpVaultConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
|
||||
@@ -43,13 +43,13 @@ export const HasuraCloudConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
const selectedSourceEnvironment = watch("sourceEnvironment");
|
||||
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
@@ -61,7 +61,7 @@ export const HerokuConfigurePage = () => {
|
||||
});
|
||||
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
@@ -61,14 +61,14 @@ export const OctopusDeployConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: octopusDeploySpaces, isLoading: isLoadingOctopusDeploySpaces } =
|
||||
const { data: octopusDeploySpaces, isPending: isLoadingOctopusDeploySpaces } =
|
||||
useGetIntegrationAuthOctopusDeploySpaces((integrationAuthId as string) ?? "");
|
||||
|
||||
const currentSpace = watch("targetSpace", octopusDeploySpaces?.[0]);
|
||||
const currentScope = watch("scope");
|
||||
const sourceEnv = watch("sourceEnvironment");
|
||||
|
||||
const { data: octopusDeployResources, isLoading: isOctopusDeployResourcesLoading } =
|
||||
const { data: octopusDeployResources, isPending: isOctopusDeployResourcesLoading } =
|
||||
useGetIntegrationAuthApps(
|
||||
{
|
||||
integrationAuthId,
|
||||
@@ -82,7 +82,7 @@ export const OctopusDeployConfigurePage = () => {
|
||||
|
||||
const currentResource = watch("targetResource", octopusDeployResources?.[0]);
|
||||
|
||||
const { data: octopusDeployScopeValues, isLoading: isOctopusDeployScopeValuesLoading } =
|
||||
const { data: octopusDeployScopeValues, isPending: isOctopusDeployScopeValuesLoading } =
|
||||
useGetIntegrationAuthOctopusDeployScopeValues(
|
||||
{
|
||||
integrationAuthId,
|
||||
|
||||
@@ -87,7 +87,7 @@ export const QoveryConfigurePage = () => {
|
||||
});
|
||||
const [targetEnvironmentId, setTargetEnvironmentId] = useState("");
|
||||
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthQoveryScopes({
|
||||
integrationAuthId: (integrationAuthId as string) ?? "",
|
||||
environmentId: targetEnvironmentId,
|
||||
|
||||
@@ -60,10 +60,10 @@ export const RenderConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
@@ -50,7 +50,7 @@ export const RundeckConfigurePage = () => {
|
||||
select: (el) => el.integrationAuthId
|
||||
});
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@ export const TeamcityConfigurePage = () => {
|
||||
const [secretPath, setSecretPath] = useState("/");
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
@@ -68,7 +68,7 @@ export const VercelConfigurePage = () => {
|
||||
});
|
||||
|
||||
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
|
||||
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
|
||||
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? "",
|
||||
teamId: integrationAuth?.teamId as string
|
||||
|
||||
Reference in New Issue
Block a user