合并 dev-0.2 到 master: 修复打卡按钮点不动
Docker Build and Push / build-image (push) Successful in 4m9s

This commit is contained in:
jif2.zhang
2026-10-24 09:53:14 +08:00
+3 -1
View File
@@ -101,7 +101,9 @@ export default function MergedView({ date, onDateChange }) {
// ---------- 打卡 / 撤销 (乐观更新) ----------
async function doCheck(item) {
if (!item.canCheck || isFuture) return
// 只按"是否未来日期"拦截. 不能判 item.canCheck —— 该字段仅 /day 接口返回,
// 本视图数据来自 /habits (不含 canCheck), 用它会把所有打卡按钮全部禁用.
if (isFuture) return
const before = detail
setDetail((d) => ({
...d,