mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-11 05:28:51 +00:00
use __INFISICAL_UNCHANGED__ instead of empty string for unchanged
placeholder
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ export const PostgresAccountForm = ({ account, resourceId, resourceType, onSubmi
|
||||
...account,
|
||||
credentials: {
|
||||
...account.credentials,
|
||||
password: "******"
|
||||
password: "__INFISICAL_UNCHANGED__"
|
||||
}
|
||||
}
|
||||
: undefined
|
||||
|
||||
+2
-2
@@ -38,14 +38,14 @@ export const SqlAccountFields = ({ isUpdate }: { isUpdate: boolean }) => {
|
||||
type={showPassword ? "text" : "password"}
|
||||
autoComplete="new-password"
|
||||
onFocus={() => {
|
||||
if (isUpdate && field.value === "******") {
|
||||
if (isUpdate && field.value === "__INFISICAL_UNCHANGED__") {
|
||||
field.onChange("");
|
||||
}
|
||||
setShowPassword(true);
|
||||
}}
|
||||
onBlur={() => {
|
||||
if (isUpdate && field.value === "") {
|
||||
field.onChange("******");
|
||||
field.onChange("__INFISICAL_UNCHANGED__");
|
||||
}
|
||||
setShowPassword(false);
|
||||
}}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ export const PostgresResourceForm = ({ resource, onSubmit }: Props) => {
|
||||
rotationAccountCredentials: resource.rotationAccountCredentials
|
||||
? {
|
||||
...resource.rotationAccountCredentials,
|
||||
password: "******"
|
||||
password: "__INFISICAL_UNCHANGED__"
|
||||
}
|
||||
: resource.rotationAccountCredentials
|
||||
}
|
||||
|
||||
+2
-2
@@ -55,14 +55,14 @@ export const SqlRotateAccountFields = ({ isUpdate }: { isUpdate: boolean }) => {
|
||||
type={showPassword ? "text" : "password"}
|
||||
autoComplete="new-password"
|
||||
onFocus={() => {
|
||||
if (isUpdate && field.value === "******") {
|
||||
if (isUpdate && field.value === "__INFISICAL_UNCHANGED__") {
|
||||
field.onChange("");
|
||||
}
|
||||
setShowPassword(true);
|
||||
}}
|
||||
onBlur={() => {
|
||||
if (isUpdate && field.value === "") {
|
||||
field.onChange("******");
|
||||
field.onChange("__INFISICAL_UNCHANGED__");
|
||||
}
|
||||
setShowPassword(false);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user