grammar status: new(未学)/learning(犯错)/known; overview + chips + prompts updated

This commit is contained in:
Lang
2026-10-15 01:10:36 +08:00
parent ea2eebf04c
commit d3a2b9948f
6 changed files with 15 additions and 10 deletions
+4 -3
View File
@@ -178,13 +178,14 @@ def overview(conn: sqlite3.Connection) -> dict:
return c
g = conn.execute(
"SELECT SUM(status='learning') l, SUM(status='known') k, COUNT(*) t FROM grammar_fixes"
).fetchone()
"SELECT SUM(status='new') n, SUM(status='learning') l, SUM(status='known') k,"
" COUNT(*) t FROM grammar_fixes").fetchone()
return {
"word": counts("kind='word'"),
"phrase": counts("kind='phrase'"),
"expression": counts("kind='expression'"),
"grammar": {"learning": g["l"] or 0, "known": g["k"] or 0, "total": g["t"] or 0},
"grammar": {"new": g["n"] or 0, "learning": g["l"] or 0,
"known": g["k"] or 0, "total": g["t"] or 0},
}