feat: Generali tab, time-based auto theme, AI cost from real data

- index.html: new Generali tab (first, active) with Language/Currency/
  Theme/Screensaver/ZeroWaste/Export; old tab-language removed;
  screensaver timeout select uses form-input style; asset v=20260518a
- app.js: auto theme = time-based (20:00-07:00 dark, not system pref);
  removed matchMedia listener; added 5min setInterval for auto re-check;
  removed Bring! token row from Info tab (internal implementation detail)
- api/index.php: gemini_usage - removed all cache-estimation code;
  month/year_stats from ai_usage.json only
- data/ai_usage.json: data-driven baseline estimate for 2026-05:
  ~4.4M in + ~1.3M out from 8374 inferred historical calls (102 recipes,
  555 price lookups, getStats loop pre-fix, smart cron runs, etc.)
  = ~EUR 1.32 at 2.5-flash rates; new calls tracked precisely from now
- translations: settings.tab_general added; theme.auto updated to
  'Automatico (orario)' / 'Automatic (time of day)' / 'Automatisch (Tageszeit)'
This commit is contained in:
dadaloop82
2026-05-18 07:07:47 +00:00
parent 56e68b72f8
commit c9a859463c
7 changed files with 143 additions and 180 deletions
+3 -2
View File
@@ -755,7 +755,7 @@
"label": "🌙 Design",
"off": "☀️ Hell",
"on": "🌙 Dunkel",
"auto": "🔄 Automatisch (System)"
"auto": "🔄 Automatisch (Tageszeit)"
},
"zerowaste": {
"card_title": "♻️ Zero-Waste-Tipps",
@@ -801,7 +801,8 @@
"year_label": "Jahr {year}",
"currency_title": "Währung",
"currency_hint": "Die Währung, die für alle Kosten und Preise in der App verwendet wird."
}
},
"tab_general": "Allgemein"
},
"expiry": {
"today": "HEUTE",
+3 -2
View File
@@ -755,7 +755,7 @@
"label": "🌙 Theme",
"off": "☀️ Light",
"on": "🌙 Dark",
"auto": "🔄 Auto (system)"
"auto": "🔄 Automatic (time of day)"
},
"zerowaste": {
"card_title": "♻️ Zero-waste tips",
@@ -801,7 +801,8 @@
"year_label": "Year {year}",
"currency_title": "Currency",
"currency_hint": "The currency used for all costs and prices in the app."
}
},
"tab_general": "General"
},
"expiry": {
"today": "TODAY",
+3 -2
View File
@@ -755,7 +755,7 @@
"label": "🌙 Tema",
"off": "☀️ Chiaro",
"on": "🌙 Scuro",
"auto": "🔄 Automatico (sistema)"
"auto": "🔄 Automatico (orario)"
},
"zerowaste": {
"card_title": "♻️ Suggerimenti zero-waste",
@@ -801,7 +801,8 @@
"year_label": "Anno {year}",
"currency_title": "Valuta",
"currency_hint": "La valuta usata per tutti i costi e i prezzi nell'app."
}
},
"tab_general": "Generali"
},
"expiry": {
"today": "OGGI",