添加数据备份和快捷查询优化

This commit is contained in:
Codex
2026-06-12 02:50:15 +08:00
parent aab9da4f31
commit 839149c258
5 changed files with 149 additions and 5 deletions
+1 -1
View File
@@ -362,7 +362,7 @@ async function fetchJson(url) {
async function loadHealth() {
try {
const data = await fetchJson("/api/health");
healthText.textContent = `课程记录 ${data.records_count} 条;数据更新时间 ${fmtTime(data.classnotes.mtime)}`;
healthText.textContent = `数据更新时间 ${fmtTime(data.classnotes.mtime)}`;
} catch (error) {
healthText.textContent = `读取失败:${error.message}`;
}
+3 -1
View File
@@ -26,6 +26,8 @@
<h2>上课记录</h2>
<div class="quick-actions">
<button class="chip" data-query="今天上课记录" type="button">今天</button>
<button class="chip" data-query="昨天上课记录" type="button">昨天</button>
<button class="chip" data-query="前天上课记录" type="button">前天</button>
<button class="chip" data-query="上周末上课记录" type="button">上周末</button>
</div>
</div>
@@ -110,6 +112,6 @@
</section>
</div>
<script src="/static/app.js?v=20260611-weekend-shortcuts"></script>
<script src="/static/app.js?v=20260612-relative-shortcuts"></script>
</body>
</html>