mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Improve jump links.
This commit is contained in:
@ -262,6 +262,12 @@ export function goToLogin(ths, application) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!application.enablePassword && window.location.pathname.includes("/signup/oauth/authorize")) {
|
||||||
|
const link = window.location.href.replace("/signup/oauth/authorize", "/login/oauth/authorize");
|
||||||
|
goToLink(link);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (authConfig.appName === application.name) {
|
if (authConfig.appName === application.name) {
|
||||||
goToLinkSoft(ths, "/login");
|
goToLinkSoft(ths, "/login");
|
||||||
} else {
|
} else {
|
||||||
@ -278,6 +284,12 @@ export function goToSignup(ths, application) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!application.enablePassword && window.location.pathname.includes("/login/oauth/authorize")) {
|
||||||
|
const link = window.location.href.replace("/login/oauth/authorize", "/signup/oauth/authorize");
|
||||||
|
goToLink(link);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (authConfig.appName === application.name) {
|
if (authConfig.appName === application.name) {
|
||||||
goToLinkSoft(ths, "/signup");
|
goToLinkSoft(ths, "/signup");
|
||||||
} else {
|
} else {
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {Alert, Button, message, Result} from "antd";
|
import {Alert, Button, message, Result} from "antd";
|
||||||
import * as Setting from "../Setting";
|
|
||||||
|
|
||||||
export function showMessage(type, text) {
|
export function showMessage(type, text) {
|
||||||
if (type === "success") {
|
if (type === "success") {
|
||||||
@ -55,12 +54,17 @@ export function renderMessageLarge(ths, msg) {
|
|||||||
title="There was a problem signing you in.."
|
title="There was a problem signing you in.."
|
||||||
subTitle={msg}
|
subTitle={msg}
|
||||||
extra={[
|
extra={[
|
||||||
<Button key="home" onClick={() => Setting.goToLinkSoft(ths, "/")}>
|
<Button type="primary" key="back" onClick={() => {
|
||||||
Home
|
window.history.go(-2);
|
||||||
</Button>,
|
}}>
|
||||||
<Button type="primary" key="signup" onClick={() => Setting.goToLinkSoft(ths, "/signup")}>
|
Back
|
||||||
Sign Up
|
|
||||||
</Button>,
|
</Button>,
|
||||||
|
// <Button key="home" onClick={() => Setting.goToLinkSoft(ths, "/")}>
|
||||||
|
// Home
|
||||||
|
// </Button>,
|
||||||
|
// <Button type="primary" key="signup" onClick={() => Setting.goToLinkSoft(ths, "/signup")}>
|
||||||
|
// Sign Up
|
||||||
|
// </Button>,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
</Result>
|
</Result>
|
||||||
|
Reference in New Issue
Block a user