add habit leveling/XP system, explicit fail marking for missed habits, and scrollable habit tabs
- Habits and the account now accumulate XP and levels from check streaks, with streak/level-up celebration banners and push notifications. - The "yesterday missed" banner on /today now lets a habit be explicitly marked failed (not just checked done), backed by a new HabitLog.status column so completion-rate/streak calculations never count a failed day as done. - The habit management tabs scroll horizontally on narrow screens instead of wrapping to two lines, with a pure-CSS edge shadow indicating more content.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class LevelInfo(BaseModel):
|
||||
xp: int # 누적 경험치 (0 이상)
|
||||
level: int # 현재 레벨 (1부터 시작)
|
||||
xp_into_level: int # 현재 레벨 진입 후 쌓인 xp
|
||||
xp_for_next_level: int # 다음 레벨까지 필요한 xp
|
||||
progress_pct: float # 다음 레벨까지 진행률 (0~100)
|
||||
Reference in New Issue
Block a user