-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
189 lines (180 loc) · 7.28 KB
/
index.html
File metadata and controls
189 lines (180 loc) · 7.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="An app prototype for the hour-tracking project.">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="./manifest.json">
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
crossorigin="anonymous"
/>
<link
rel="stylesheet"
href="https://kit-pro.fontawesome.com/releases/v5.11.2/css/pro.min.css"
/>
<link rel="stylesheet" href="./css/index.css" />
<link rel="icon" type="image/png" href="./img/logo.png" />
<title>MeanScanner</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="pt-5">
<div class="card bg-dark">
<div class="card-body">
<h1 class="align-middle">
<img id="logo" src="./img/logo.svg" width="50px" alt="" /> MeanScanner
</h1>
<p>An app prototype for the hour-tracking project.</p>
<ul class="nav nav-pills mb-3 w-100 nav-justified" id="pills-tab" role="tablist">
<li class="nav-item" role="presentation">
<a
class="nav-link active"
id="pills-oauth-tab"
data-toggle="pill"
href="#pills-oauth"
role="tab"
aria-controls="pills-oauth"
aria-selected="true"
><i class="fas fa-sign-in"></i> Login</a
>
</li>
<li class="nav-item" role="presentation">
<a
class="nav-link disabled"
id="pills-sheet-tab"
data-toggle="pill"
href="#pills-sheet"
role="tab"
aria-controls="pills-sheet"
aria-selected="false"
><i class="fas fa-table"></i> Sheet</a
>
</li>
</ul>
</div>
</div>
<hr />
<div class="tab-content" id="pills-tabContent">
<div
class="tab-pane fade show active"
id="pills-oauth"
role="tabpanel"
aria-labelledby="pills-oauth-tab"
>
<div class="card bg-dark" id="oauth-card">
<div class="card-body">
<p id="oauth-desc">
Make sure to authorize a Google account that has access to the shared drive to
be able to log your hours to the Google Tracking Sheet
</p>
<button id="authorize-button" class="btn btn-danger" hidden>
<i class="fas fa-user"></i> Authorize
</button>
<button id="deauthorize-button" class="btn btn-secondary" hidden>
<i class="fas fa-user"></i> Deauthorize
</button>
</div>
</div>
<br>
<div class="card bg-dark" id="login-card" hidden>
<div class="card-body">
<div id="login">
<p id="login-desc">Who are you? Log in with:</p>
<p>
<button onclick="scan()" class="btn btn-danger" id="scan">
<i class="fas fa-qrcode"></i> QR Code</button
> <button onclick="stop()" class="btn btn-secondary" id="stop" disabled>
<i class="fas fa-stop"></i> Stop</button
><br /><br />
<canvas id="canvas" hidden></canvas>
<!-- <p>- or -</p> -->
<!-- <p><button onclick="login()" class="btn btn-danger">Log in</button></p> -->
</p>
<input id="username" hidden />
<p id="denied-text">
<!-- - ACCESS DENIED - -->
</p>
</div>
</div>
</div>
</div>
<div
class="tab-pane fade"
id="pills-sheet"
role="tabpanel"
aria-labelledby="pills-sheet-tab"
>
<div class="card bg-dark">
<div class="card-body">
<!-- <p>Data from sheet, click Read sheet</p> -->
<button onclick="entryIn()" class="btn btn-secondary">
<i class="fas fa-sign-in-alt"></i> Sign in
</button>
<button onclick="entryOut()" class="btn btn-secondary">
<i class="fas fa-sign-out-alt"></i> Sign out
</button>
<button onclick="list()" class="btn btn-secondary">
<i class="fas fa-table"></i> List
</button>
<table class="table table-dark table-striped table-sm mt-3">
<thead>
<tr>
<th scope="col">Member</th>
<th scope="col">Status</th>
<th scope="col">Hours Today</th>
</tr>
</thead>
<tbody id="content"></tbody>
</table>
<div id="main">
<p id="granted-text">- ACCESS GRANTED -</p>
<p>Welcome, <span id="name-text"></span>!</p>
<p><button onclick="logout()">Log out</button></p>
<p><span id="hours-text"></span> hours total</p>
<p>
You have been checked <span id="checked-text"></span> for
<span id="time-text"></span> min
</p>
<p>
<button id="toggle-check" disabled>
Check <span id="toggle-check-text"></span> (coming soon™)
</button>
</p>
<p>History</p>
<ul id="history-list"></ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
crossorigin="anonymous"
></script>
<script src="./js/jsQR.js"></script>
<script src="./js/QRScanner.js"></script>
<script src="./js/LogManager.js"></script>
<script
async
defer
src="https://apis.google.com/js/api.js"
onload="this.onload=function(){}; auth()"
onreadystatechange="if (this.readyState === 'complete') this.onload()"
></script>
<script defer src="./js/index.js"></script>
</body>
</html>