From 73ffb22c32ecb0569f57c56b0bbf953aafb5ea12 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Sun, 28 Mar 2021 19:15:10 +0800 Subject: [PATCH] Improve login page. --- object/init.go | 1 - web/src/ApplicationListPage.js | 2 +- web/src/auth/LoginPage.js | 17 +++++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/object/init.go b/object/init.go index 8452c92d..ca3c7db1 100644 --- a/object/init.go +++ b/object/init.go @@ -45,7 +45,6 @@ func initBuiltInUser() { Tag: "staff", IsAdmin: true, IsGlobalAdmin: true, - Github: "", } AddUser(user) } diff --git a/web/src/ApplicationListPage.js b/web/src/ApplicationListPage.js index 06fbe725..68083545 100644 --- a/web/src/ApplicationListPage.js +++ b/web/src/ApplicationListPage.js @@ -53,7 +53,7 @@ class ApplicationListPage extends React.Component { enablePassword: true, enableSignUp: true, providers: [], - redirectUris: [], + redirectUris: ["http://localhost:9000/callback"], expireInHours: 24 * 7, } } diff --git a/web/src/auth/LoginPage.js b/web/src/auth/LoginPage.js index 81d34b75..377a8308 100644 --- a/web/src/auth/LoginPage.js +++ b/web/src/auth/LoginPage.js @@ -197,7 +197,7 @@ class LoginPage extends React.Component { } else { return (
-
+
Please click to login  {application.displayName} @@ -209,11 +209,24 @@ class LoginPage extends React.Component { application.providerObjs.map(provider => { return ( - {provider.displayName} + {provider.displayName} ); }) } + { + !application.enableSignUp ? null : ( +
+
+
+ No account yet?  + + sign up now + +
+
+ ) + }
) }