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