pis #2
@ -26,9 +26,9 @@
|
||||
<!-- 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 id="home_icon">
|
||||
<source srcset="./images/nav/home_icon.svg" type="image/svg+xml">
|
||||
<img src="./images/nav/home_icon-40.png" alt="Home">
|
||||
</picture>
|
||||
</a>
|
||||
</div>
|
||||
|
14
js/auth.js
14
js/auth.js
@ -6,11 +6,12 @@ Auth process: User Requests Key => Server emails key to user =>
|
||||
auth.js adds this to localStorage
|
||||
*/
|
||||
const cmd = document.getElementById("cmd") // Assign element to const
|
||||
versionDisplay(); // Show web version in footer
|
||||
init(); // Run init function
|
||||
|
||||
async function sendHome(){
|
||||
await delay(2000);
|
||||
location.replace('/')
|
||||
location.replace('./')
|
||||
}
|
||||
|
||||
async function cmdOut(message) {
|
||||
@ -51,27 +52,28 @@ async function init(){ // Reads registration key from query, and calls registerK
|
||||
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")
|
||||
cmdOut("Try clicking the link again or request a new activation link")
|
||||
hideLoading()
|
||||
return
|
||||
}
|
||||
cmdOut("Requesting API Key from server");
|
||||
if (!await registerKey(key)) {
|
||||
cmdOut("Failed to register key")
|
||||
cmdOut("Failed to register or invalid key")
|
||||
cmdOut("Try again later or request a new link")
|
||||
hideLoading()
|
||||
return
|
||||
}
|
||||
showLoading()
|
||||
if (! await checkAuth(localStorage.getItem("uuid"))) {
|
||||
cmdOut("Authentication Check failed")
|
||||
cmdOut("Please try again")
|
||||
cmdOut("Please logout and request a new link")
|
||||
hideLoading()
|
||||
await delay(2000)
|
||||
location.replace("./")
|
||||
}
|
||||
hideLoading();
|
||||
cmdOut("Authentication succesful")
|
||||
await delay(2000)
|
||||
cmdOut("Redirecting to home")
|
||||
await delay(3000)
|
||||
location.replace("./")
|
||||
}
|
@ -76,13 +76,6 @@
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
#home_icon {
|
||||
position: absolute;
|
||||
width: 30px;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.header-small {
|
||||
text-align: right;
|
||||
padding-right: 5px;
|
||||
|
@ -106,6 +106,12 @@ body {
|
||||
}
|
||||
body a {color:var(--link-color)}
|
||||
body a:visited {color:var(--link-visited-color)}
|
||||
#home_icon {
|
||||
position: absolute;
|
||||
width: 30px;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
.titleimg {
|
||||
width: 45%;
|
||||
padding-top: 20px;
|
||||
|
Reference in New Issue
Block a user