feat: add tooltips for xxxeditPage fields (#135)

Signed-off-by: wasabi <690898835@qq.com>
This commit is contained in:
wasabi 2021-06-30 00:58:25 +08:00 committed by GitHub
parent f26b6c2d11
commit 7eb4da6e54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 152 additions and 65 deletions

View File

@ -111,7 +111,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Display name")}:
{Setting.getLabel(i18next.t("general:Display name"), i18next.t("general:Display name - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.application.displayName} onChange={e => {
@ -121,7 +121,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
Logo:
{Setting.getLabel("Logo", i18next.t("general:Logo - Tooltip"))} :
</Col>
<Col span={22} >
<Row style={{marginTop: '20px'}} >
@ -148,7 +148,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Homepage URL")}:
{Setting.getLabel(i18next.t("general:Home"), i18next.t("general:Home - Tooltip"))} :
</Col>
<Col span={22} >
<Input prefix={<LinkOutlined/>} value={this.state.application.homepageUrl} onChange={e => {
@ -158,7 +158,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Description")}:
{Setting.getLabel(i18next.t("general:Description"), i18next.t("general:Description - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.application.description} onChange={e => {
@ -168,7 +168,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Organization")}:
{Setting.getLabel(i18next.t("general:Organization"), i18next.t("general:Organization - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: '100%'}} value={this.state.application.organization} onChange={(value => {this.updateApplicationField('organization', value);})}>
@ -180,7 +180,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Client ID")}:
{Setting.getLabel(i18next.t("provider:Client ID"), i18next.t("provider:Client ID - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.application.clientId} onChange={e => {
@ -190,7 +190,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Client secret")}:
{Setting.getLabel(i18next.t("provider:Client secret"), i18next.t("provider:Client secret - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.application.clientSecret} onChange={e => {
@ -200,7 +200,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("application:Redirect URLs")}:
{Setting.getLabel(i18next.t("application:Redirect URLs"), i18next.t("application:Redirect URLs - Tooltip"))} :
</Col>
<Col span={22} >
<UrlTable
@ -212,7 +212,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Token expire")}:
{Setting.getLabel(i18next.t("general:Token expire"), i18next.t("general:Token expire - Tooltip"))} :
</Col>
<Col span={22} >
<Input style={{width: "150px"}} value={this.state.application.expireInHours} suffix="Hours" onChange={e => {
@ -222,7 +222,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("application:Enable password")}:
{Setting.getLabel(i18next.t("application:Password ON"), i18next.t("application:Password ON - Tooltip"))} :
</Col>
<Col span={1} >
<Switch checked={this.state.application.enablePassword} onChange={checked => {
@ -232,7 +232,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("application:Enable signup")}:
{Setting.getLabel(i18next.t("application:Enable signup"), i18next.t("application:Enable signup - Tooltip"))} :
</Col>
<Col span={1} >
<Switch checked={this.state.application.enableSignUp} onChange={checked => {
@ -242,7 +242,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Signup URL")}:
{Setting.getLabel(i18next.t("general:Signup URL"), i18next.t("general:Signup URL - Tooltip"))} :
</Col>
<Col span={22} >
<Input prefix={<LinkOutlined/>} value={this.state.application.signupUrl} onChange={e => {
@ -252,7 +252,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Signin URL")}:
{Setting.getLabel(i18next.t("general:Signin URL"), i18next.t("general:Signin URL - Tooltip"))} :
</Col>
<Col span={22} >
<Input prefix={<LinkOutlined/>} value={this.state.application.signinUrl} onChange={e => {
@ -262,7 +262,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Forget URL")}:
{Setting.getLabel(i18next.t("general:Forget URL"), i18next.t("general:Forget URL - Tooltip"))} :
</Col>
<Col span={22} >
<Input prefix={<LinkOutlined/>} value={this.state.application.forgetUrl} onChange={e => {
@ -272,7 +272,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Affiliation URL")}:
{Setting.getLabel(i18next.t("general:Affiliation URL"), i18next.t("general:Affiliation URL - Tooltip"))} :
</Col>
<Col span={22} >
<Input prefix={<LinkOutlined/>} value={this.state.application.affiliationUrl} onChange={e => {
@ -282,7 +282,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Providers")}:
{Setting.getLabel(i18next.t("general:Providers"), i18next.t("general:Providers - Tooltip"))} :
</Col>
<Col span={22} >
<ProviderTable
@ -295,7 +295,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Preview")}:
{Setting.getLabel(i18next.t("general:Preview"), i18next.t("general:Preview - Tooltip"))} :
</Col>
{
this.renderPreview()
@ -303,7 +303,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("application:Signup items")}:
{Setting.getLabel(i18next.t("application:Signup items"), i18next.t("application:Signup items - Tooltip"))} :
</Col>
<Col span={22} >
<SignupTable
@ -315,7 +315,7 @@ class ApplicationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Preview")}:
{Setting.getLabel(i18next.t("general:Preview"), i18next.t("general:Preview - Tooltip"))} :
</Col>
{
this.renderPreview2()

View File

@ -71,7 +71,7 @@ class OrganizationEditPage extends React.Component {
} style={{marginLeft: '5px'}} type="inner">
<Row style={{marginTop: '10px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Name")}:
{Setting.getLabel(i18next.t("general:Name"), i18next.t("general:Name - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.organization.name} onChange={e => {
@ -81,7 +81,7 @@ class OrganizationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Display name")}:
{Setting.getLabel(i18next.t("general:Display name"), i18next.t("general:Display name - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.organization.displayName} onChange={e => {
@ -91,7 +91,7 @@ class OrganizationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
Favicon:
{Setting.getLabel("Favicon", i18next.t("general:Favicon - Tooltip"))} :
</Col>
<Col span={22} >
<Row style={{marginTop: '20px'}} >
@ -118,7 +118,7 @@ class OrganizationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("organization:Website URL")}:
{Setting.getLabel(i18next.t("organization:Website URL"), i18next.t("organization:Website URL - Tooltip"))} :
</Col>
<Col span={22} >
<Input prefix={<LinkOutlined/>} value={this.state.organization.websiteUrl} onChange={e => {
@ -128,7 +128,7 @@ class OrganizationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Password type")}:
{Setting.getLabel(i18next.t("general:Password type"), i18next.t("general:Password type - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: '100%'}} value={this.state.organization.passwordType} onChange={(value => {this.updateOrganizationField('passwordType', value);})}>
@ -141,7 +141,7 @@ class OrganizationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Password salt")}:
{Setting.getLabel(i18next.t("general:Password salt"), i18next.t("general:Password salt - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.organization.passwordSalt} onChange={e => {
@ -151,7 +151,7 @@ class OrganizationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Phone Prefix")}:
{Setting.getLabel(i18next.t("general:Phone Prefix"), i18next.t("general:Phone Prefix - Tooltip"))} :
</Col>
<Col span={22} >
<Input addonBefore={"+"} value={this.state.organization.phonePrefix} onChange={e => {
@ -161,7 +161,7 @@ class OrganizationEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Default avatar")}:
{Setting.getLabel(i18next.t("general:Default avatar"), i18next.t("general:Default avatar - Tooltip"))} :
</Col>
<Col span={22} >
<Row style={{marginTop: '20px'}} >

View File

@ -18,6 +18,7 @@ import {LinkOutlined} from "@ant-design/icons";
import * as ProviderBackend from "./backend/ProviderBackend";
import * as Setting from "./Setting";
import i18next from "i18next";
import {getLabel} from "./Setting";
const { Option } = Select;
const { TextArea } = Input;
@ -102,7 +103,7 @@ class ProviderEditPage extends React.Component {
} style={{marginLeft: '5px'}} type="inner">
<Row style={{marginTop: '10px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Name")}:
{Setting.getLabel(i18next.t("general:Name"), i18next.t("general:Name - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.provider.name} onChange={e => {
@ -112,7 +113,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Display name")}:
{Setting.getLabel(i18next.t("general:Display name"), i18next.t("general:Display name - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.provider.displayName} onChange={e => {
@ -122,7 +123,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Category")}:
{Setting.getLabel(i18next.t("provider:Category"), i18next.t("provider:Category - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: '100%'}} value={this.state.provider.category} onChange={(value => {
@ -149,7 +150,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Type")}:
{Setting.getLabel(i18next.t("provider:Type"), i18next.t("provider:Type - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: '100%'}} value={this.state.provider.type} onChange={(value => {this.updateProviderField('type', value);})}>
@ -161,7 +162,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{this.state.provider.category === "Email" ? i18next.t("signup:Username") : i18next.t("provider:Client ID")}:
{this.state.provider.category === "Email" ? Setting.getLabel(i18next.t("signup:Username"), i18next.t("signup:Username - Tooltip")) : Setting.getLabel(i18next.t("provider:Client ID"), i18next.t("provider:Client ID - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.provider.clientId} onChange={e => {
@ -171,7 +172,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{this.state.provider.category === "Email" ? i18next.t("login:Password") : i18next.t("provider:Client secret")}:
{this.state.provider.category === "Email" ? Setting.getLabel(i18next.t("login:Password"), i18next.t("login:Password - Tooltip")) : Setting.getLabel(i18next.t("provider:Client secret"), i18next.t("provider:Client secret - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.provider.clientSecret} onChange={e => {
@ -184,7 +185,7 @@ class ProviderEditPage extends React.Component {
<React.Fragment>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Host")}:
{Setting.getLabel(i18next.t("provider:Host"), i18next.t("provider:Host - Tooltip"))} :
</Col>
<Col span={22} >
<Input prefix={<LinkOutlined/>} value={this.state.provider.host} onChange={e => {
@ -194,7 +195,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Port")}:
{Setting.getLabel(i18next.t("provider:Port"), i18next.t("provider:Port - Tooltip"))} :
</Col>
<Col span={22} >
<InputNumber value={this.state.provider.port} onChange={value => {
@ -204,7 +205,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Email Title")}:
{Setting.getLabel(i18next.t("provider:Email Title"), i18next.t("provider:Email Title - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.provider.title} onChange={e => {
@ -214,7 +215,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Email Content")}:
{Setting.getLabel(i18next.t("provider:Email Content"), i18next.t("provider:Email Content - Tooltip"))} :
</Col>
<Col span={22} >
<TextArea autoSize={{minRows: 1, maxRows: 100}} value={this.state.provider.content} onChange={e => {
@ -227,7 +228,7 @@ class ProviderEditPage extends React.Component {
<React.Fragment>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Region ID")}:
{Setting.getLabel(i18next.t("provider:Region ID"), i18next.t("provider:Region ID - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.provider.regionId} onChange={e => {
@ -237,7 +238,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Sign Name")}:
{Setting.getLabel(i18next.t("provider:Sign Name"), i18next.t("provider:Sign Name - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.provider.signName} onChange={e => {
@ -247,7 +248,7 @@ class ProviderEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Template Code")}:
{Setting.getLabel(i18next.t("provider:Template Code"), i18next.t("provider:Template Code - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.provider.templateCode} onChange={e => {
@ -261,7 +262,7 @@ class ProviderEditPage extends React.Component {
{this.state.provider.category === "SMS" && this.state.provider.type === "tencent" ? (
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:App ID")}:
{Setting.getLabel(i18next.t("provider:App ID"), i18next.t("provider:App ID - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.provider.appId} onChange={e => {
@ -272,7 +273,7 @@ class ProviderEditPage extends React.Component {
) : null}
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("provider:Provider URL")}:
{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 => {

View File

@ -114,7 +114,7 @@ class UserEditPage extends React.Component {
} style={{marginLeft: '5px'}} type="inner">
<Row style={{marginTop: '10px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Organization")}:
{Setting.getLabel(i18next.t("general:Organization"), i18next.t("general:Organization - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: '100%'}} disabled={!Setting.isAdminUser(this.props.account)} value={this.state.user.owner} onChange={(value => {this.updateUserField('owner', value);})}>
@ -126,7 +126,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
ID:
{Setting.getLabel("ID", i18next.t("general:ID - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.user.id} disabled={true} />
@ -134,7 +134,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Name")}:
{Setting.getLabel(i18next.t("general:Name"), i18next.t("general:Name - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.user.name} disabled={true} onChange={e => {
@ -144,7 +144,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Display name")}:
{Setting.getLabel(i18next.t("general:Display name"), i18next.t("general:Display name - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.user.displayName} onChange={e => {
@ -154,7 +154,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Avatar")}:
{Setting.getLabel(i18next.t("general:Avatar"), i18next.t("general:Avatar - Tooltip"))} :
</Col>
<Col span={22} >
<Row style={{marginTop: '20px'}} >
@ -184,7 +184,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:User type")}:
{Setting.getLabel(i18next.t("general:User type"), i18next.t("general:User type - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: '100%'}} value={this.state.user.type} onChange={(value => {this.updateUserField('type', value);})}>
@ -197,7 +197,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Password")}:
{Setting.getLabel(i18next.t("general:Password"), i18next.t("general:Password - Tooltip"))} :
</Col>
<Col span={22} >
<PasswordModal user={this.state.user} />
@ -205,7 +205,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Email")}:
{Setting.getLabel(i18next.t("general:Email"), i18next.t("general:Email - Tooltip"))} :
</Col>
<Col style={{paddingRight: '20px'}} span={11} >
<Input value={this.state.user.email} disabled />
@ -216,7 +216,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("general:Phone")}:
{Setting.getLabel(i18next.t("general:Phone"), i18next.t("general:Phone - Tooltip"))} :
</Col>
<Col style={{paddingRight: '20px'}} span={11} >
<Input value={this.state.user.phone} addonBefore={`+${this.state.application?.organizationObj.phonePrefix}`} disabled />
@ -232,7 +232,7 @@ class UserEditPage extends React.Component {
}
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("user:Tag")}:
{Setting.getLabel(i18next.t("user:Tag"), i18next.t("user:Tag - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.user.tag} onChange={e => {
@ -244,7 +244,7 @@ class UserEditPage extends React.Component {
!this.isSelfOrAdmin() ? null : (
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("user:Third-party logins")}:
{Setting.getLabel(i18next.t("user:Third-party logins"), i18next.t("user:Third-party logins - Tooltip"))} :
</Col>
<Col span={22} >
<div style={{marginBottom: 20}}>
@ -274,7 +274,7 @@ class UserEditPage extends React.Component {
{/*</Row>*/}
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("user:Is admin")}:
{Setting.getLabel(i18next.t("user:Is admin"), i18next.t("user:Is admin - Tooltip"))} :
</Col>
<Col span={1} >
<Switch checked={this.state.user.isAdmin} onChange={checked => {
@ -284,7 +284,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("user:Is global admin")}:
{Setting.getLabel(i18next.t("user:Is global admin"), i18next.t("user:Is global admin - Tooltip"))} :
</Col>
<Col span={1} >
<Switch checked={this.state.user.isGlobalAdmin} onChange={checked => {
@ -294,7 +294,7 @@ class UserEditPage extends React.Component {
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={2}>
{i18next.t("user:Is forbidden")}:
{Setting.getLabel(i18next.t("user:Is forbidden"), i18next.t("user:Is forbidden - Tooltip"))} :
</Col>
<Col span={1} >
<Switch checked={this.state.user.isForbidden} onChange={checked => {

View File

@ -2,6 +2,7 @@ import React from "react";
import {Cascader, Col, Input, Row, Select} from 'antd';
import i18next from "i18next";
import * as UserBackend from "../backend/UserBackend";
import * as Setting from "../Setting";
const { Option } = Select;
@ -60,7 +61,7 @@ class AffiliationSelect extends React.Component {
this.props.application?.affiliationUrl === "" ? null : (
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={this.props.labelSpan}>
{i18next.t("user:Address")}:
{Setting.getLabel(i18next.t("user:Address"), i18next.t("user:Address - Tooltip"))} :
</Col>
<Col span={24 - this.props.labelSpan} >
<Cascader style={{width: '100%', maxWidth: '400px'}} value={this.props.user.address} options={this.state.addressOptions} onChange={value => {
@ -75,7 +76,7 @@ class AffiliationSelect extends React.Component {
}
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={this.props.labelSpan}>
{i18next.t("user:Affiliation")}:
{Setting.getLabel(i18next.t("user:Affiliation"), i18next.t("user:Affiliation - Tooltip"))} :
</Col>
<Col span={24 - this.props.labelSpan} >
{

View File

@ -2,8 +2,13 @@
"general":
{
"Home": "Home",
"Home - Tooltip": "Application homepage",
"Organizations": "Organizations",
"Organizations - Tooltip": "The group the user belongs to",
"Organization": "Organization",
"Organization - Tooltip": "The group the user belongs to",
"Providers": "Providers",
"Providers - Tooltip": "List of third-party applications that can be used to log in",
"Users": "Users",
"User": "User",
"Applications": "Applications",
@ -15,35 +20,61 @@
"Delete": "Delete",
"Up": "Up",
"Down": "Down",
"Organization": "Organization",
"Created time": "Created time",
"Name": "Name",
"Name - Tooltip": "Unique string-style identifier",
"Display name": "Display name",
"Display name - Tooltip": "Name shown to users, repeatable",
"Personal name": "Personal name",
"Personal name - Tooltip": "User personal name",
"Avatar": "Avatar",
"Avatar - Tooltip": "Avatar to show to others",
"Default avatar": "Default avatar",
"Default avatar - Tooltip": "default avatar",
"URL": "URL",
"URL - Tooltip": "Unique string-style identifier",
"Preview": "Preview",
"Preview - Tooltip": "The form in which the password is stored in the database",
"User type": "User type",
"User type - Tooltip": "Permission role owned by the user",
"Password type": "Password type",
"Password type - Tooltip": "The form in which the password is stored in the database",
"Password salt": "Password salt",
"Password salt - Tooltip": "Random parameters used for password encryption",
"Password": "Password",
"Email": "Email",
"Email - Tooltip": "email",
"Phone": "Phone",
"Phone - Tooltip": "Phone",
"Logo": "Logo",
"Logo - Tooltip": "App's image tag",
"User containers": "User containers",
"Users under all organizations": "Users under all organizations",
"OAuth providers": "OAuth providers",
"Applications that requires authentication": "Applications that requires authentication",
"Swagger": "Swagger",
"Phone Prefix": "Phone Prefix",
"Phone Prefix - Tooltip": "Mobile phone number prefix, used to distinguish countries or regions",
"Enter the code": "Enter the code",
"Captcha": "Captcha",
"Authorization code":"Authorization code",
"Access token":"Access token",
"Expires in":"Expires in",
"Scope":"Scope"
"Scope":"Scope",
"Description": "Description",
"Description - Tooltip": "Related descriptive information",
"Token expire": "Token expire",
"Token expire - Tooltip": "Token authorization time",
"Forget URL": "Forget URL",
"Forget URL - Tooltip": "Unique string-style identifier",
"Affiliation URL": "Affiliation URL",
"Affiliation URL - Tooltip": "Unique string-style identifier",
"Signup URL": "Signup URL",
"Signup URL - Tooltip": "sign up url",
"Signin URL": "Signin URL",
"Signin URL - Tooltip": "sign in url",
"ID - Tooltip": "random string",
"Favicon - Tooltip": "Application icon"
},
"signup":
{
@ -115,24 +146,38 @@
"organization":
{
"Edit Organization": "Edit Organization",
"Website URL": "Website URL"
"Website URL": "Website URL",
"Website URL - Tooltip": "Unique string-style identifier"
},
"provider":
{
"App ID": "App ID",
"App ID - Tooltip": "Unique string-style identifier",
"Name": "Name",
"Display name": "Display name",
"Category": "Category",
"Category - Tooltip": "Unique string-style identifier",
"Type": "Type",
"Type - Tooltip": "Unique string-style identifier",
"Client ID": "Client ID",
"Client ID - Tooltip": "Unique string-style identifier",
"Client secret": "Client secret",
"Client secret - Tooltip": "Unique string-style identifier",
"Host": "Host",
"Host - Tooltip": "Unique string-style identifier",
"Port": "Port",
"Port - Tooltip": "Unique string-style identifier",
"Email Title": "Email Title",
"Email Title - Tooltip": "Unique string-style identifier",
"Email Content": "Email Content",
"Email Content - Tooltip": "Unique string-style identifier",
"Region ID": "Region ID",
"Sign Name": "Sign Name",
"Sign Name - Tooltip": "Unique string-style identifier",
"Template Code": "Template Code",
"Template Code - Tooltip": "Unique string-style identifier",
"Provider URL": "Provider URL",
"Provider URL - Tooltip": "Unique string-style identifier",
"Edit Provider": "Edit Provider"
},
"user":
@ -144,16 +189,23 @@
"Set password...": "Set password...",
"Modify password...": "Modify password...",
"Address": "Address",
"Address - Tooltip": "Unique string-style identifier",
"Affiliation": "Affiliation",
"Affiliation - Tooltip": "Unique string-style identifier",
"Modify affiliation": "Modify affiliation",
"Tag": "Tag",
"Tag - Tooltip": "Unique string-style identifier",
"Third-party logins": "Third-party logins",
"Third-party logins - Tooltip": "Use third-party apps to log in",
"Properties": "Properties",
"Link": "Link",
"Unlink": "Unlink",
"Is admin": "Is admin",
"Is admin - Tooltip": "Is the application administrator",
"Is global admin": "Is global admin",
"Is global admin - Tooltip": "Is the application global administrator",
"Is forbidden": "Is forbidden",
"Is forbidden - Tooltip": "Whether the account is disabled",
"Empty input!": "Empty input!",
"Two passwords you typed do not match.": "Two passwords you typed do not match.",
"Password Set": "Password Set",
@ -190,14 +242,19 @@
"application":
{
"Edit Application": "Edit Application",
"Enable password": "Enable password",
"Password ON": "Password ON",
"Password ON - Tooltip": "Whether to allow password login",
"Enable signup": "Enable signup",
"Enable signup - Tooltip": "Whether to allow users to sign up",
"Login page preview": "Login page preview",
"Test signup page..": "Test signup page..",
"Test signin page..": "Test signin page..",
"Test prompt page..": "Test prompt page..",
"Redirect URL": "Redirect URL",
"Redirect URLs": "Redirect URLs",
"Signup items": "Signup items"
"Redirect URLs - Tooltip": "List of redirect addresses after successful login",
"Signup items": "Signup items",
"Signup items - Tooltip": "Signup items that need to be filled in when users register"
},
"forget":
{

View File

@ -2,8 +2,13 @@
"general":
{
"Home": "主页",
"Home - Tooltip": "应用的首页",
"Organizations": "组织",
"Organizations - Tooltip": "Unique string-style identifier",
"Organization": "组织",
"Organization - Tooltip": "Unique string-style identifier",
"Providers": "提供商",
"Providers - Tooltip": "第三方登录需要配置的提供方",
"Users": "用户",
"User": "用户",
"Applications": "应用",
@ -15,23 +20,32 @@
"Delete": "删除",
"Up": "上移",
"Down": "下移",
"Organization": "组织",
"Created time": "创建时间",
"Name": "名称",
"Name - Tooltip": "唯一的、字符串式的ID",
"Display name": "显示名称",
"Display name - Tooltip": "可重复的、仅作展示用途的ID",
"Personal name": "姓名",
"Personal name - Tooltip": "个人姓名",
"Avatar": "头像",
"Avatar - Tooltip": "向其他人展示的头像",
"Default avatar": "默认头像",
"Default avatar - Tooltip": "默认头像",
"URL": "链接",
"URL - Tooltip": "可访问的在线地址",
"Preview": "预览",
"Preview - Tooltip": "预览",
"User type": "用户类型",
"User type - Tooltip": "具有不同权限的用户角色",
"Password type": "密码类型",
"Password type - Tooltip": "密码在数据库中存储的形式",
"Password salt": "密码Salt值",
"Password salt - Tooltip": "用于密码加密的随机参数",
"Password": "密码",
"Email": "电子邮箱",
"Phone": "手机号",
"Logo": "图标",
"Logo - Tooltip": "应用程序向外展示的图标",
"User containers": "用户容器",
"Users under all organizations": "所有组织里的用户",
"OAuth providers": "OAuth提供方",
@ -43,7 +57,21 @@
"Authorization code": "授权码",
"Access token": "访问令牌",
"Expires in": "有效期",
"Scope": "范围"
"Scope": "范围",
"Description": "Description",
"Description - Tooltip": "与此有关的描述信息",
"Token expire": "Token expire",
"Token expire - Tooltip": "签发的令牌的授权时间",
"Forget URL": "Forget URL",
"Forget URL - Tooltip": "Forget URL - Tooltip",
"Affiliation URL": "Affiliation URL",
"Affiliation URL - Tooltip": "Affiliation URL - Tooltip",
"Signup URL": "注册地址",
"Signup URL - Tooltip": "展示给用户的注册地址",
"Signin URL": "登录地址",
"Signin URL - Tooltip": "用户的登录地址",
"ID - Tooltip": "唯一的随机字符串",
"Favicon - Tooltip": "网站的图标"
},
"signup":
{