Finish implementing login

- Templated main page to show user and profile image
- Added logout
- Handle user rejecting Twitch authorization flow
This commit is contained in:
Dessa Simpson 2020-07-05 14:15:30 -07:00
parent df68c990fc
commit e8d7d6362b
5 changed files with 41 additions and 1 deletions

View file

@ -1,28 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link rel=stylesheet href=style.css />
<title>Learn Request Queue</title>
<script src="main.js" defer></script>
</head>
<body>
<div id="topbar">
<div id="logo">Learn Request Queue</div>
<div id="nav-requests"><a href="/">Requests</a></div>
<div id="nav-login"><a href="https://id.twitch.tv/oauth2/authorize?client_id=di37tc1dr9rhvmpvzgn8rkmi7bdhkk&redirect_uri=https://localhost/callback&response_type=code">Login</a></div>
</div>
<div id="main">
<div id="requests"></div><br>
Count:
<select id="count" value="10" onchange="updateTable()">
<option>5</option>
<option selected="selected">10</option>
<option>25</option>
<option>50</option>
<option>100</option>
</select>
<input type="checkbox" id="allRequests" onchange="updateTable()">View requests in any state</input>
</div>
</body>
</html>

View file

@ -46,6 +46,18 @@ div#nav-login {
margin-left: auto;
}
div#nav-userpic {
margin-left: auto;
margin-right: -5px;
height: 2.5em;
}
#nav-userpic img {
height: 80%;
margin-top: 0.25em;
margin-bottom: 0.25em;
}
#main {
margin: 0.5em;
padding: 0.5em;