feat: multi-user support, goals editing, shared food library
Multi-user: - Madiha account with per-user nav visibility - Dashboard greeting uses actual user display name - Navbar and MobileTabBar accept visibleApps prop - Madiha sees: Dashboard, Trips, Fitness, Budget, Media (no Inventory, Reader) Goals editing: - Goals page now has Edit Goals mode with inline number inputs - Saves via PUT /api/fitness/goals - Shows "No goals set" state for new users Food library: - Default view shows all shared foods (not just user's recent) - Both users see the same food database - Cleaned up duplicates: archived Eggs (kept Egg), Green Grapes (kept Grapes), duplicate Bellwether Yogurt, Latte Macchiato (kept Madiha's Caramel Latte) Add to meal buttons: - "Add to breakfast/lunch/dinner/snack" now focuses the resolve input and sets the meal type so AI logs to the correct meal
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
try {
|
||||
const url = query
|
||||
? `/api/fitness/foods/search?q=${encodeURIComponent(query)}&limit=30`
|
||||
: `/api/fitness/foods/recent?limit=30`;
|
||||
: `/api/fitness/foods?limit=100`;
|
||||
const res = await fetch(url, { credentials: 'include' });
|
||||
if (res.ok) {
|
||||
const raw = await res.json();
|
||||
@@ -959,7 +959,7 @@
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
<button class="add-food-btn">
|
||||
<button class="add-food-btn" onclick={() => { resolveMeal = meal; const input = document.querySelector('.resolve-input') as HTMLInputElement; if (input) { input.focus(); input.placeholder = `Add to ${meal}...`; } }}>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
||||
Add to {meal}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user