fix: show placeholder password when editing asset

This commit is contained in:
2026-04-19 22:55:21 +08:00
parent ca427c7aac
commit 35e37a8142
2 changed files with 3 additions and 11 deletions
+3 -3
View File
@@ -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);
}
}
}}
/>