feat: add realtime challenge client and local smoke test
CI / test (pull_request) Successful in 2m53s
PR合并自动部署 / release-check (pull_request) Successful in 1m34s
PR合并自动部署 / deploy (pull_request) Successful in 12s

This commit is contained in:
2026-08-09 03:08:01 +08:00
parent 821311f4ad
commit 1dd828609e
9 changed files with 872 additions and 7 deletions
+15
View File
@@ -89,6 +89,20 @@
<div class="track-switch" id="track-switch">
<button class="active" data-track="standard">标准</button><button data-track="beginner">入门</button><button data-track="advanced">进阶</button>
</div>
<section class="challenge-panel">
<div>
<span class="kicker">FRIEND CHALLENGE</span>
<h2>联机码约战</h2>
<p>创建 6 位联机码发给朋友,或输入朋友的联机码加入同一场对局。</p>
</div>
<div class="challenge-actions">
<button id="challenge-create" class="primary-button">创建当前赛道约战</button>
<form id="challenge-join-form">
<input id="challenge-code-input" maxlength="6" autocomplete="off" placeholder="输入 6 位联机码" aria-label="联机码">
<button class="dark-button" type="submit">加入约战</button>
</form>
</div>
</section>
<div id="contest-list" class="content-grid loading">正在读取比赛…</div>
<section class="math-games-section">
<div class="section-heading">
@@ -305,6 +319,7 @@
<div class="csrf-token">{% csrf_token %}</div>
<script src="{% static 'js/toolbox.js' %}" defer></script>
<script src="{% static 'js/games.js' %}" defer></script>
<script src="{% static 'js/realtime.js' %}" defer></script>
<script src="{% static 'js/app.js' %}" defer></script>
</body>
</html>