fix: show placeholder password when editing asset
This commit is contained in:
+3
-3
@@ -225,13 +225,13 @@ func (assetApi AssetApi) AssetGetEndpoint(c echo.Context) (err error) {
|
||||
}
|
||||
|
||||
if item.Password != "" && item.Password != "-" {
|
||||
itemMap["password"] = ""
|
||||
itemMap["password"] = "******"
|
||||
}
|
||||
if item.PrivateKey != "" && item.PrivateKey != "-" {
|
||||
itemMap["privateKey"] = ""
|
||||
itemMap["privateKey"] = "******"
|
||||
}
|
||||
if item.Passphrase != "" && item.Passphrase != "-" {
|
||||
itemMap["passphrase"] = ""
|
||||
itemMap["passphrase"] = "******"
|
||||
}
|
||||
|
||||
return Success(c, itemMap)
|
||||
|
||||
@@ -62,14 +62,6 @@ const AccountTypeForm: React.FC<AccountTypeFormProps> = ({
|
||||
onViewSecret()
|
||||
}
|
||||
}
|
||||
},
|
||||
onChange: (e) => {
|
||||
let val = e.target.value;
|
||||
if (val.startsWith("******")) {
|
||||
val = val.substring(6);
|
||||
formRef?.current?.setFieldValue('password', val);
|
||||
setDecrypted(true);
|
||||
}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user