fix: login / signin frontend router (#1244)

* fix: go to link

* fix: remove gotologin

* fix: redirect to login page

* fix: redirect to login page

* remove comments

* fix: formats

* fix: formats

* Update Setting.js

Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
Chell
2022-10-27 20:23:57 +02:00
committed by GitHub
parent 80bf29d79a
commit 7e5952c804
6 changed files with 44 additions and 44 deletions

View File

@ -13,7 +13,6 @@
// limitations under the License.
import React from "react";
import {Link} from "react-router-dom";
import {Button, Checkbox, Col, Form, Input, Result, Row, Spin, Tabs} from "antd";
import {LockOutlined, UserOutlined} from "@ant-design/icons";
import * as UserWebauthnBackend from "../backend/UserWebauthnBackend";
@ -302,13 +301,11 @@ class LoginPage extends React.Component {
title="Sign Up Error"
subTitle={"The application does not allow to sign up new account"}
extra={[
<Link key="login" onClick={() => {
Setting.goToLogin(this, application);
}}>
<Button type="primary" key="signin">
Sign In
</Button>
</Link>,
<Button type="primary" key="signin" onClick={() => Setting.redirectToLoginPage(application)}>
{
i18next.t("login:Sign In")
}
</Button>,
]}
>
</Result>
@ -468,11 +465,9 @@ class LoginPage extends React.Component {
return (
<div style={{float: "right"}}>
{i18next.t("signup:Have account?")}&nbsp;
<Link onClick={() => {
Setting.goToLogin(this, application);
}}>
{i18next.t("signup:sign in now")}
</Link>
{
Setting.renderLoginLink(application, i18next.t("signup:sign in now"))
}
</div>
);
} else {