feat: fix some comma dangle

This commit is contained in:
qianxi0410 2022-08-07 00:17:27 +08:00
parent 9bca6bb72e
commit c428de6e42
23 changed files with 81 additions and 75 deletions

View File

@ -53,7 +53,13 @@
"space-infix-ops": "error", "space-infix-ops": "error",
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }], "key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
"comma-style": ["error", "last"], "comma-style": ["error", "last"],
"comma-dangle": ["error", "always-multiline"], "comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "never",
"exports": "never",
"functions": "never"
}],
"no-multi-spaces": ["error", { "ignoreEOLComments": true }], "no-multi-spaces": ["error", { "ignoreEOLComments": true }],

View File

@ -360,7 +360,7 @@ class App extends Component {
<Link to="/"> <Link to="/">
{i18next.t("general:Home")} {i18next.t("general:Home")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
if (Setting.isAdminUser(this.state.account)) { if (Setting.isAdminUser(this.state.account)) {
@ -369,49 +369,49 @@ class App extends Component {
<Link to="/organizations"> <Link to="/organizations">
{i18next.t("general:Organizations")} {i18next.t("general:Organizations")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/users"> <Menu.Item key="/users">
<Link to="/users"> <Link to="/users">
{i18next.t("general:Users")} {i18next.t("general:Users")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/roles"> <Menu.Item key="/roles">
<Link to="/roles"> <Link to="/roles">
{i18next.t("general:Roles")} {i18next.t("general:Roles")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/permissions"> <Menu.Item key="/permissions">
<Link to="/permissions"> <Link to="/permissions">
{i18next.t("general:Permissions")} {i18next.t("general:Permissions")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/models"> <Menu.Item key="/models">
<Link to="/models"> <Link to="/models">
{i18next.t("general:Models")} {i18next.t("general:Models")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/providers"> <Menu.Item key="/providers">
<Link to="/providers"> <Link to="/providers">
{i18next.t("general:Providers")} {i18next.t("general:Providers")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/applications"> <Menu.Item key="/applications">
<Link to="/applications"> <Link to="/applications">
{i18next.t("general:Applications")} {i18next.t("general:Applications")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
} }
@ -421,42 +421,42 @@ class App extends Component {
<Link to="/resources"> <Link to="/resources">
{i18next.t("general:Resources")} {i18next.t("general:Resources")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/tokens"> <Menu.Item key="/tokens">
<Link to="/tokens"> <Link to="/tokens">
{i18next.t("general:Tokens")} {i18next.t("general:Tokens")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/records"> <Menu.Item key="/records">
<Link to="/records"> <Link to="/records">
{i18next.t("general:Records")} {i18next.t("general:Records")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/webhooks"> <Menu.Item key="/webhooks">
<Link to="/webhooks"> <Link to="/webhooks">
{i18next.t("general:Webhooks")} {i18next.t("general:Webhooks")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/syncers"> <Menu.Item key="/syncers">
<Link to="/syncers"> <Link to="/syncers">
{i18next.t("general:Syncers")} {i18next.t("general:Syncers")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/certs"> <Menu.Item key="/certs">
<Link to="/certs"> <Link to="/certs">
{i18next.t("general:Certs")} {i18next.t("general:Certs")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
if (Conf.EnableExtraPages) { if (Conf.EnableExtraPages) {
@ -465,14 +465,14 @@ class App extends Component {
<Link to="/products"> <Link to="/products">
{i18next.t("general:Products")} {i18next.t("general:Products")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
res.push( res.push(
<Menu.Item key="/payments"> <Menu.Item key="/payments">
<Link to="/payments"> <Link to="/payments">
{i18next.t("general:Payments")} {i18next.t("general:Payments")}
</Link> </Link>
</Menu.Item>, </Menu.Item>
); );
} }
@ -481,7 +481,7 @@ class App extends Component {
<a target="_blank" rel="noreferrer" href={Setting.isLocalhost() ? `${Setting.ServerUrl}/swagger` : "/swagger"}> <a target="_blank" rel="noreferrer" href={Setting.isLocalhost() ? `${Setting.ServerUrl}/swagger` : "/swagger"}>
{i18next.t("general:Swagger")} {i18next.t("general:Swagger")}
</a> </a>
</Menu.Item>, </Menu.Item>
); );
} }

View File

@ -61,7 +61,7 @@ class ApplicationListPage extends BaseListPage {
ApplicationBackend.addApplication(newApplication) ApplicationBackend.addApplication(newApplication)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/applications/${newApplication.name}`, mode: "add"}); this.props.history.push({pathname: `/applications/${newApplication.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Application failed to add: ${error}`); Setting.showMessage("error", `Application failed to add: ${error}`);
@ -76,7 +76,7 @@ class ApplicationListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Application failed to delete: ${error}`); Setting.showMessage("error", `Application failed to delete: ${error}`);

View File

@ -44,7 +44,7 @@ class CertListPage extends BaseListPage {
CertBackend.addCert(newCert) CertBackend.addCert(newCert)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/certs/${newCert.name}`, mode: "add"}); this.props.history.push({pathname: `/certs/${newCert.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Cert failed to add: ${error}`); Setting.showMessage("error", `Cert failed to add: ${error}`);
@ -59,7 +59,7 @@ class CertListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Cert failed to delete: ${error}`); Setting.showMessage("error", `Cert failed to delete: ${error}`);

View File

@ -66,7 +66,7 @@ class LdapTable extends React.Component {
} else { } else {
Setting.showMessage("error", res.msg); Setting.showMessage("error", res.msg);
} }
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Add LDAP server failed: ${error}`); Setting.showMessage("error", `Add LDAP server failed: ${error}`);
@ -83,7 +83,7 @@ class LdapTable extends React.Component {
} else { } else {
Setting.showMessage("error", res.msg); Setting.showMessage("error", res.msg);
} }
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Delete LDAP server failed: ${error}`); Setting.showMessage("error", `Delete LDAP server failed: ${error}`);

View File

@ -39,7 +39,7 @@ class ModelListPage extends BaseListPage {
ModelBackend.addModel(newModel) ModelBackend.addModel(newModel)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/models/${newModel.owner}/${newModel.name}`, mode: "add"}); this.props.history.push({pathname: `/models/${newModel.owner}/${newModel.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Model failed to add: ${error}`); Setting.showMessage("error", `Model failed to add: ${error}`);
@ -54,7 +54,7 @@ class ModelListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Model failed to delete: ${error}`); Setting.showMessage("error", `Model failed to delete: ${error}`);

View File

@ -74,7 +74,7 @@ class OrganizationListPage extends BaseListPage {
OrganizationBackend.addOrganization(newOrganization) OrganizationBackend.addOrganization(newOrganization)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/organizations/${newOrganization.name}`, mode: "add"}); this.props.history.push({pathname: `/organizations/${newOrganization.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Organization failed to add: ${error}`); Setting.showMessage("error", `Organization failed to add: ${error}`);
@ -89,7 +89,7 @@ class OrganizationListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Organization failed to delete: ${error}`); Setting.showMessage("error", `Organization failed to delete: ${error}`);

View File

@ -52,7 +52,7 @@ class PaymentListPage extends BaseListPage {
PaymentBackend.addPayment(newPayment) PaymentBackend.addPayment(newPayment)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/payments/${newPayment.name}`, mode: "add"}); this.props.history.push({pathname: `/payments/${newPayment.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Payment failed to add: ${error}`); Setting.showMessage("error", `Payment failed to add: ${error}`);
@ -67,7 +67,7 @@ class PaymentListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Payment failed to delete: ${error}`); Setting.showMessage("error", `Payment failed to delete: ${error}`);

View File

@ -44,7 +44,7 @@ class PermissionListPage extends BaseListPage {
PermissionBackend.addPermission(newPermission) PermissionBackend.addPermission(newPermission)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/permissions/${newPermission.owner}/${newPermission.name}`, mode: "add"}); this.props.history.push({pathname: `/permissions/${newPermission.owner}/${newPermission.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Permission failed to add: ${error}`); Setting.showMessage("error", `Permission failed to add: ${error}`);
@ -59,7 +59,7 @@ class PermissionListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Permission failed to delete: ${error}`); Setting.showMessage("error", `Permission failed to delete: ${error}`);

View File

@ -46,7 +46,7 @@ class ProductListPage extends BaseListPage {
ProductBackend.addProduct(newProduct) ProductBackend.addProduct(newProduct)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/products/${newProduct.name}`, mode: "add"}); this.props.history.push({pathname: `/products/${newProduct.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Product failed to add: ${error}`); Setting.showMessage("error", `Product failed to add: ${error}`);
@ -61,7 +61,7 @@ class ProductListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Product failed to delete: ${error}`); Setting.showMessage("error", `Product failed to delete: ${error}`);

View File

@ -47,7 +47,7 @@ class ProviderListPage extends BaseListPage {
ProviderBackend.addProvider(newProvider) ProviderBackend.addProvider(newProvider)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/providers/${newProvider.name}`, mode: "add"}); this.props.history.push({pathname: `/providers/${newProvider.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Provider failed to add: ${error}`); Setting.showMessage("error", `Provider failed to add: ${error}`);
@ -62,7 +62,7 @@ class ProviderListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Provider failed to delete: ${error}`); Setting.showMessage("error", `Provider failed to delete: ${error}`);

View File

@ -48,7 +48,7 @@ class ResourceListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Resource failed to delete: ${error}`); Setting.showMessage("error", `Resource failed to delete: ${error}`);

View File

@ -40,7 +40,7 @@ class RoleListPage extends BaseListPage {
RoleBackend.addRole(newRole) RoleBackend.addRole(newRole)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/roles/${newRole.owner}/${newRole.name}`, mode: "add"}); this.props.history.push({pathname: `/roles/${newRole.owner}/${newRole.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Role failed to add: ${error}`); Setting.showMessage("error", `Role failed to add: ${error}`);
@ -55,7 +55,7 @@ class RoleListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Role failed to delete: ${error}`); Setting.showMessage("error", `Role failed to delete: ${error}`);

View File

@ -808,7 +808,7 @@ export function getTags(tags) {
res.push( res.push(
<Tag color={getTagColor(tag)}> <Tag color={getTagColor(tag)}>
{tag} {tag}
</Tag>, </Tag>
); );
}); });
return res; return res;

View File

@ -50,7 +50,7 @@ class SyncerListPage extends BaseListPage {
SyncerBackend.addSyncer(newSyncer) SyncerBackend.addSyncer(newSyncer)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/syncers/${newSyncer.name}`, mode: "add"}); this.props.history.push({pathname: `/syncers/${newSyncer.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Syncer failed to add: ${error}`); Setting.showMessage("error", `Syncer failed to add: ${error}`);
@ -65,7 +65,7 @@ class SyncerListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Syncer failed to delete: ${error}`); Setting.showMessage("error", `Syncer failed to delete: ${error}`);
@ -78,7 +78,7 @@ class SyncerListPage extends BaseListPage {
.then((res) => { .then((res) => {
this.setState({loading: false}); this.setState({loading: false});
Setting.showMessage("success", "Syncer sync users successfully"); Setting.showMessage("success", "Syncer sync users successfully");
}, }
) )
.catch(error => { .catch(error => {
this.setState({loading: false}); this.setState({loading: false});

View File

@ -43,7 +43,7 @@ class TokenListPage extends BaseListPage {
TokenBackend.addToken(newToken) TokenBackend.addToken(newToken)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/tokens/${newToken.name}`, mode: "add"}); this.props.history.push({pathname: `/tokens/${newToken.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Token failed to add: ${error}`); Setting.showMessage("error", `Token failed to add: ${error}`);
@ -58,7 +58,7 @@ class TokenListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Token failed to delete: ${error}`); Setting.showMessage("error", `Token failed to delete: ${error}`);

View File

@ -469,7 +469,7 @@ class UserEditPage extends React.Component {
<OAuthWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} account={this.props.account} onUnlinked={() => {return this.unlinked();}} /> <OAuthWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} account={this.props.account} onUnlinked={() => {return this.unlinked();}} />
) : ( ) : (
<SamlWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} onUnlinked={() => {return this.unlinked();}} /> <SamlWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} onUnlinked={() => {return this.unlinked();}} />
), )
) )
) )
} }

View File

@ -70,7 +70,7 @@ class UserListPage extends BaseListPage {
UserBackend.addUser(newUser) UserBackend.addUser(newUser)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/users/${newUser.owner}/${newUser.name}`, mode: "add"}); this.props.history.push({pathname: `/users/${newUser.owner}/${newUser.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `User failed to add: ${error}`); Setting.showMessage("error", `User failed to add: ${error}`);
@ -85,7 +85,7 @@ class UserListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `User failed to delete: ${error}`); Setting.showMessage("error", `User failed to delete: ${error}`);

View File

@ -43,7 +43,7 @@ class WebhookListPage extends BaseListPage {
WebhookBackend.addWebhook(newWebhook) WebhookBackend.addWebhook(newWebhook)
.then((res) => { .then((res) => {
this.props.history.push({pathname: `/webhooks/${newWebhook.name}`, mode: "add"}); this.props.history.push({pathname: `/webhooks/${newWebhook.name}`, mode: "add"});
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Webhook failed to add: ${error}`); Setting.showMessage("error", `Webhook failed to add: ${error}`);
@ -58,7 +58,7 @@ class WebhookListPage extends BaseListPage {
data: Setting.deleteRow(this.state.data, i), data: Setting.deleteRow(this.state.data, i),
pagination: {total: this.state.pagination.total - 1}, pagination: {total: this.state.pagination.total - 1},
}); });
}, }
) )
.catch(error => { .catch(error => {
Setting.showMessage("error", `Webhook failed to delete: ${error}`); Setting.showMessage("error", `Webhook failed to delete: ${error}`);

View File

@ -62,7 +62,7 @@ class ForgetPage extends React.Component {
} else { } else {
Util.showMessage( Util.showMessage(
"error", "error",
i18next.t("forget:Unknown forget type: ") + this.state.type, i18next.t("forget:Unknown forget type: ") + this.state.type
); );
} }
} }
@ -77,7 +77,7 @@ class ForgetPage extends React.Component {
this.setState({ this.setState({
application: application, application: application,
}); });
}, }
); );
} }
@ -182,7 +182,7 @@ class ForgetPage extends React.Component {
options.push( options.push(
<Option key={"phone"} value={"phone"}> <Option key={"phone"} value={"phone"}>
&nbsp;&nbsp;{this.state.phone} &nbsp;&nbsp;{this.state.phone}
</Option>, </Option>
); );
} }
@ -190,7 +190,7 @@ class ForgetPage extends React.Component {
options.push( options.push(
<Option key={"email"} value={"email"}> <Option key={"email"} value={"email"}>
&nbsp;&nbsp;{this.state.email} &nbsp;&nbsp;{this.state.email}
</Option>, </Option>
); );
} }
@ -222,7 +222,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"forget:Please input your application!", "forget:Please input your application!"
), ),
}, },
]} ]}
@ -234,7 +234,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"forget:Please input your organization!", "forget:Please input your organization!"
), ),
}, },
]} ]}
@ -245,7 +245,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"forget:Please input your username!", "forget:Please input your username!"
), ),
whitespace: true, whitespace: true,
}, },
@ -278,7 +278,7 @@ class ForgetPage extends React.Component {
this.onFinishFailed( this.onFinishFailed(
errorInfo.values, errorInfo.values,
errorInfo.errorFields, errorInfo.errorFields,
errorInfo.outOfDate, errorInfo.outOfDate
) )
} }
initialValues={{ initialValues={{
@ -295,7 +295,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"forget:Please input your application!", "forget:Please input your application!"
), ),
}, },
]} ]}
@ -307,7 +307,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"forget:Please input your organization!", "forget:Please input your organization!"
), ),
}, },
]} ]}
@ -343,7 +343,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"code:Please input your verification code!", "code:Please input your verification code!"
), ),
}, },
]} ]}
@ -382,7 +382,7 @@ class ForgetPage extends React.Component {
this.onFinishFailed( this.onFinishFailed(
errorInfo.values, errorInfo.values,
errorInfo.errorFields, errorInfo.errorFields,
errorInfo.outOfDate, errorInfo.outOfDate
) )
} }
initialValues={{ initialValues={{
@ -399,7 +399,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"forget:Please input your application!", "forget:Please input your application!"
), ),
}, },
]} ]}
@ -411,7 +411,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"forget:Please input your organization!", "forget:Please input your organization!"
), ),
}, },
]} ]}
@ -423,7 +423,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"forget:Please input your password!", "forget:Please input your password!"
), ),
}, },
]} ]}
@ -443,7 +443,7 @@ class ForgetPage extends React.Component {
{ {
required: true, required: true,
message: i18next.t( message: i18next.t(
"forget:Please confirm your password!", "forget:Please confirm your password!"
), ),
}, },
({getFieldValue}) => ({ ({getFieldValue}) => ({
@ -453,8 +453,8 @@ class ForgetPage extends React.Component {
} }
return Promise.reject( return Promise.reject(
i18next.t( i18next.t(
"forget:Your confirmed password is inconsistent with the password!", "forget:Your confirmed password is inconsistent with the password!"
), )
); );
}, },
}), }),

