Improve provider options.

This commit is contained in:
Yang Luo
2021-08-06 21:33:05 +08:00
parent 5afe3ed650
commit 8ea906a132

View File

@ -84,21 +84,23 @@ class ProviderEditPage extends React.Component {
{id: 'Default', name: 'Default'}, {id: 'Default', name: 'Default'},
] ]
); );
} else if (provider.category === "SMS") {
return (
[
{id: 'Aliyun SMS', name: 'Aliyun SMS'},
{id: 'Tencent Cloud SMS', name: 'Tencent Cloud SMS'},
]
);
} else if (provider.category === "Storage") { } else if (provider.category === "Storage") {
return ( return (
[ [
{id: 'Default', name: 'Default'}, {id: 'Local File System', name: 'Local File System'},
{id: 'Aliyun', name: 'Aliyun'}, {id: 'AWS S3', name: 'AWS S3'},
{id: 'AWSS3', name: 'AWS s3'}, {id: 'Aliyun OSS', name: 'Aliyun OSS'},
] ]
); );
} else { } else {
return ( return [];
[
{id: 'aliyun', name: 'Aliyun'},
{id: 'tencent', name: 'Tencent Cloud'},
]
);
} }
} }
@ -144,7 +146,9 @@ class ProviderEditPage extends React.Component {
this.updateProviderField('title', 'Casdoor Verification Code'); this.updateProviderField('title', 'Casdoor Verification Code');
this.updateProviderField('content', 'You have requested a verification code at Casdoor. Here is your code: %s, please enter in 5 minutes.'); this.updateProviderField('content', 'You have requested a verification code at Casdoor. Here is your code: %s, please enter in 5 minutes.');
} else if (value === "SMS") { } else if (value === "SMS") {
this.updateProviderField('type', 'aliyun'); this.updateProviderField('type', 'Aliyun SMS');
} else if (value === "Storage") {
this.updateProviderField('type', 'Aliyun OSS');
} }
})}> })}>
{ {