Rename canUnbind to canUnlink.

This commit is contained in:
Yang Luo 2021-06-17 13:45:10 +08:00
parent 586da5caac
commit ce60a76920
3 changed files with 7 additions and 7 deletions

View File

@ -18,7 +18,7 @@ type ProviderItem struct {
Name string `json:"name"`
CanSignUp bool `json:"canSignUp"`
CanSignIn bool `json:"canSignIn"`
CanUnbind bool `json:"canUnbind"`
CanUnlink bool `json:"canUnlink"`
AlertType string `json:"alertType"`
Provider *Provider `json:"provider"`
}

View File

@ -38,7 +38,7 @@ class ProviderTable extends React.Component {
}
addRow(table) {
let row = {name: "Please select a provider", canSignUp: false, canSignIn: true, canUnbind: true, alertType: "None"};
let row = {name: "Please select a provider", canSignUp: false, canSignIn: true, canUnlink: true, alertType: "None"};
if (table === undefined) {
table = [];
}
@ -110,14 +110,14 @@ class ProviderTable extends React.Component {
}
},
{
title: i18next.t("provider:canUnbind"),
dataIndex: 'canUnbind',
key: 'canUnbind',
title: i18next.t("provider:canUnlink"),
dataIndex: 'canUnlink',
key: 'canUnlink',
width: '120px',
render: (text, record, index) => {
return (
<Switch checked={text} onChange={checked => {
this.updateField(table, index, 'canUnbind', checked);
this.updateField(table, index, 'canUnlink', checked);
}} />
)
}

View File

@ -187,7 +187,7 @@ class UserEditPage extends React.Component {
<Button style={{marginLeft: '20px', width: '80px'}} type="primary">{i18next.t("user:Link")}</Button>
</a>
) : (
<Button disabled={!providerItem.canUnbind} style={{marginLeft: '20px', width: '80px'}} onClick={() => this.unlinkUser(provider.type)}>{i18next.t("user:Unlink")}</Button>
<Button disabled={!providerItem.canUnlink} style={{marginLeft: '20px', width: '80px'}} onClick={() => this.unlinkUser(provider.type)}>{i18next.t("user:Unlink")}</Button>
)
}
</Col>