-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (48 loc) · 1.67 KB
/
index.html
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
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>裝置借用狀態</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
<div id="loginSection">
<h2>登入</h2>
<input type="email" id="emailInput" placeholder="帳號">
<input type="password" id="passwordInput" placeholder="密碼">
<button onclick="login()">登入</button>
</div>
<div id="appSection" style="display: none;">
<h1>裝置借用狀態</h1>
<div id="currentUserDisplay"></div>
<button id="historyButton" onclick="showHistory()">查看借閱歷史</button>
<button onclick="logout()">登出</button>
<table id="deviceTable">
<tr>
<th>裝置名稱</th>
<th>借出狀態</th>
<th>借閱人</th>
<th>時間</th>
<th>物品備註</th>
<th>操作</th>
</tr>
</table>
</div>
<div id="historySection" style="display: none;">
<h2>借閱歷史記錄</h2>
<button onclick="showApp()">返回主頁</button>
<table id="historyTable">
<tr>
<th>設備ID</th>
<th>借用者</th>
<th>借出時間</th>
<th>歸還時間</th>
</tr>
</table>
</div>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-database.js"></script>
<script src="app.js"></script>
</body>
</html>