mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-26 10:55:09 +01:00
Show OAuth errors
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<style>
|
||||
* { font-family: Arial, Helvetica, sans-serif; }
|
||||
body { padding-left: 10px; padding-right: 10px; }
|
||||
.error { color: red; font-weight: bold; }
|
||||
.button-large { width: 120px; height: 30px; font-weight: bold; }
|
||||
</style>
|
||||
<script>
|
||||
@@ -20,6 +21,17 @@
|
||||
function load() {
|
||||
document.getElementById('oauth').addEventListener('click', oauth);
|
||||
document.getElementById('year').textContent= new Date().getFullYear();
|
||||
|
||||
try {
|
||||
var url = new URL(window.location.href);
|
||||
var error = url.searchParams.get('error');
|
||||
if (error) {
|
||||
document.getElementById('error').innerText = error;
|
||||
document.getElementById('error').style.display = 'block';
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
function oauth() {
|
||||
@@ -31,6 +43,7 @@
|
||||
<h1>FairEmail</h1>
|
||||
<p><img src="https://raw.githubusercontent.com/M66B/FairEmail/master/app/src/main/ic_launcher-web.png" alt="FairEmail" height="72" width="72" /></p>
|
||||
<h2>🛡 OAuth</h2>
|
||||
<p id="error" class="error" style="display: none;"></p>
|
||||
<p><button id="oauth" class="button-large">Continue</button> to the app</p>
|
||||
<noscript><h2>Please enable JavaScript or disable your ad blocker</h2></noscript>
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user