mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-28 08:30:19 +09:00
Add AWS access key validation.
This commit is contained in:
parent
afb0752d5d
commit
bfa433919f
@ -994,9 +994,14 @@ export function Settings() {
|
||||
type="text"
|
||||
placeholder={Locale.Settings.Access.Bedrock.AccessKey.Placeholder}
|
||||
onChange={(e) => {
|
||||
accessStore.update(
|
||||
(access) => (access.awsAccessKey = e.currentTarget.value),
|
||||
);
|
||||
accessStore.update((access) => {
|
||||
const accessKey = e.currentTarget.value;
|
||||
if (accessKey && accessKey.length !== 20) {
|
||||
showToast(Locale.Settings.Access.Bedrock.AccessKey.Invalid);
|
||||
return;
|
||||
}
|
||||
access.awsAccessKey = accessKey;
|
||||
});
|
||||
}}
|
||||
maskWhenShow={true}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user