From ec91ded5aa1262bbe3de9bc95a6356c6319a6706 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Wed, 9 Jun 2021 20:38:46 +0800 Subject: [PATCH] Remove header for some pages. --- web/src/App.js | 17 ++++++++++------- web/src/auth/Util.js | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/web/src/App.js b/web/src/App.js index cf6f0e7d..152c196f 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -370,14 +370,8 @@ class App extends Component { - this.renderHomeIfLoggedIn()}/> - this.renderHomeIfLoggedIn()}/> this.renderHomeIfLoggedIn()}/> this.renderHomeIfLoggedIn()}/> - this.renderHomeIfLoggedIn()}/> - - this.renderHomeIfLoggedIn()}/> - this.renderHomeIfLoggedIn()}/> this.renderLoginIfNotLoggedIn()}/> this.renderLoginIfNotLoggedIn()}/> this.renderLoginIfNotLoggedIn()}/> @@ -414,14 +408,23 @@ class App extends Component { } isDoorPages() { - return window.location.pathname.startsWith("/login/oauth/authorize"); + return window.location.pathname.startsWith("/signup") || + window.location.pathname.startsWith("/login") || + window.location.pathname.startsWith("/callback") || + window.location.pathname.startsWith("/forget"); } renderPage() { if (this.isDoorPages()) { return ( + this.renderHomeIfLoggedIn()}/> + this.renderHomeIfLoggedIn()}/> + this.renderHomeIfLoggedIn()}/> }/> + + this.renderHomeIfLoggedIn()}/> + this.renderHomeIfLoggedIn()}/> ) } diff --git a/web/src/auth/Util.js b/web/src/auth/Util.js index 57922dc5..00dce63d 100644 --- a/web/src/auth/Util.js +++ b/web/src/auth/Util.js @@ -52,7 +52,7 @@ export function renderMessageLarge(ths, msg) {
Setting.goToLinkSoft(ths, "/")}>