mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-22 05:30:19 +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"
|
type="text"
|
||||||
placeholder={Locale.Settings.Access.Bedrock.SecretKey.Placeholder}
|
placeholder={Locale.Settings.Access.Bedrock.SecretKey.Placeholder}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
accessStore.update(
|
accessStore.update((access) => {
|
||||||
(access) => (access.awsSecretKey = e.currentTarget.value),
|
const secretKey = e.currentTarget.value;
|
||||||
);
|
if (secretKey && secretKey.length !== 40) {
|
||||||
|
showToast(Locale.Settings.Access.Bedrock.SecretKey.Invalid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
access.awsSecretKey = secretKey;
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
maskWhenShow={true}
|
maskWhenShow={true}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user