Error Messages are now printed in chat instead of below the chat.

main
Luna 2021-07-28 09:26:54 -07:00
parent 4db3d71f68
commit f3b2ca64ff
3 changed files with 1 additions and 7 deletions

View File

@ -63,8 +63,4 @@ button {
#loggeduser { #loggeduser {
padding-top: 2% padding-top: 2%
}
#errormessage {
padding-top: 2.5%;
} }

View File

@ -31,8 +31,6 @@
<div id="loggeduser"></div> <div id="loggeduser"></div>
<button type="button" id="logoutbutton" onclick="logout()">Logout</button> <button type="button" id="logoutbutton" onclick="logout()">Logout</button>
<div id="errormessage"></div>
<script src="../js/chat.js"></script> <script src="../js/chat.js"></script>
<script src="../js/logout.js"></script> <script src="../js/logout.js"></script>

View File

@ -13,7 +13,7 @@ async function logout() {
}, },
body: JSON.stringify(sendLogoutInfo), body: JSON.stringify(sendLogoutInfo),
}); });
document.querySelector("#errormessage").innerHTML = 'Logged out.' printText('Logged out.')
document.getElementById("logoutbutton").style.display = "none"; document.getElementById("logoutbutton").style.display = "none";
localStorage.removeItem('username') localStorage.removeItem('username')
username = null; username = null;