mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-21 05:00:16 +09:00
Add AWS secret key validation.
This commit is contained in:
parent
70f066c15f
commit
1b5a81c7ad
@ -1021,9 +1021,14 @@ export function Settings() {
|
||||
type="text"
|
||||
placeholder={Locale.Settings.Access.Bedrock.SecretKey.Placeholder}
|
||||
onChange={(e) => {
|
||||
accessStore.update(
|
||||
(access) => (access.awsSecretKey = e.currentTarget.value),
|
||||
);
|
||||
accessStore.update((access) => {
|
||||
const secretKey = e.currentTarget.value;
|
||||
if (secretKey && secretKey.length !== 40) {
|
||||
showToast(Locale.Settings.Access.Bedrock.SecretKey.Invalid);
|
||||
return;
|
||||
}
|
||||
access.awsSecretKey = secretKey;
|
||||
});
|
||||
}}
|
||||
maskWhenShow={true}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user