feat: shopping list pantry hints, barcode multi-API fallback (OPF/beauty/Gemini), README disclaimer

- Shopping list: each item now shows 'Hai già Xg in dispensa' for same-family inventory stock
  - Lazy-loads inventory once per shopping page visit (_getShoppingInventoryCache)
  - Matches by first significant token (same logic as related-stock on action page)
  - Green hint below item badges, dark-mode aware (.shopping-pantry-hint)
- Barcode lookup: added Open Products Facts + Open Beauty Facts as step 3;
  Gemini AI (_barcodeLookupGemini) as final step 4 fallback
- Added stockForName PHP endpoint (stock_for_name action) for future use
- Restored missing function signatures for _offFetchProduct() and saveProduct()
  that were accidentally lost when stockForName was added in a previous session
- Translation: added shopping.pantry_hint in it/en/de
This commit is contained in:
dadaloop82
2026-05-23 09:53:17 +00:00
parent 561c6e9809
commit 6a41b53174
6 changed files with 236 additions and 7 deletions
+11
View File
@@ -2567,6 +2567,17 @@ body.server-offline .bottom-nav {
color: var(--text-muted);
}
.shopping-pantry-hint {
font-size: 0.72rem;
color: #15803d;
font-weight: 500;
margin-top: 2px;
opacity: 0.85;
}
[data-theme="dark"] .shopping-pantry-hint {
color: #4ade80;
}
.shopping-item-right {
display: flex;
flex-direction: column;