diff --git a/web/src/App.js b/web/src/App.js index b87a659d..d24e0830 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -62,7 +62,6 @@ import * as Conf from "./Conf"; import * as Auth from "./auth/Auth"; import EntryPage from "./EntryPage"; -import ResultPage from "./auth/ResultPage"; import * as AuthBackend from "./auth/AuthBackend"; import AuthCallback from "./auth/AuthCallback"; import LanguageSelect from "./common/select/LanguageSelect"; @@ -517,8 +516,6 @@ class App extends Component { renderRouter() { return ( - this.renderHomeIfLoggedIn()} /> - this.renderHomeIfLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> @@ -665,6 +662,7 @@ class App extends Component { window.location.pathname.startsWith("/login") || window.location.pathname.startsWith("/forget") || window.location.pathname.startsWith("/prompt") || + window.location.pathname.startsWith("/result") || window.location.pathname.startsWith("/cas") || window.location.pathname.startsWith("/auto-signup"); } diff --git a/web/src/EntryPage.js b/web/src/EntryPage.js index 0223e2f5..0b81fa4b 100644 --- a/web/src/EntryPage.js +++ b/web/src/EntryPage.js @@ -24,6 +24,7 @@ import LoginPage from "./auth/LoginPage"; import SelfForgetPage from "./auth/SelfForgetPage"; import ForgetPage from "./auth/ForgetPage"; import PromptPage from "./auth/PromptPage"; +import ResultPage from "./auth/ResultPage"; import CasLogout from "./auth/CasLogout"; import {authConfig} from "./auth/Auth"; @@ -54,10 +55,6 @@ class EntryPage extends React.Component { } } - getApplicationObj() { - return this.state.application || null; - } - render() { const onUpdateApplication = (application) => { this.setState({ @@ -84,6 +81,8 @@ class EntryPage extends React.Component { this.renderHomeIfLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> this.renderLoginIfNotLoggedIn()} /> + this.renderHomeIfLoggedIn()} /> + this.renderHomeIfLoggedIn()} /> this.renderHomeIfLoggedIn()} /> {return ();}} /> diff --git a/web/src/auth/ResultPage.js b/web/src/auth/ResultPage.js index 05a5bbb2..68959dd1 100644 --- a/web/src/auth/ResultPage.js +++ b/web/src/auth/ResultPage.js @@ -13,7 +13,7 @@ // limitations under the License. import React from "react"; -import {Button, Result, Spin} from "antd"; +import {Button, Card, Result, Spin} from "antd"; import i18next from "i18next"; import {authConfig} from "./Auth"; import * as ApplicationBackend from "../backend/ApplicationBackend"; @@ -44,12 +44,17 @@ class ResultPage extends React.Component { ApplicationBackend.getApplication("admin", this.state.applicationName) .then((application) => { + this.onUpdateApplication(application); this.setState({ application: application, }); }); } + onUpdateApplication(application) { + this.props.onUpdateApplication(application); + } + render() { const application = this.state.application; @@ -62,27 +67,37 @@ class ResultPage extends React.Component { } return ( -
- { - Setting.renderHelmet(application) - } - { - const linkInStorage = sessionStorage.getItem("signinUrl"); - if (linkInStorage !== null && linkInStorage !== "") { - Setting.goToLink(linkInStorage); - } else { - Setting.redirectToLoginPage(application, this.props.history); - } - }}> - {i18next.t("login:Sign In")} - , - ]} - /> +
+ +
+ { + Setting.renderHelmet(application) + } + { + Setting.renderLogo(application) + } + { + Setting.renderHelmet(application) + } + { + const linkInStorage = sessionStorage.getItem("signinUrl"); + if (linkInStorage !== null && linkInStorage !== "") { + Setting.goToLink(linkInStorage); + } else { + Setting.redirectToLoginPage(application, this.props.history); + } + }}> + {i18next.t("login:Sign In")} + , + ]} + /> +
+
); }