mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-23 21:36:37 +00:00
Merge branch 'main' into dev
This commit is contained in:
@@ -63,7 +63,7 @@ export default function AccessControlsPage() {
|
||||
autoProvisioned: z.boolean()
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
username: user.username!,
|
||||
|
||||
@@ -161,7 +161,7 @@ export default function Page() {
|
||||
{ hours: 168, name: t("day", { count: 7 }) }
|
||||
];
|
||||
|
||||
const internalForm = useForm<z.infer<typeof internalFormSchema>>({
|
||||
const internalForm = useForm({
|
||||
resolver: zodResolver(internalFormSchema),
|
||||
defaultValues: {
|
||||
email: "",
|
||||
@@ -170,7 +170,7 @@ export default function Page() {
|
||||
}
|
||||
});
|
||||
|
||||
const googleAzureForm = useForm<z.infer<typeof googleAzureFormSchema>>({
|
||||
const googleAzureForm = useForm({
|
||||
resolver: zodResolver(googleAzureFormSchema),
|
||||
defaultValues: {
|
||||
email: "",
|
||||
@@ -179,7 +179,7 @@ export default function Page() {
|
||||
}
|
||||
});
|
||||
|
||||
const genericOidcForm = useForm<z.infer<typeof genericOidcFormSchema>>({
|
||||
const genericOidcForm = useForm({
|
||||
resolver: zodResolver(genericOidcFormSchema),
|
||||
defaultValues: {
|
||||
username: "",
|
||||
|
||||
@@ -91,14 +91,14 @@ export default function Page() {
|
||||
|
||||
type CopiedFormValues = z.infer<typeof copiedFormSchema>;
|
||||
|
||||
const form = useForm<CreateFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(createFormSchema),
|
||||
defaultValues: {
|
||||
name: ""
|
||||
}
|
||||
});
|
||||
|
||||
const copiedForm = useForm<CopiedFormValues>({
|
||||
const copiedForm = useForm({
|
||||
resolver: zodResolver(copiedFormSchema),
|
||||
defaultValues: {
|
||||
copied: true
|
||||
|
||||
@@ -58,7 +58,7 @@ export default function GeneralPage() {
|
||||
const [clientSites, setClientSites] = useState<Tag[]>([]);
|
||||
const [activeSitesTagIndex, setActiveSitesTagIndex] = useState<number | null>(null);
|
||||
|
||||
const form = useForm<GeneralFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(GeneralFormSchema),
|
||||
defaultValues: {
|
||||
name: client?.name,
|
||||
|
||||
@@ -150,40 +150,41 @@ export default function Page() {
|
||||
const commands = {
|
||||
mac: {
|
||||
"Apple Silicon (arm64)": [
|
||||
`curl -L -o olm "https://github.com/fosrl/olm/releases/download/${version}/olm_darwin_arm64" && chmod +x ./olm`,
|
||||
`sudo ./olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
`curl -fsSL https://digpangolin.com/get-olm.sh | bash`,
|
||||
`sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
],
|
||||
"Intel x64 (amd64)": [
|
||||
`curl -L -o olm "https://github.com/fosrl/olm/releases/download/${version}/olm_darwin_amd64" && chmod +x ./olm`,
|
||||
`sudo ./olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
`curl -fsSL https://digpangolin.com/get-olm.sh | bash`,
|
||||
`sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
]
|
||||
},
|
||||
linux: {
|
||||
amd64: [
|
||||
`wget -O olm "https://github.com/fosrl/olm/releases/download/${version}/olm_linux_amd64" && chmod +x ./olm`,
|
||||
`sudo ./olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
`curl -fsSL https://digpangolin.com/get-olm.sh | bash`,
|
||||
`sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
],
|
||||
arm64: [
|
||||
`wget -O olm "https://github.com/fosrl/olm/releases/download/${version}/olm_linux_arm64" && chmod +x ./olm`,
|
||||
`sudo ./olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
`curl -fsSL https://digpangolin.com/get-olm.sh | bash`,
|
||||
`sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
],
|
||||
arm32: [
|
||||
`wget -O olm "https://github.com/fosrl/olm/releases/download/${version}/olm_linux_arm32" && chmod +x ./olm`,
|
||||
`sudo ./olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
`curl -fsSL https://digpangolin.com/get-olm.sh | bash`,
|
||||
`sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
],
|
||||
arm32v6: [
|
||||
`wget -O olm "https://github.com/fosrl/olm/releases/download/${version}/olm_linux_arm32v6" && chmod +x ./olm`,
|
||||
`sudo ./olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
`curl -fsSL https://digpangolin.com/get-olm.sh | bash`,
|
||||
`sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
],
|
||||
riscv64: [
|
||||
`wget -O olm "https://github.com/fosrl/olm/releases/download/${version}/olm_linux_riscv64" && chmod +x ./olm`,
|
||||
`sudo ./olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
`curl -fsSL https://digpangolin.com/get-olm.sh | bash`,
|
||||
`sudo olm --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
]
|
||||
},
|
||||
windows: {
|
||||
x64: [
|
||||
`# Download and run the installer`,
|
||||
`curl -o olm.exe -L "https://github.com/fosrl/olm/releases/download/${version}/olm_windows_installer.exe"`,
|
||||
`# Run the installer to install olm and wintun`,
|
||||
`# Then run olm with your credentials`,
|
||||
`olm.exe --id ${id} --secret ${secret} --endpoint ${endpoint}`
|
||||
]
|
||||
}
|
||||
@@ -265,7 +266,7 @@ export default function Page() {
|
||||
}
|
||||
};
|
||||
|
||||
const form = useForm<CreateClientFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(createClientFormSchema),
|
||||
defaultValues: {
|
||||
name: "",
|
||||
|
||||
@@ -59,7 +59,7 @@ export default function GeneralPage() {
|
||||
const [loadingDelete, setLoadingDelete] = useState(false);
|
||||
const [loadingSave, setLoadingSave] = useState(false);
|
||||
|
||||
const form = useForm<GeneralFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(GeneralFormSchema),
|
||||
defaultValues: {
|
||||
name: org?.org.name,
|
||||
|
||||
@@ -138,12 +138,12 @@ export default function ResourceAuthenticationPage() {
|
||||
const [isSetPasswordOpen, setIsSetPasswordOpen] = useState(false);
|
||||
const [isSetPincodeOpen, setIsSetPincodeOpen] = useState(false);
|
||||
|
||||
const usersRolesForm = useForm<z.infer<typeof UsersRolesFormSchema>>({
|
||||
const usersRolesForm = useForm({
|
||||
resolver: zodResolver(UsersRolesFormSchema),
|
||||
defaultValues: { roles: [], users: [] }
|
||||
});
|
||||
|
||||
const whitelistForm = useForm<z.infer<typeof whitelistSchema>>({
|
||||
const whitelistForm = useForm({
|
||||
resolver: zodResolver(whitelistSchema),
|
||||
defaultValues: { emails: [] }
|
||||
});
|
||||
|
||||
@@ -119,7 +119,7 @@ export default function GeneralForm() {
|
||||
|
||||
type GeneralFormValues = z.infer<typeof GeneralFormSchema>;
|
||||
|
||||
const form = useForm<GeneralFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(GeneralFormSchema),
|
||||
defaultValues: {
|
||||
enabled: resource.enabled,
|
||||
|
||||
@@ -260,7 +260,7 @@ export default function ReverseProxyTargets(props: {
|
||||
port: "" as any as number,
|
||||
path: null,
|
||||
pathMatchType: null
|
||||
} as z.infer<typeof addTargetSchema>
|
||||
}
|
||||
});
|
||||
|
||||
const watchedIp = addTargetForm.watch("ip");
|
||||
@@ -274,7 +274,7 @@ export default function ReverseProxyTargets(props: {
|
||||
}
|
||||
};
|
||||
|
||||
const tlsSettingsForm = useForm<TlsSettingsValues>({
|
||||
const tlsSettingsForm = useForm({
|
||||
resolver: zodResolver(tlsSettingsSchema),
|
||||
defaultValues: {
|
||||
ssl: resource.ssl,
|
||||
@@ -282,7 +282,7 @@ export default function ReverseProxyTargets(props: {
|
||||
}
|
||||
});
|
||||
|
||||
const proxySettingsForm = useForm<ProxySettingsValues>({
|
||||
const proxySettingsForm = useForm({
|
||||
resolver: zodResolver(proxySettingsSchema),
|
||||
defaultValues: {
|
||||
setHostHeader: resource.setHostHeader || "",
|
||||
@@ -290,7 +290,7 @@ export default function ReverseProxyTargets(props: {
|
||||
}
|
||||
});
|
||||
|
||||
const targetsSettingsForm = useForm<TargetsSettingsValues>({
|
||||
const targetsSettingsForm = useForm({
|
||||
resolver: zodResolver(targetsSettingsSchema),
|
||||
defaultValues: {
|
||||
stickySession: resource.stickySession
|
||||
|
||||
@@ -114,7 +114,7 @@ export default function ResourceRules(props: {
|
||||
CIDR: t('ipAddressRange')
|
||||
} as const;
|
||||
|
||||
const addRuleForm = useForm<z.infer<typeof addRuleSchema>>({
|
||||
const addRuleForm = useForm({
|
||||
resolver: zodResolver(addRuleSchema),
|
||||
defaultValues: {
|
||||
action: "ACCEPT",
|
||||
|
||||
@@ -211,7 +211,7 @@ export default function Page() {
|
||||
])
|
||||
];
|
||||
|
||||
const baseForm = useForm<BaseResourceFormValues>({
|
||||
const baseForm = useForm({
|
||||
resolver: zodResolver(baseResourceFormSchema),
|
||||
defaultValues: {
|
||||
name: "",
|
||||
@@ -219,12 +219,12 @@ export default function Page() {
|
||||
}
|
||||
});
|
||||
|
||||
const httpForm = useForm<HttpResourceFormValues>({
|
||||
const httpForm = useForm({
|
||||
resolver: zodResolver(httpResourceFormSchema),
|
||||
defaultValues: {}
|
||||
});
|
||||
|
||||
const tcpUdpForm = useForm<TcpUdpResourceFormValues>({
|
||||
const tcpUdpForm = useForm({
|
||||
resolver: zodResolver(tcpUdpResourceFormSchema),
|
||||
defaultValues: {
|
||||
protocol: "tcp",
|
||||
@@ -241,7 +241,7 @@ export default function Page() {
|
||||
port: "" as any as number,
|
||||
path: null,
|
||||
pathMatchType: null
|
||||
} as z.infer<typeof addTargetSchema>
|
||||
}
|
||||
});
|
||||
|
||||
const watchedIp = addTargetForm.watch("ip");
|
||||
|
||||
@@ -64,7 +64,7 @@ export default function GeneralPage() {
|
||||
const router = useRouter();
|
||||
const t = useTranslations();
|
||||
|
||||
const form = useForm<GeneralFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(GeneralFormSchema),
|
||||
defaultValues: {
|
||||
name: site?.name,
|
||||
|
||||
@@ -425,7 +425,7 @@ WantedBy=default.target`
|
||||
}
|
||||
};
|
||||
|
||||
const form = useForm<CreateSiteFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(createSiteFormSchema),
|
||||
defaultValues: {
|
||||
name: "",
|
||||
|
||||
@@ -89,14 +89,14 @@ export default function Page() {
|
||||
|
||||
type CopiedFormValues = z.infer<typeof copiedFormSchema>;
|
||||
|
||||
const form = useForm<CreateFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(createFormSchema),
|
||||
defaultValues: {
|
||||
name: ""
|
||||
}
|
||||
});
|
||||
|
||||
const copiedForm = useForm<CopiedFormValues>({
|
||||
const copiedForm = useForm({
|
||||
resolver: zodResolver(copiedFormSchema),
|
||||
defaultValues: {
|
||||
copied: true
|
||||
|
||||
@@ -74,7 +74,7 @@ export default function GeneralPage() {
|
||||
|
||||
type GeneralFormValues = z.infer<typeof GeneralFormSchema>;
|
||||
|
||||
const form = useForm<GeneralFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(GeneralFormSchema),
|
||||
defaultValues: {
|
||||
name: "",
|
||||
|
||||
@@ -102,7 +102,7 @@ export default function PoliciesPage() {
|
||||
type PolicyFormValues = z.infer<typeof policyFormSchema>;
|
||||
type DefaultMappingsValues = z.infer<typeof defaultMappingsSchema>;
|
||||
|
||||
const form = useForm<PolicyFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(policyFormSchema),
|
||||
defaultValues: {
|
||||
orgId: "",
|
||||
@@ -111,7 +111,7 @@ export default function PoliciesPage() {
|
||||
}
|
||||
});
|
||||
|
||||
const defaultMappingsForm = useForm<DefaultMappingsValues>({
|
||||
const defaultMappingsForm = useForm({
|
||||
resolver: zodResolver(defaultMappingsSchema),
|
||||
defaultValues: {
|
||||
defaultRoleMapping: "",
|
||||
|
||||
@@ -79,7 +79,7 @@ export default function Page() {
|
||||
}
|
||||
];
|
||||
|
||||
const form = useForm<CreateIdpFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(createIdpFormSchema),
|
||||
defaultValues: {
|
||||
name: "",
|
||||
|
||||
@@ -97,7 +97,7 @@ export default function LicensePage() {
|
||||
})
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
licenseKey: "",
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function InitialSetupPage() {
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [checking, setChecking] = useState(true);
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
setupToken: "",
|
||||
|
||||
@@ -102,7 +102,7 @@ export default function ResetPasswordForm({
|
||||
code: z.string().length(6, { message: t('pincodeInvalid') })
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
email: emailParam || "",
|
||||
@@ -112,14 +112,14 @@ export default function ResetPasswordForm({
|
||||
}
|
||||
});
|
||||
|
||||
const mfaForm = useForm<z.infer<typeof mfaSchema>>({
|
||||
const mfaForm = useForm({
|
||||
resolver: zodResolver(mfaSchema),
|
||||
defaultValues: {
|
||||
code: ""
|
||||
}
|
||||
});
|
||||
|
||||
const requestForm = useForm<z.infer<typeof requestSchema>>({
|
||||
const requestForm = useForm({
|
||||
resolver: zodResolver(requestSchema),
|
||||
defaultValues: {
|
||||
email: emailParam || ""
|
||||
|
||||
@@ -50,7 +50,7 @@ export default function StepperForm() {
|
||||
subnet: z.string().min(1, { message: t("subnetRequired") })
|
||||
});
|
||||
|
||||
const orgForm = useForm<z.infer<typeof orgSchema>>({
|
||||
const orgForm = useForm({
|
||||
resolver: zodResolver(orgSchema),
|
||||
defaultValues: {
|
||||
orgName: "",
|
||||
|
||||
@@ -84,7 +84,7 @@ export function IdpCreateWizard({ onSubmit, defaultValues, loading = false }: Id
|
||||
}
|
||||
];
|
||||
|
||||
const form = useForm<CreateIdpFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(createIdpFormSchema),
|
||||
defaultValues: {
|
||||
name: "",
|
||||
|
||||
@@ -90,7 +90,7 @@ export default function LoginForm({ redirect, onLogin, idps }: LoginFormProps) {
|
||||
code: z.string().length(6, { message: t("pincodeInvalid") })
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
email: "",
|
||||
@@ -98,7 +98,7 @@ export default function LoginForm({ redirect, onLogin, idps }: LoginFormProps) {
|
||||
}
|
||||
});
|
||||
|
||||
const mfaForm = useForm<z.infer<typeof mfaSchema>>({
|
||||
const mfaForm = useForm({
|
||||
resolver: zodResolver(mfaSchema),
|
||||
defaultValues: {
|
||||
code: ""
|
||||
|
||||
@@ -102,7 +102,7 @@ export default function ResetPasswordForm({
|
||||
code: z.string().length(6, { message: t('pincodeInvalid') })
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
email: emailParam || "",
|
||||
@@ -112,14 +112,14 @@ export default function ResetPasswordForm({
|
||||
}
|
||||
});
|
||||
|
||||
const mfaForm = useForm<z.infer<typeof mfaSchema>>({
|
||||
const mfaForm = useForm({
|
||||
resolver: zodResolver(mfaSchema),
|
||||
defaultValues: {
|
||||
code: ""
|
||||
}
|
||||
});
|
||||
|
||||
const requestForm = useForm<z.infer<typeof requestSchema>>({
|
||||
const requestForm = useForm({
|
||||
resolver: zodResolver(requestSchema),
|
||||
defaultValues: {
|
||||
email: emailParam || ""
|
||||
|
||||
@@ -141,28 +141,28 @@ export default function ResourceAuthPortal(props: ResourceAuthPortalProps) {
|
||||
|
||||
const [activeTab, setActiveTab] = useState(getDefaultSelectedMethod());
|
||||
|
||||
const pinForm = useForm<z.infer<typeof pinSchema>>({
|
||||
const pinForm = useForm({
|
||||
resolver: zodResolver(pinSchema),
|
||||
defaultValues: {
|
||||
pin: ""
|
||||
}
|
||||
});
|
||||
|
||||
const passwordForm = useForm<z.infer<typeof passwordSchema>>({
|
||||
const passwordForm = useForm({
|
||||
resolver: zodResolver(passwordSchema),
|
||||
defaultValues: {
|
||||
password: ""
|
||||
}
|
||||
});
|
||||
|
||||
const requestOtpForm = useForm<z.infer<typeof requestOtpSchema>>({
|
||||
const requestOtpForm = useForm({
|
||||
resolver: zodResolver(requestOtpSchema),
|
||||
defaultValues: {
|
||||
email: ""
|
||||
}
|
||||
});
|
||||
|
||||
const submitOtpForm = useForm<z.infer<typeof submitOtpSchema>>({
|
||||
const submitOtpForm = useForm({
|
||||
resolver: zodResolver(submitOtpSchema),
|
||||
defaultValues: {
|
||||
email: "",
|
||||
|
||||
@@ -119,7 +119,7 @@ export default function SecurityKeyForm({
|
||||
code: z.string().optional()
|
||||
});
|
||||
|
||||
const registerForm = useForm<RegisterFormValues>({
|
||||
const registerForm = useForm({
|
||||
resolver: zodResolver(registerSchema),
|
||||
defaultValues: {
|
||||
name: "",
|
||||
@@ -128,7 +128,7 @@ export default function SecurityKeyForm({
|
||||
}
|
||||
});
|
||||
|
||||
const deleteForm = useForm<DeleteFormValues>({
|
||||
const deleteForm = useForm({
|
||||
resolver: zodResolver(deleteSchema),
|
||||
defaultValues: {
|
||||
password: "",
|
||||
|
||||
@@ -39,10 +39,6 @@ const setPasswordFormSchema = z.object({
|
||||
|
||||
type SetPasswordFormValues = z.infer<typeof setPasswordFormSchema>;
|
||||
|
||||
const defaultValues: Partial<SetPasswordFormValues> = {
|
||||
password: ""
|
||||
};
|
||||
|
||||
type SetPasswordFormProps = {
|
||||
open: boolean;
|
||||
setOpen: (open: boolean) => void;
|
||||
@@ -61,9 +57,11 @@ export default function SetResourcePasswordForm({
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const form = useForm<SetPasswordFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(setPasswordFormSchema),
|
||||
defaultValues
|
||||
defaultValues: {
|
||||
password: ""
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -44,10 +44,6 @@ const setPincodeFormSchema = z.object({
|
||||
|
||||
type SetPincodeFormValues = z.infer<typeof setPincodeFormSchema>;
|
||||
|
||||
const defaultValues: Partial<SetPincodeFormValues> = {
|
||||
pincode: ""
|
||||
};
|
||||
|
||||
type SetPincodeFormProps = {
|
||||
open: boolean;
|
||||
setOpen: (open: boolean) => void;
|
||||
@@ -65,9 +61,11 @@ export default function SetResourcePincodeForm({
|
||||
|
||||
const api = createApiClient(useEnvContext());
|
||||
|
||||
const form = useForm<SetPincodeFormValues>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(setPincodeFormSchema),
|
||||
defaultValues
|
||||
defaultValues: {
|
||||
pincode: ""
|
||||
}
|
||||
});
|
||||
|
||||
const t = useTranslations();
|
||||
|
||||
@@ -117,7 +117,7 @@ export default function SignupForm({
|
||||
const [passwordValue, setPasswordValue] = useState("");
|
||||
const [confirmPasswordValue, setConfirmPasswordValue] = useState("");
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
email: emailParam || "",
|
||||
|
||||
@@ -78,7 +78,7 @@ export default function SupporterStatus({ isCollapsed = false }: SupporterStatus
|
||||
key: z.string().nonempty({ message: "Supporter key is required" })
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
githubUsername: "",
|
||||
|
||||
@@ -91,14 +91,14 @@ const TwoFactorSetupForm = forwardRef<
|
||||
code: z.string().length(6, { message: t("pincodeInvalid") })
|
||||
});
|
||||
|
||||
const enableForm = useForm<z.infer<typeof enableSchema>>({
|
||||
const enableForm = useForm({
|
||||
resolver: zodResolver(enableSchema),
|
||||
defaultValues: {
|
||||
password: initialPassword || ""
|
||||
}
|
||||
});
|
||||
|
||||
const confirmForm = useForm<z.infer<typeof confirmSchema>>({
|
||||
const confirmForm = useForm({
|
||||
resolver: zodResolver(confirmSchema),
|
||||
defaultValues: {
|
||||
code: ""
|
||||
|
||||
@@ -80,7 +80,7 @@ export default function VerifyEmailForm({
|
||||
})
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof FormSchema>>({
|
||||
const form = useForm({
|
||||
resolver: zodResolver(FormSchema),
|
||||
defaultValues: {
|
||||
email: email,
|
||||
|
||||
Reference in New Issue
Block a user