Feature/#19 notifications tab title #31

Merged
kaffem merged 25 commits from feature/#19-notifications-tab-title into develop 2020-10-28 06:46:24 +01:00
Showing only changes of commit b65b0ce29c - Show all commits

View file

@ -1,5 +1,6 @@
var isShiftPressed = false; var isShiftPressed = false;
var isCtrlPressed = false; var isCtrlPressed = false;
var isLoggedIn = false;
function isHtmlElement(object) { function isHtmlElement(object) {
return object instanceof HTMLElement; return object instanceof HTMLElement;
@ -23,3 +24,19 @@ function handleKeyToggle(event, isPressed) {
isCtrlPressed = isPressed; isCtrlPressed = isPressed;
} }
} }
function retrieveLoginStatus() {
let menu = document.getElementById('materialize-menu-dropdown');
let menuItem = menu.innerText.split('\n')[4];
if (menuItem === 'Login') {
isLoggedIn = false;
console.log(isLoggedIn);
}
else if (menuItem.includes('User')) {
isLoggedIn = true;
console.log(isLoggedIn);
}
else {
console.error("Something went wrong, couldn't retrieve login status.");
}
}