Skip to content

Commit

Permalink
Hide buttons until logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
ndg63276 committed Nov 24, 2020
1 parent b8d9e25 commit 47c42ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function check_login() {
return device_list;
} else {
console.log("No access_token");
return false;
return {"success": false};
}
}

Expand Down Expand Up @@ -240,6 +240,8 @@ function on_login() {
login_div.classList.add("hidden");
var switches = document.getElementById("switches");
switches.classList.remove("hidden");
var buttons = document.getElementById("buttons");
buttons.classList.remove("hidden");
var loader_div = document.getElementById("loader");
loader_div.classList.add("hidden");
update_devices(user_info, false);
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<div id="loginfailed"></div>
</div>
<div class="loader" id="loader"></div>
<div class="hidden" id="buttons">
<div class="in-line-div">
<button onclick="checkTheme()" class="borderShadow">&#9681; Theme</button>
</div>
Expand All @@ -79,6 +80,7 @@
<div class="in-line-div">
<button onclick="logout()" class="ui-btn ui-icon-action ui-btn-icon-left ui-shadow ui-corner-all borderShadow">Logout</button>
</div>
</div>
</center>
<div class="" id="switches">
</div>
Expand Down

0 comments on commit 47c42ae

Please sign in to comment.