Add bottle size, bourbon list modal, and stat improvements

- Add bottle_size field to User model and UserResponse/UserUpdate schemas
- Settings modal includes bottle size input (shots capacity)
- Community bottles and My Bottle page show fill bar based on bottle size
- Community bottle cards are clickable — opens searchable bourbon list modal
- Add total_shots_added stat to replace duplicate net volume on dashboard
- Reorder dashboard stats: Bourbons Added, Total Poured In, Shots Remaining, Est. Proof
- Theme-matched custom scrollbar (amber on dark)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 21:53:50 -07:00
parent f1b82baebd
commit ca83351e9d
10 changed files with 108 additions and 23 deletions

View File

@@ -31,11 +31,15 @@ async def public_stats(db: AsyncSession = Depends(get_db)):
proof_shot_total = sum(e.amount_shots for e in adds if e.proof is not None)
estimated_proof = round(weighted_proof_sum / proof_shot_total, 1) if proof_shot_total > 0 else None
bourbons = sorted({e.bourbon_name for e in adds if e.bourbon_name}, key=str.casefold)
stats.append(PublicUserStats(
display_name=user.display_name or user.email.split("@")[0],
total_add_entries=len(adds),
current_total_shots=round(current_total, 2),
estimated_proof=estimated_proof,
bottle_size=user.bottle_size,
bourbons=bourbons,
))
return stats