-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat: Website SSL DNS Type support WestCN #8305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -212,6 +212,10 @@ export const DNSTypes = [ | |
| label: i18n.global.t('website.rainyun'), | ||
| value: 'RainYun', | ||
| }, | ||
| { | ||
| label: i18n.global.t('website.westCN'), | ||
| value: 'WestCN', | ||
| }, | ||
| ]; | ||
|
|
||
| export const Fields = [ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes look mostly correct but there are a couple of suggestions for improvement:
Here’s an optimized version with minor adjustments: @@ -212,6 +212,10 @@
label: i18n.global.t('website.rainyun'),
value: 'RainYun',
},
+// WestCN is another DNS service provider available.
+{
+ label: i18n.global.t('website.westCN'),
+ value: 'WestCN',
+},These changes introduce clearer spacing and a brief comment in case someone reading the code later needs more context on the inclusion of |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,6 +130,14 @@ | |
| <el-input v-model.trim="account.authorization['token']"></el-input> | ||
| </el-form-item> | ||
| </div> | ||
| <div v-if="account.type === 'WestCN'"> | ||
| <el-form-item label="Username" prop="authorization.username"> | ||
| <el-input v-model.trim="account.authorization['username']"></el-input> | ||
| </el-form-item> | ||
| <el-form-item label="Password" prop="authorization.password"> | ||
| <el-input v-model.trim="account.authorization['password']"></el-input> | ||
| </el-form-item> | ||
| </div> | ||
| </el-form> | ||
| </el-col> | ||
| </el-row> | ||
|
|
@@ -181,6 +189,7 @@ const rules = ref<any>({ | |
| email: [Rules.email], | ||
| password: [Rules.requiredInput], | ||
| authPassword: [Rules.requiredInput], | ||
| username: [Rules.requiredInput], | ||
| }, | ||
| }); | ||
| const account = ref({ | ||
|
|
@@ -230,7 +239,7 @@ const submit = async (formEl: FormInstance | undefined) => { | |
| return; | ||
| } | ||
| if (account.value.type === 'ClouDNS') { | ||
| if (!account.value.authorization.authID && !account.value.authorization.subAuthID) { | ||
| if (!account.value.authorization['authID'] && !account.value.authorization['subAuthID']) { | ||
| MsgError('Please input Auth ID or Sub Auth ID'); | ||
| return; | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code changes look generally consistent with the intended functionality. Here are some observations:
These changes improve the application's flexibility by handling different authentication methods based on customer type ( Overall, the changes seem well-planned and should work smoothly without major issues when implemented. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code appears to be adding support for the West Cloud service provider, including configuring it using new parameters from the
paramstruct. It adds methods to initialize a West Cloud-specific DNS provider with authentication details.Here's an example of how you might use this function:
This setup ensures that your Acme client can handle West Cloud specific requirements effectively after being initialized with proper configuration details.