You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/10/17 00:20:43 UTC

[incubator-ponymail-foal] branch master updated: Add a back button and remove title upon processing oauth

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 0ec571a  Add a back button and remove title upon processing oauth
0ec571a is described below

commit 0ec571a887b8798228b115e02db16979ee7f111c
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Oct 17 02:20:33 2021 +0200

    Add a back button and remove title upon processing oauth
    
    This fixes #81
---
 webui/js/oauth.js | 4 ++++
 webui/oauth.html  | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/webui/js/oauth.js b/webui/js/oauth.js
index 05fb668..584e95f 100644
--- a/webui/js/oauth.js
+++ b/webui/js/oauth.js
@@ -117,6 +117,10 @@ function oauthWelcome(args) {
     // query string arg.
     if (!args || args.length == 0) {
         args = window.location.hash.substring(1)
+    } else {
+        // Disable title and back button while logging in...
+        document.getElementById('oauth_title').style.display = "none";
+        document.getElementById('oauth_regrets').style.display = "none";
     }
     // Is this a callback from an oauth provider? If so, run the oauth stuff
     if (args && args.length >= 40) {
diff --git a/webui/oauth.html b/webui/oauth.html
index f1d98f5..f9fda10 100644
--- a/webui/oauth.html
+++ b/webui/oauth.html
@@ -40,12 +40,13 @@ the License. -->
       <div id="bread" class="col-md-12" style="text-align: center">
         <img src="images/logo.png" style="width: 320px;"/><br/>
         <p>
-          <h3>Log in using one of the following identity providers:</h3>
+          <h3 id="oauth_title">Log in using one of the following identity providers:</h3>
           <br/>
         </p>
         <p style="margin: 0 auto; font-size: 16pt; max-width: 640px;" id="oauthtypes">
           
         </p>
+        <a id="oauth_regrets" href="javascript:void(window.history.back())">Nevermind, take me back to the previous page</a>
       </div>
       
       </div>