Update auth page and scripts

This commit is contained in:
Fred Boniface 2023-04-11 20:20:47 +01:00
parent bec341c4d6
commit e466a54374
2 changed files with 15 additions and 0 deletions

View File

@ -24,6 +24,14 @@
</div> </div>
<!-- Main Content Begins --> <!-- Main Content Begins -->
<div id="top_button" class="hide_micro">
<a href="./">
<picture aria-label="Home" class="sidebar_control">
<source srcset="./images/nav/back.svg" type="image/svg+xml">
<img src="./images/nav/back-40.png" alt="Home">
</picture>
</a>
</div>
<picture> <picture>
<source srcset="./images/logo/wide_logo.svg" type="image/svg+xml"> <source srcset="./images/logo/wide_logo.svg" type="image/svg+xml">
<source media="(max-height: 739px)" srcset="./images/logo/logo-full-200.png" type="image/png"> <source media="(max-height: 739px)" srcset="./images/logo/logo-full-200.png" type="image/png">

View File

@ -49,6 +49,13 @@ async function checkAuth(key) {
async function init(){ // Reads registration key from query, and calls registerKey(key) async function init(){ // Reads registration key from query, and calls registerKey(key)
cmdOut("Reading authorisation code"); cmdOut("Reading authorisation code");
const key = await getQuery("key"); const key = await getQuery("key");
if (key === "false") {
cmdOut("No valid key found")
cmdOut("Try clicking the link again")
cmdOut("or request a new activation link")
hideLoading()
return
}
cmdOut("Requesting API Key from server"); cmdOut("Requesting API Key from server");
if (!await registerKey(key)) { if (!await registerKey(key)) {
cmdOut("Failed to register key") cmdOut("Failed to register key")