View File

@ -107,7 +107,7 @@ class LoginPage extends React.Component {
this.setState({ this.setState({
application: application, application: application,
}); });
}, }
); );
} }

View File

@ -26,7 +26,7 @@ ReactDOM.render(
<BrowserRouter> <BrowserRouter>
<App /> <App />
</BrowserRouter>, </BrowserRouter>,
document.getElementById("root"), document.getElementById("root")
); );
// If you want your app to work offline and load faster, you can change // If you want your app to work offline and load faster, you can change

View File

@ -30,8 +30,8 @@ const isLocalhost = Boolean(
window.location.hostname === "[::1]" || window.location.hostname === "[::1]" ||
// 127.0.0.0/8 are considered localhost for IPv4. // 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match( window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/, /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
), )
); );
export function register(config) { export function register(config) {
@ -57,7 +57,7 @@ export function register(config) {
navigator.serviceWorker.ready.then(() => { navigator.serviceWorker.ready.then(() => {
console.log( console.log(
"This web app is being served cache-first by a service " + "This web app is being served cache-first by a service " +
"worker. To learn more, visit https://bit.ly/CRA-PWA", "worker. To learn more, visit https://bit.ly/CRA-PWA"
); );
}); });
} else { } else {
@ -85,7 +85,7 @@ function registerValidSW(swUrl, config) {
// content until all client tabs are closed. // content until all client tabs are closed.
console.log( console.log(
"New content is available and will be used when all " + "New content is available and will be used when all " +
"tabs for this page are closed. See https://bit.ly/CRA-PWA.", "tabs for this page are closed. See https://bit.ly/CRA-PWA."
); );
// Execute callback // Execute callback
@ -137,7 +137,7 @@ function checkValidServiceWorker(swUrl, config) {
}) })
.catch(() => { .catch(() => {
console.log( console.log(
"No internet connection found. App is running in offline mode.", "No internet connection found. App is running in offline mode."
); );
}); });
} }