5f510c0451
- Add get_shopping_price / get_all_shopping_prices API endpoints - AI (Gemini) estimates retail price per natural unit (pack, piece, bunch) instead of always per-kg — avoids absurd totals like €1609 - _calcEstimatedTotal: proper g/ml→package conversion using defQty + regex on unit_label; only 'kg'/'l' labels trigger weight/volume math - Cache key bumped to v2 to invalidate old per-kg cached entries - Suggested quantity cap lowered from 20 to 10 conf/pz - Unit mismatch guard: if totalUsed >> buyCount*5 for unit=conf, use purchase frequency instead of raw consumption rate - JS _buildPricePayload: use smartShoppingItems for qty/unit (not Bring! spec) - JS _cachedPrices: persist in sessionStorage (survives navigation); validated by _qty/_unit metadata so stale totals auto-invalidate - Price display redesigned: right-side column per row (price-col-main + price-col-unit) instead of small inline badge - fetchAllPrices: buttons disabled immediately before guard check; running total uses only current shoppingItems (not Object.values cache) - Background refresh: always silent (removed 90s interaction condition) - visibilitychange: sets _bgCall=true for shopping before refreshCurrentPage - .gitignore: add runtime data files (bring_migrate_ts, shopping_price_cache, anomaly_dismissed, opened_shelf_cache, shopping_name_cache) - Remove bring_catalog.json and bring_migrate_ts.json from tracking
52 lines
1012 B
Plaintext
52 lines
1012 B
Plaintext
# Environment variables (secrets — copy .env.example to .env)
|
|
.env
|
|
|
|
# Data directory (user-specific runtime data)
|
|
data/evershelf.db
|
|
data/dispensa.db
|
|
data/*.db-wal
|
|
data/*.db-shm
|
|
data/backups/
|
|
data/cron.log
|
|
data/smart_shopping_cache.json
|
|
data/bring_token.json
|
|
data/bring_catalog.json
|
|
data/bring_migrate_ts.json
|
|
data/shopping_price_cache.json
|
|
data/anomaly_dismissed.json
|
|
data/opened_shelf_cache.json
|
|
data/shopping_name_cache.json
|
|
data/client_debug.log
|
|
data/rate_limits/
|
|
|
|
# SSL certificates (local only)
|
|
data/*.crt
|
|
data/*.pem
|
|
*.crt
|
|
*.pem
|
|
|
|
# OS files
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# Editor / IDE
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
.idea/
|
|
.vscode/
|
|
|
|
# Raw screenshots (working folder, not for distribution)
|
|
/screenshots/
|
|
|
|
# Android kiosk build artifacts (generated by Gradle — not source)
|
|
evershelf-kiosk/.gradle/
|
|
evershelf-kiosk/app/build/
|
|
evershelf-kiosk/build/
|
|
evershelf-scale-gateway/app/build/
|
|
evershelf-scale-gateway/build/
|
|
evershelf-kiosk/local.properties
|
|
data/error_reports.log
|
|
data/latest_release_cache.json
|
|
data/food_facts_cache.json
|