mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Fix bug and i18n issue in captcha provider edit page.
This commit is contained in:
@ -350,29 +350,30 @@ class ProviderEditPage extends React.Component {
|
||||
)
|
||||
}
|
||||
{
|
||||
this.state.provider.type !== "Default" &&
|
||||
<>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{this.getClientIdLabel()}
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input value={this.state.provider.clientId} onChange={e => {
|
||||
this.updateProviderField('clientId', e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{this.getClientSecretLabel()}
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input value={this.state.provider.clientSecret} onChange={e => {
|
||||
this.updateProviderField('clientSecret', e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
</>
|
||||
this.state.provider.category === "Captcha" && this.state.provider.type === "Default" ? null : (
|
||||
<React.Fragment>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{this.getClientIdLabel()}
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input value={this.state.provider.clientId} onChange={e => {
|
||||
this.updateProviderField('clientId', e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{this.getClientSecretLabel()}
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input value={this.state.provider.clientSecret} onChange={e => {
|
||||
this.updateProviderField('clientSecret', e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
{
|
||||
this.state.provider.type !== "WeChat" ? null : (
|
||||
@ -640,38 +641,36 @@ class ProviderEditPage extends React.Component {
|
||||
) : null
|
||||
}
|
||||
{this.getAppIdRow()}
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(i18next.t("provider:Provider URL"), i18next.t("provider:Provider URL - Tooltip"))} :
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input prefix={<LinkOutlined/>} value={this.state.provider.providerUrl} onChange={e => {
|
||||
this.updateProviderField('providerUrl', e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
{
|
||||
this.state.provider.type !== "Default" &&
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(i18next.t("provider:Provider URL"), i18next.t("provider:Provider URL - Tooltip"))} :
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Input prefix={<LinkOutlined/>} value={this.state.provider.providerUrl} onChange={e => {
|
||||
this.updateProviderField('providerUrl', e.target.value);
|
||||
}} />
|
||||
</Col>
|
||||
</Row>
|
||||
}
|
||||
{
|
||||
this.state.provider.category === "Captcha" &&
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(i18next.t("general:Preview"), i18next.t("general:Preview - Tooltip"))} :
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<CaptchaPreview
|
||||
provider={this.state.provider}
|
||||
providerName={this.state.providerName}
|
||||
clientSecret={this.state.provider.clientSecret}
|
||||
captchaType={this.state.provider.type}
|
||||
owner={this.state.provider.owner}
|
||||
clientId={this.state.provider.clientId}
|
||||
name={this.state.provider.name}
|
||||
providerUrl={this.state.provider.providerUrl}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
this.state.provider.category !== "Captcha" ? null : (
|
||||
<Row style={{marginTop: '20px'}} >
|
||||
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
|
||||
{Setting.getLabel(i18next.t("general:Preview"), i18next.t("general:Preview - Tooltip"))} :
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<CaptchaPreview
|
||||
provider={this.state.provider}
|
||||
providerName={this.state.providerName}
|
||||
clientSecret={this.state.provider.clientSecret}
|
||||
captchaType={this.state.provider.type}
|
||||
owner={this.state.provider.owner}
|
||||
clientId={this.state.provider.clientId}
|
||||
name={this.state.provider.name}
|
||||
providerUrl={this.state.provider.providerUrl}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
)
|
||||
}
|
||||
</Card>
|
||||
)
|
||||
|
@ -445,8 +445,8 @@
|
||||
"Scope": "Scope",
|
||||
"Scope - Tooltip": "Scope - 工具提示",
|
||||
"Secret access key": "秘密访问密钥",
|
||||
"Secret key": "服务端密钥",
|
||||
"Secret key - Tooltip": "服务端密钥",
|
||||
"Secret key": "Secret key",
|
||||
"Secret key - Tooltip": "用于服务端调用验证码提供商API进行验证",
|
||||
"SecretAccessKey - Tooltip": "访问密钥-工具提示",
|
||||
"Sign Name": "签名名称",
|
||||
"Sign Name - Tooltip": "签名名称",
|
||||
@ -458,8 +458,8 @@
|
||||
"Signup HTML": "注册页面HTML",
|
||||
"Signup HTML - Edit": "注册页面HTML - 编辑",
|
||||
"Signup HTML - Tooltip": "自定义HTML,用于替换默认的注册页面样式",
|
||||
"Site key": "客户端密钥",
|
||||
"Site key - Tooltip": "客户端密钥",
|
||||
"Site key": "Site key",
|
||||
"Site key - Tooltip": "用于前端嵌入页面",
|
||||
"Sub type": "子类型",
|
||||
"Sub type - Tooltip": "子类型",
|
||||
"Template Code": "模板代码",
|
||||
|
Reference in New Issue
Block a user