Misc changes and fixes.

main
Luna 2021-07-21 19:55:20 -07:00
parent 54fab32116
commit 213a7e565d
7 changed files with 67 additions and 12 deletions

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

55
favicon.svg Normal file
View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 31.75 31.75"
version="1.1"
id="svg5"
inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
sodipodi:docname="favicon.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="3.4731066"
inkscape:cx="53.698323"
inkscape:cy="76.732456"
inkscape:window-width="1900"
inkscape:window-height="986"
inkscape:window-x="10"
inkscape:window-y="10"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<circle
style="fill:none;fill-opacity:1;stroke:#f7a8b8;stroke-width:3.71222;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path846"
cx="15.874998"
cy="15.874998"
r="14.018888" />
<ellipse
style="fill:#f7a8b8;fill-opacity:1;stroke:none;stroke-width:1.85611;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="circle1164"
cx="15.875"
cy="15.875"
rx="7.0094452"
ry="7.0094447" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<link rel="icon" href="">
<link rel="icon" href="/favicon.svg">
</head>
<body>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<link rel="icon" href="">
<link rel="icon" href="/favicon.svg">
</head>
<body>
@ -25,7 +25,7 @@
<input type="number" id="pin" name="pin" required><br><br>
<label for="newuname">New Username:</label><br>
<input type="number" id="newuname" name="newuname"><br>
<input type="text" id="newuname" name="newuname"><br>
<label for="newpin">New Pin:</label><br>
<input type="number" id="newpin" name="newpin"><br><br>

View File

@ -35,7 +35,7 @@ form.addEventListener("submit", async function(event) {
try {
const userNotFound = await getUname();
if (userNotFound !== `User ${uname}`) {
if (userNotFound.status == `fail`) {
document.querySelector("#incorrect").innerHTML = `user ${uname} was not found`
} else {
loginChange()
@ -47,8 +47,8 @@ form.addEventListener("submit", async function(event) {
async function getUname() {
let response = await fetch(`/api/users/${uname}`);
responseText = await response.text();
return responseText;
responseJson = await response.json();
return responseJson;
}
async function loginChange() {
@ -59,5 +59,5 @@ const rawResponse = await fetch(`/api/users/change/${uname}/${pin}/${newUname}/$
body: ""
});
document.querySelector("#incorrect").innerHTML = 'Login Changed!'
window.location.replace("http://127.0.0.1:5500/login.html")
window.location.replace("/login.html")
}

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<link rel="icon" href="">
<link rel="icon" href="/favicon.svg">
</head>
<h1>Register:</h1>

View File

@ -49,6 +49,6 @@ const rawResponse = await fetch(`/api/register/${uname.toString().toLowerCase()}
body: ""
});
document.querySelector("#taken").innerHTML = 'Registered!'
window.location.replace("http://127.0.0.1:5500/login.html")
window.location.replace("/login.html")
}