-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (50 loc) · 1.72 KB
/
index.html
File metadata and controls
55 lines (50 loc) · 1.72 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Firebase onSnapshot 测试</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>Firebase onSnapshot 实时监听测试</h1>
<div class="section">
<h2>添加消息</h2>
<form id="messageForm">
<input type="text" id="messageInput" placeholder="输入消息内容" required>
<button type="submit">发送消息</button>
</form>
</div>
<div class="section">
<h2>实时消息列表</h2>
<div id="messagesList">
<p class="loading">加载中...</p>
</div>
</div>
<div class="section">
<h2>连接状态</h2>
<div id="status" class="status">
<span class="status-indicator"></span>
<span id="statusText">正在连接...</span>
</div>
</div>
</div>
<!-- 导航到其他测试页面 -->
<div class="navigation">
<h3>其他测试页面</h3>
<div class="nav-links">
<a href="database-comparison.html" class="nav-link">
📊 数据库对比测试
<span class="nav-desc">Firestore vs Realtime Database 性能对比</span>
</a>
<a href="server-test.html" class="nav-link">
🚀 服务器端测试
<span class="nav-desc">Cloud Functions 延迟测试</span>
</a>
</div>
</div>
<!-- Firebase SDK -->
<script type="module" src="app.js"></script>
</body>
</html>