mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Fix result page button link
This commit is contained in:
parent
e78d9e5d2b
commit
f3ea39d20c
@ -76,7 +76,6 @@
|
||||
"eslint-plugin-react": "^7.31.1",
|
||||
"husky": "^4.3.8",
|
||||
"lint-staged": "^13.0.3",
|
||||
"path-browserify": "^1.0.1",
|
||||
"stylelint": "^14.11.0",
|
||||
"stylelint-config-recommended-less": "^1.0.4",
|
||||
"stylelint-config-standard": "^28.0.0"
|
||||
|
@ -24,7 +24,6 @@ import {authConfig} from "./auth/Auth";
|
||||
import {Helmet} from "react-helmet";
|
||||
import * as Conf from "./Conf";
|
||||
import * as phoneNumber from "libphonenumber-js";
|
||||
import * as path from "path-browserify";
|
||||
|
||||
const {Option} = Select;
|
||||
|
||||
@ -888,7 +887,7 @@ export function getLoginLink(application) {
|
||||
} else if (authConfig.appName === application.name) {
|
||||
url = "/login";
|
||||
} else if (application.signinUrl === "") {
|
||||
url = path.join(application.homepageUrl, "/login");
|
||||
url = trim(application.homepageUrl, "/") + "/login";
|
||||
} else {
|
||||
url = application.signinUrl;
|
||||
}
|
||||
@ -902,10 +901,11 @@ export function renderLoginLink(application, text) {
|
||||
|
||||
export function redirectToLoginPage(application, history) {
|
||||
const loginLink = getLoginLink(application);
|
||||
if (loginLink.indexOf("http") === 0 || loginLink.indexOf("https") === 0) {
|
||||
window.location.replace(loginLink);
|
||||
if (loginLink.startsWith("http://") || loginLink.startsWith("https://")) {
|
||||
goToLink(loginLink);
|
||||
} else {
|
||||
history.push(loginLink);
|
||||
}
|
||||
history.push(loginLink);
|
||||
}
|
||||
|
||||
function renderLink(url, text, onClick) {
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
import React from "react";
|
||||
import {Button, Result} from "antd";
|
||||
import {Button, Result, Spin} from "antd";
|
||||
import i18next from "i18next";
|
||||
import {authConfig} from "./Auth";
|
||||
import * as ApplicationBackend from "../backend/ApplicationBackend";
|
||||
@ -53,6 +53,14 @@ class ResultPage extends React.Component {
|
||||
render() {
|
||||
const application = this.state.application;
|
||||
|
||||
if (application === null) {
|
||||
return (
|
||||
<div style={{display: "flex", justifyContent: "center", alignItems: "center"}}>
|
||||
<Spin size="large" tip={i18next.t("login:Loading")} style={{paddingTop: "10%"}} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
{
|
||||
|
@ -8795,11 +8795,6 @@ pascal-case@^3.1.2:
|
||||
no-case "^3.0.4"
|
||||
tslib "^2.0.3"
|
||||
|
||||
path-browserify@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd"
|
||||
integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==
|
||||
|
||||
path-exists@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
|
||||
|
Loading…
x
Reference in New Issue
Block a user