- 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.
10 lines
342 B
Python
10 lines
342 B
Python
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)
|