mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 18:15:53 +00:00
misc: addressed review comments
This commit is contained in:
+10
-2
@@ -39,7 +39,11 @@ const formSchema = z.object({
|
||||
}),
|
||||
z.object({
|
||||
configType: z.literal(ConfigType.MANUAL),
|
||||
secret: z.string().min(1),
|
||||
secret: z
|
||||
.string()
|
||||
.trim()
|
||||
.min(1)
|
||||
.transform((val) => val.replace(/\s+/g, "")),
|
||||
period: z.number().optional(),
|
||||
algorithm: z.nativeEnum(TotpAlgorithm).optional(),
|
||||
digits: z.number().optional()
|
||||
@@ -214,7 +218,7 @@ export const TotpInputForm = ({
|
||||
</FormControl>
|
||||
)}
|
||||
/>
|
||||
<div className="flex flex-row">
|
||||
<div className="flex flex-row gap-2">
|
||||
<Controller
|
||||
control={control}
|
||||
name="provider.period"
|
||||
@@ -287,6 +291,10 @@ export const TotpInputForm = ({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<p className="mb-8 text-sm font-normal text-gray-400">
|
||||
The period, digits, and algorithm values can remain at their defaults unless
|
||||
your TOTP provider specifies otherwise.
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
+10
@@ -101,10 +101,20 @@ export const DynamicSecretListView = ({
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onKeyDown={(evt) => {
|
||||
// no lease view for TOTP because it's irrelevant
|
||||
if (secret.type === DynamicSecretProviders.Totp) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (evt.key === "Enter" && !isRevoking)
|
||||
handlePopUpOpen("dynamicSecretLeases", secret.id);
|
||||
}}
|
||||
onClick={() => {
|
||||
// no lease view for TOTP because it's irrelevant
|
||||
if (secret.type === DynamicSecretProviders.Totp) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isRevoking) {
|
||||
handlePopUpOpen("dynamicSecretLeases", secret.id);
|
||||
}
|
||||
|
||||
+6
-2
@@ -40,7 +40,11 @@ const formSchema = z.object({
|
||||
}),
|
||||
z.object({
|
||||
configType: z.literal(ConfigType.MANUAL),
|
||||
secret: z.string().min(1),
|
||||
secret: z
|
||||
.string()
|
||||
.trim()
|
||||
.min(1)
|
||||
.transform((val) => val.replace(/\s+/g, "")),
|
||||
period: z.number().optional(),
|
||||
algorithm: z.nativeEnum(TotpAlgorithm).optional(),
|
||||
digits: z.number().optional()
|
||||
@@ -218,7 +222,7 @@ export const EditDynamicSecretTotpForm = ({
|
||||
</FormControl>
|
||||
)}
|
||||
/>
|
||||
<div className="flex flex-row">
|
||||
<div className="flex flex-row gap-2">
|
||||
<Controller
|
||||
control={control}
|
||||
name="inputs.period"
|
||||
|
||||
Reference in New Issue
Block a user