Compare commits
123 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3d27433eb3 | |||
| eddb622c85 | |||
| 95c20adbbd | |||
| 6fa2e4d830 | |||
| 6ff1dfe0cc | |||
| 43e0ac9da3 | |||
| 1ce32cb5f0 | |||
| d75cde7eb6 | |||
| 43fe1c7bb5 | |||
| b2c87ae343 | |||
| fbdae35516 | |||
| d9ebc51e71 | |||
| 56ca58bc18 | |||
| b2e0f6d683 | |||
| ddb9bd9f75 | |||
| 965a672abe | |||
| 7249daa8eb | |||
| ec53f7529c | |||
| 1074dff87d | |||
| 3989d11094 | |||
| b010ced1a6 | |||
| cc0fa09219 | |||
| c0a076749e | |||
| 6a41b53174 | |||
| 1d04236bc0 | |||
| 561c6e9809 | |||
| 6857c20893 | |||
| 964de98203 | |||
| e28a6e4e39 | |||
| fd9e2471e0 | |||
| 3c8a9693b2 | |||
| b38bdc45f5 | |||
| 83a0df272a | |||
| 6320b575e0 | |||
| 8ccd218c5a | |||
| 5c1afaaaf5 | |||
| 6245b15420 | |||
| 02f673a164 | |||
| 61bb1b5552 | |||
| cbf4bd54da | |||
| 1cdbdb3b25 | |||
| 837d62c335 | |||
| fa36ba83bf | |||
| 1efeaf9236 | |||
| 573bcd1102 | |||
| 426cc9df7e | |||
| 6f2d6d9944 | |||
| d3eb82eee2 | |||
| 98426bf861 | |||
| 264b1f648e | |||
| b89df961a6 | |||
| 5e34bc90b3 | |||
| 3b100df26c | |||
| 2ecb3cbac6 | |||
| c2004fd0f8 | |||
| fba0947945 | |||
| 3a1f6cfd1e | |||
| 37fb522e8b | |||
| 66f5a03503 | |||
| a37d97dfcd | |||
| 47197d0d66 | |||
| 149621651d | |||
| b5a6daa557 | |||
| ccc2f8907d | |||
| 9e80915a61 | |||
| 7b60f1dbe3 | |||
| 7019160704 | |||
| ac8b5acc0c | |||
| 34df755ba3 | |||
| 87eac171bf | |||
| ef15f3536c | |||
| f77b3259ad | |||
| 5ad24ed73b | |||
| 84934c1908 | |||
| dd0625b253 | |||
| fa0442e2f6 | |||
| a85414d790 | |||
| c07439fea4 | |||
| 8f6934485a | |||
| d7aadff598 | |||
| d8aff8ac04 | |||
| 7364e75881 | |||
| ff25307662 | |||
| 4515ff7246 | |||
| 0f0acd0dfa | |||
| ba0c4c3d88 | |||
| a58ef241e9 | |||
| bd5d4bcac6 | |||
| c9a859463c | |||
| b3454062bf | |||
| 56e68b72f8 | |||
| b91203f151 | |||
| cc0d9763ed | |||
| d8c7d1545a | |||
| 9f554c6e22 | |||
| 4f715730ec | |||
| dc3cefefd0 | |||
| a2eaf695bb | |||
| db2e32322b | |||
| 36821bde7a | |||
| 9d49609e4b | |||
| de897cc0f9 | |||
| 30f4bf4a1b | |||
| 1379cfc388 | |||
| 2806cb0903 | |||
| 56b6eb5f0d | |||
| 83d1868309 | |||
| 788d4fe848 | |||
| 91616b3a6d | |||
| 844fe3ba1e | |||
| da4aa5a1ae | |||
| 9541e3a385 | |||
| 47ce849311 | |||
| ea2dae2be9 | |||
| 8360f5a0a0 | |||
| f5b1913ffa | |||
| d26dce283d | |||
| e67e490162 | |||
| 92048c9eba | |||
| ce504d5d41 | |||
| a690d2e7cf | |||
| e858b3cc85 | |||
| 78f499205c |
@@ -89,11 +89,73 @@ PRICE_CURRENCY=EUR
|
||||
# PRICE_UPDATE_MONTHS: how many months to cache a price before re-fetching (default 3)
|
||||
PRICE_UPDATE_MONTHS=3
|
||||
|
||||
# ── Cleanup / retention ──────────────────────────────────────────────────────
|
||||
# RECIPE_RETENTION_DAYS: delete auto-generated recipe plans older than N days
|
||||
RECIPE_RETENTION_DAYS=7
|
||||
# TRANSACTION_RETENTION_DAYS: keep stock transaction history for N days.
|
||||
# Smart Shopping uses this history to compute purchase frequencies.
|
||||
# WARNING: values below 30 will cause the shopping list to appear nearly empty.
|
||||
# Minimum enforced at runtime: 30 days.
|
||||
TRANSACTION_RETENTION_DAYS=90
|
||||
|
||||
# ── Local Backup ─────────────────────────────────────────────────────────────
|
||||
# BACKUP_ENABLED: run a daily incremental backup via cron (true/false)
|
||||
BACKUP_ENABLED=true
|
||||
# BACKUP_RETENTION_DAYS: keep local backups for N days (minimum 1)
|
||||
BACKUP_RETENTION_DAYS=3
|
||||
|
||||
# ── Google Drive Backup ───────────────────────────────────────────────────────
|
||||
# GDRIVE_ENABLED: upload the daily backup to Google Drive (requires a service account)
|
||||
GDRIVE_ENABLED=false
|
||||
#
|
||||
# Setup steps:
|
||||
# 1. Create a Google Cloud project and enable the Drive API
|
||||
# 2. Create a Service Account and download the JSON key
|
||||
# 3. Create a Drive folder and share it with the service account email
|
||||
# 4. Paste the JSON content below (or set GDRIVE_SERVICE_ACCOUNT_FILE to the path)
|
||||
# 5. Set GDRIVE_FOLDER_ID to the Drive folder ID (from its URL)
|
||||
#
|
||||
# GDRIVE_SERVICE_ACCOUNT_JSON: full JSON content of the service account key
|
||||
GDRIVE_SERVICE_ACCOUNT_JSON=
|
||||
# GDRIVE_SERVICE_ACCOUNT_FILE: alternative — path to the service account JSON file
|
||||
GDRIVE_SERVICE_ACCOUNT_FILE=
|
||||
# GDRIVE_FOLDER_ID: ID of the Drive folder where backups will be stored
|
||||
GDRIVE_FOLDER_ID=
|
||||
# GDRIVE_RETENTION_DAYS: delete Drive backups older than N days (0 = keep all)
|
||||
GDRIVE_RETENTION_DAYS=30
|
||||
|
||||
# ── Security ─────────────────────────────────────────────────────────────────
|
||||
# SETTINGS_TOKEN: if set, the Settings screen requires this token to save changes.
|
||||
# Leave empty to allow anyone with access to the server to change settings.
|
||||
SETTINGS_TOKEN=
|
||||
|
||||
# INSTANCE_NAME: display name for this EverShelf instance (used by the HA integration
|
||||
# for Zeroconf discovery label and device name in Home Assistant).
|
||||
# Defaults to the server hostname if left empty.
|
||||
INSTANCE_NAME=
|
||||
|
||||
# ── Home Assistant Integration ────────────────────────────────────────────────
|
||||
# All HA settings can also be configured from the Settings → 🏠 tab.
|
||||
#
|
||||
# HA_ENABLED: master switch for all HA features (webhooks, TTS, sensors)
|
||||
HA_ENABLED=false
|
||||
# HA_URL: base URL of your HA instance — no trailing slash
|
||||
# Examples: http://homeassistant.local:8123 or http://192.168.1.50:8123
|
||||
HA_URL=
|
||||
# HA_TOKEN: Long-Lived Access Token (HA Profile → Security → Long-Lived Access Tokens)
|
||||
HA_TOKEN=
|
||||
# HA_TTS_ENTITY: media_player entity for recipe step TTS (e.g. media_player.living_room)
|
||||
HA_TTS_ENTITY=
|
||||
# HA_WEBHOOK_ID: ID of an HA automation's Webhook trigger
|
||||
HA_WEBHOOK_ID=
|
||||
# HA_WEBHOOK_EVENTS: comma-separated events to fire webhooks for
|
||||
# Available: expiry, shopping_add, stock_update, barcode_scan
|
||||
HA_WEBHOOK_EVENTS=expiry,shopping_add,stock_update
|
||||
# HA_NOTIFY_SERVICE: HA notify service for push alerts (e.g. notify.mobile_app_my_phone)
|
||||
HA_NOTIFY_SERVICE=
|
||||
# HA_EXPIRY_DAYS: days before expiry to trigger expiry alert (default 3)
|
||||
HA_EXPIRY_DAYS=3
|
||||
|
||||
# ── Developer / demo ─────────────────────────────────────────────────────────
|
||||
# DEMO_MODE: when true, all write operations are blocked (for public demos)
|
||||
DEMO_MODE=false
|
||||
|
||||
@@ -102,7 +102,9 @@ jobs:
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Always use the built-in GITHUB_TOKEN for checkout (read-only fetch).
|
||||
# WORKFLOW_PAT is only needed for the push step below.
|
||||
token: ${{ github.token }}
|
||||
|
||||
- name: Configure git bot identity
|
||||
run: |
|
||||
@@ -111,6 +113,15 @@ jobs:
|
||||
|
||||
- name: Merge develop → main
|
||||
run: |
|
||||
# ── ROOT CAUSE FIX ──────────────────────────────────────────────────
|
||||
# actions/checkout writes an http.extraheader (AUTHORIZATION: basic …)
|
||||
# that silently overrides any credentials embedded in git remote URLs.
|
||||
# We must clear it BEFORE setting the remote URL with WORKFLOW_PAT,
|
||||
# otherwise GITHUB_TOKEN is always used for the push and workflow-file
|
||||
# changes are rejected.
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
git config --local --unset-all http."https://github.com/".extraheader 2>/dev/null || true
|
||||
|
||||
LAST=$(git log --oneline -1 origin/develop)
|
||||
git checkout main
|
||||
git pull --ff-only origin main
|
||||
@@ -118,6 +129,26 @@ jobs:
|
||||
-m "chore: auto-merge develop → main
|
||||
|
||||
Triggered by: $LAST"
|
||||
|
||||
# ── PUSH STRATEGY ───────────────────────────────────────────────────
|
||||
# Priority 1: WORKFLOW_PAT (classic PAT, repo+workflow scopes)
|
||||
# → can push workflow file changes; set as a repo secret.
|
||||
# Priority 2: GITHUB_TOKEN fallback
|
||||
# → cannot push workflow files; strip them from the merge commit.
|
||||
# ────────────────────────────────────────────────────────────────────
|
||||
PUSH_TOKEN="${{ secrets.WORKFLOW_PAT }}"
|
||||
if [ -z "$PUSH_TOKEN" ]; then
|
||||
WF=$(git diff --name-only origin/main -- .github/workflows/ 2>/dev/null || echo "")
|
||||
if [ -n "$WF" ]; then
|
||||
echo "::warning::WORKFLOW_PAT not set — stripping workflow changes from merge commit:"
|
||||
echo "$WF"
|
||||
git checkout origin/main -- .github/workflows/
|
||||
git diff --cached --quiet || git commit --amend --no-edit
|
||||
fi
|
||||
PUSH_TOKEN="${{ github.token }}"
|
||||
fi
|
||||
|
||||
git remote set-url origin "https://x-access-token:${PUSH_TOKEN}@github.com/${{ github.repository }}.git"
|
||||
git push origin main
|
||||
|
||||
# ── Auto-create GitHub Release on main ───────────────────────────────────
|
||||
|
||||
@@ -51,3 +51,4 @@ data/latest_release_cache.json
|
||||
data/food_facts_cache.json
|
||||
data/category_ai_cache.json
|
||||
assets/img/logo/*_backup.*
|
||||
logs/*.log
|
||||
|
||||
@@ -11,6 +11,78 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- **Recipe scraps tips** — During cooking steps, detect "waste" generated (peels, cores, bones, eggshells, coffee grounds, citrus zest, etc.) and surface AI-powered tips on how to reuse them (compost, natural cleaner, broth, candied peel, etc.). Could be shown as an optional collapsible hint card below the step that generates the scrap.
|
||||
|
||||
## [1.7.25] - 2026-05-25
|
||||
|
||||
### Added
|
||||
- **Home Assistant integration** — Full bidirectional HA support: inventory sensor (`sensor.evershelf_*`) exposes item counts, expiring items, shopping total, opened items and next-expiry info. Webhooks fire on inventory changes (add/use/shopping). Daily cron alert notifies via HA for items expiring within the configured threshold. TTS announces cooking steps through HA Media Player. New Settings tab 🏠 with connection test, TTS preset (Piper, Google, Nabu Casa), webhook config, and YAML snippet for `configuration.yaml`. Resolves [#111](https://github.com/dadaloop82/EverShelf/issues/111).
|
||||
- **Offline mode** — Full offline-first support. Full-screen overlay on network loss; "Continue offline" button after 3 s, auto-enter after 8 s. Inventory and settings are synced to `localStorage` at startup and cached on every successful API call. Writes (add/use/update/delete) are queued and synced on reconnect with optimistic UI updates. Pending operations survive page refresh and are re-synced automatically at next startup. AI/network-dependent sections (anti-waste chart, nutrition analysis, recipe generator, price fetching, Gemini chat) are hidden in offline mode. `remoteLog` and `reportError` are buffered offline and flushed on restore. Broken external images replaced with a grey placeholder.
|
||||
- **Offline-computed dashboard** — While offline, `inventory_summary` and `stats` (expiring/expired/opened) are derived client-side from the local cache so all dashboard stat cards and expiry alerts show accurate data.
|
||||
|
||||
### Fixed
|
||||
- **Offline banner flood** — Opened items in the offline `stats` response lacked `is_edible`; `!undefined` evaluated to `true`, causing every opened item to be shown as "not edible" in the dashboard banner. Field is now set to `true` (client-side shelf-life check already handles genuinely expired items).
|
||||
- **Version update badge showing older versions** — `_checkWebappUpdate` used `latestTag !== _loadedVersion` (inequality only), so running a newer dev build triggered an "update available" badge for an older GitHub release. Now uses `_semverGt(latest, current)` so only genuinely newer releases trigger the badge.
|
||||
- **Bring! items re-appearing after manual purchase removal** — `removeBringItem` and `confirmShoppingItemFound` now call `_markBringPurchased` immediately, and `autoAddCriticalItems` respects the blocklist for depleted items.
|
||||
- **Barcode lookup false "not found"** — New `_offFetchProduct()` tries three barcode candidates (given, UPC-A↔EAN-13 conversion) across two Open Food Facts locales with auto-retry.
|
||||
- **Partial throw from expired-items banner** — "Butta" now opens the throw modal (qty + location) instead of silently deleting the entire inventory row.
|
||||
- **Related stock display when scanning branded products** — When scanning a product, the action page now shows a green card listing any inventory items from the same generic family already at home.
|
||||
|
||||
## [1.7.24] - 2026-05-21
|
||||
|
||||
### Fixed
|
||||
- **Dark mode resets to Auto on every reload** — `dark_mode` was never saved to `.env` (missing from `saveSettings` and `getServerSettings`). It is now fully server-side like all other settings; `localStorage` retains only a pre-render hint for the flash-prevention IIFE.
|
||||
- **Cooking timer — no sound or speech on Android kiosk** — Three independent root causes fixed: (1) `AudioContext` was created fresh outside a user gesture, starting in `suspended` state and failing silently; a shared pre-unlocked context (`_sharedAudioCtx`) is now created during user gestures (`startCookingMode`, `addCookingTimer`). (2) The `_cookingTTS` gate (for step narration) was incorrectly blocking timer alarm speech — timer alerts now always speak regardless of that flag. (3) `_kioskBridge.speak()` (native Android TTS) was never considered as a fallback when `window.speechSynthesis` is absent in the WebView.
|
||||
- **Scale use ignored for conf products** — `_scaleAutoFillUse()` returned early when `_activeUnit !== 'sub'`, but conf products default to `conf` mode. The function now auto-switches to sub mode before processing the weight reading. Scale button (`btnUse`) is also now visible for conf products that have a g/ml package unit.
|
||||
- **Kiosk — native settings button reappearing unexpectedly** — `closeModal()` was calling `setNativeSettingsVisible(true)`, restoring the native Android settings button after every modal close. `_injectKioskOverlay()` now permanently hides the native button; scattered per-modal show/hide calls removed; a ⚙️ web button opens the in-app settings page.
|
||||
- **SQLite database locked during inventory update** — `updateInventory()` made 3–4 separate write statements without a transaction; a concurrent cron job could acquire the write lock between them, causing a `database is locked` PDO error. All writes are now wrapped in `beginTransaction()`/`commit()`, with the Bring! HTTP sync deferred to after `commit()`. Closes [#109](https://github.com/dadaloop82/EverShelf/issues/109), [#110](https://github.com/dadaloop82/EverShelf/issues/110).
|
||||
- **Depleted-item urgency incorrect** — Items with zero quantity were assigned urgency based on recency of use rather than consumption frequency. Urgency is now computed from `usesPerMonth` only, so frequently-used depleted items are correctly flagged as urgent.
|
||||
- **0.5 conf use and decimal display** — Default mode on the use-quantity page is now conf for conf products; fraction buttons (½, ¼, ¾) work correctly; conf decimals are shown in the transaction history log.
|
||||
- **Bring! health check token warning** — Token validity warning was shown even for valid tokens; health check is now restored with correct token-format detection.
|
||||
- **Recipe quantities for conf+weight products** — Quantities are now calculated correctly when a conf product has a gram-based package unit.
|
||||
- **Shopping settings not syncing across clients** — `shopping_*` keys were missing from `serverKeys` in `_applySyncedSettings`; shopping settings were client-local. All shopping keys now sync from server on load.
|
||||
|
||||
### Added
|
||||
- **Native shopping list** — Built-in shopping list (no Bring! required) as an alternative mode (`SHOPPING_MODE=internal`). Resolves [#105](https://github.com/dadaloop82/EverShelf/issues/105).
|
||||
- **Google Drive backup via localhost OAuth** — GDrive backup no longer requires a public domain; the OAuth redirect flow uses `http://localhost` via a temporary local server, compatible with self-hosted setups. Resolves [#107](https://github.com/dadaloop82/EverShelf/issues/107).
|
||||
|
||||
### Changed
|
||||
- **All settings fully server-centralised** — Removed remaining `localStorage` usage for user preferences; all settings are now read from and written to `.env` via the API. Preferences are shared across all devices (desktop, phone, kiosk) automatically.
|
||||
|
||||
## [1.7.23] - 2026-05-18
|
||||
|
||||
### Added
|
||||
- **⚙️ Generali tab** — new first tab in Settings groups all global settings: language, currency, theme, screensaver, zero-waste tips, inventory export. Old Language tab removed.
|
||||
- **DB auto-cleanup** — `RECIPE_RETENTION_DAYS` (default 7) and `TRANSACTION_RETENTION_DAYS` (default 7) added to `.env`; old rows are deleted automatically every cron cycle, followed by `VACUUM` to compact the database. Manual trigger: `GET /api/?action=db_cleanup`.
|
||||
- **Vacuum-sealed expiry grace period** — `VACUUM_EXPIRY_EXTENSION_DAYS` (default 30): vacuum-sealed products are only flagged as expired N days *after* the printed date, preventing false alarms on long-lasting items like cured meats.
|
||||
- **Gemini AI usage tracking** — monthly and yearly token/cost stats now shown in Settings → ℹ️ Info tab, using tracked data from `data/ai_usage.json`. Cost rates configurable via `GEMINI_COST_25F_IN/OUT` and `GEMINI_COST_20F_IN/OUT` in `.env`.
|
||||
|
||||
### Changed
|
||||
- **Auto theme is now time-based** — "Automatico" mode switches to dark at 20:00 and back to light at 07:00, based on server/device clock (not OS preference). Re-evaluates every 5 minutes; ideal for always-on kiosk displays.
|
||||
- **`dispensa.db` auto-deleted** — if the legacy empty `dispensa.db` file appears alongside `evershelf.db`, it is now removed automatically by the health check.
|
||||
- **ZeroWaste tips and screensaver timeout** — these settings were not being persisted to `.env` on save (missing from POST payload); fixed.
|
||||
|
||||
## [1.7.22] - 2026-05-17
|
||||
|
||||
### Fixed
|
||||
- **DB name corrected** — `health_check` now looks for `evershelf.db` (was wrongly looking for `dispensa.db`). Auto-migration included: if `evershelf.db` is missing but `dispensa.db` exists, it is renamed automatically on startup.
|
||||
- **Removed legacy `data/dispensa.db`** — the old database file has been deleted; only `evershelf.db` is used.
|
||||
- **Conditional checks** — Bring!, TTS, Scale and Internet checks only run when the respective feature is enabled in `.env` (no more false ❌/⚠️ for unconfigured features).
|
||||
- **Backups check** — no longer checks if `data/backups/` is writable by www-data (cron writes as root). Now checks that backup files actually exist and the most recent one is recent.
|
||||
- **Bring! token check** — reads `data/bring_token.json` file instead of looking for a non-existent `BRING_ACCESS_TOKEN` env var.
|
||||
|
||||
### Changed
|
||||
- **Warning popup with 5s countdown** — when non-critical checks fail at startup, a styled popup appears showing each warning with its label and a plain-language hint explaining the problem. A countdown bar auto-closes the popup after 5 seconds, then the app starts normally.
|
||||
- **Error blocking popup** — when critical checks fail, a clear blocking panel shows with title "Errore critico", each failed check listed with its explanation hint, and a Retry button. The app does not start.
|
||||
- **`db_legacy` check added** — warns (optional) if the old `dispensa.db` file is still present alongside `evershelf.db`.
|
||||
- **32 total checks** — added `db_legacy`, `tts_url`, `scale_gateway` to the check set (conditional).
|
||||
- **Hint messages** — every check now has an Italian-language `hint` field explaining what is wrong and how to fix it.
|
||||
|
||||
## [1.7.21] - 2026-05-20
|
||||
|
||||
### Changed
|
||||
- **Startup health check** — Complete redesign from a banner checklist to a **real-time progress bar**. The bar fills smoothly as each of 29 diagnostic checks runs, with the current check name shown below in real time. Warnings (⚠️) are displayed as amber badges that remain visible for 2 seconds before the app proceeds. Critical failures turn the bar red and show a detailed error block with a Retry button.
|
||||
- **29 comprehensive checks**: PHP version, 8 PHP extensions (pdo_sqlite, curl, json, mbstring, openssl, fileinfo, zip, intl), PHP memory/timeout/upload config, data directory, rate_limits dir, backups dir, disk write test, free disk space, SQLite connection, required tables, integrity (PRAGMA quick_check), WAL mode, DB size, inventory row count, .env file, Gemini AI key, Bring! credentials, Bring! token, cURL SSL, internet reachability.
|
||||
- Warnings now clearly visible: each non-critical failure shows as a named amber badge (e.g. "⚠️ Bring! token") that cannot be missed.
|
||||
|
||||
## [1.7.20] - 2026-05-20
|
||||
|
||||
### Added
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
[](https://www.sqlite.org/)
|
||||
[](Dockerfile)
|
||||
[](translations/)
|
||||
[](CHANGELOG.md)
|
||||
[](CHANGELOG.md)
|
||||
[](https://github.com/dadaloop82/EverShelf/stargazers)
|
||||
[](https://github.com/dadaloop82/EverShelf/commits/main)
|
||||
[](https://github.com/dadaloop82/EverShelf/graphs/contributors)
|
||||
@@ -36,12 +36,39 @@
|
||||
|
||||
---
|
||||
|
||||
> **⚠️ Name disambiguation:** There is an unrelated iOS app also called **EverShelf**, developed and published by [Joshumi Technologies LLC](https://evershelf.joshumi.com/) on the [Apple App Store](https://apps.apple.com/app/evershelf/id6759439940). That application is a **completely separate, independent product** with no affiliation, association, or collaboration with this open-source project. This repository has no connection to Joshumi Technologies LLC, its products, or its services.
|
||||
|
||||
---
|
||||
|
||||
## ✨ Features
|
||||
|
||||
> ♻️ **New in v1.7.19 — Zero-waste cooking tips**
|
||||
> During cooking, EverShelf shows a contextual ♻️ tip card for each step that generates reusable scraps — peels, cooking water, egg whites, cheese rinds, bread crusts and more.
|
||||
> Tips are generated by Gemini *as part of the recipe* at zero extra API cost, shown inline in cooking mode, and dismissible per step.
|
||||
> Enable the toggle in **Settings → Zero-waste tips** (default: off).
|
||||
### 🏠 NEW — Home Assistant Integration
|
||||
|
||||
EverShelf has a **native Home Assistant integration** available on HACS.
|
||||
Connect your pantry to your smart home in minutes — no YAML, no manual sensor setup.
|
||||
|
||||
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=dadaloop82&repository=ha-evershelf&category=integration)
|
||||
|
||||
[](https://my.home-assistant.io/redirect/config_flow_start/?domain=evershelf)
|
||||
|
||||
**What you get:**
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **16 sensors** | Expiry counts, stock levels by location (pantry / fridge / freezer), shopping list total, AI API usage, last backup timestamp, days to next expiry |
|
||||
| **6 binary sensors** | Expired items, expiring items, expiring today, shopping list active, backup overdue, Bring! connected |
|
||||
| **5 action buttons** | Refresh data, Refresh prices, **Suggest Recipe** (AI — result as HA notification), Sync smart shopping, Clear expired rows |
|
||||
| **Shopping list todo** | Bidirectional sync — add, remove, check off items directly from HA |
|
||||
| **Expiry calendar** | Every product's expiry date as a native HA calendar event — works with the calendar card and any calendar automation |
|
||||
| **Quick-add text entity** | Type a product name in HA to instantly add it to the shopping list (great for voice assistants / Assist) |
|
||||
| **6 services** | `add_to_shopping`, `mark_used`, `refresh`, `suggest_recipe`, `refresh_prices`, `clear_expired` |
|
||||
| **Auto-discovery** | Detected automatically via Zeroconf/mDNS when `avahi-daemon` runs on the EverShelf host |
|
||||
| **5 languages** | English, Italian, German, French, Spanish |
|
||||
|
||||
> **Requires a self-hosted EverShelf instance.** The integration talks directly to your server — no cloud involved.
|
||||
> Full documentation: [ha-evershelf on GitHub](https://github.com/dadaloop82/ha-evershelf)
|
||||
|
||||
---
|
||||
|
||||
### 📦 Inventory Management
|
||||
- **Export inventory** — Download the full inventory as a UTF-8 CSV (Excel-compatible) or open a print-ready page to save as PDF; export button always visible in the inventory page header
|
||||
@@ -50,7 +77,7 @@
|
||||
- **Smart locations** — Track items across Pantry, Fridge, Freezer, and custom locations
|
||||
- **Expiry tracking** — Automatic shelf-life estimation based on product type and storage
|
||||
- **Opened product tracking** — Reduced shelf-life calculation when packages are opened; opened-product expiry is now also checked when building banner alerts (not just the dashboard section)
|
||||
- **Vacuum-sealed support** — Extended expiry dates for vacuum-sealed items
|
||||
- **Vacuum-sealed support** — Extended expiry dates for vacuum-sealed items; products sealed under vacuum are only flagged as expired after a configurable grace period past the printed date (`VACUUM_EXPIRY_EXTENSION_DAYS`, default 30 days, configurable in `.env`)
|
||||
- **Anomaly detection** — Banner alerts for suspicious quantities and consumption predictions with inline correction; dismiss button now shows the current inventory quantity so the action is unambiguous ("Quantity is correct (2 pcs)")
|
||||
|
||||
### 🤖 AI-Powered (Google Gemini)
|
||||
@@ -98,13 +125,28 @@
|
||||
- **Quick-access buttons** — Recently used and most popular products shown on the inventory page for fast access
|
||||
|
||||
### 🌙 Appearance
|
||||
- **Dark mode** — Three modes: Light, Dark, and Auto (follows the OS/browser setting); theme is applied before the first render to prevent a white flash on dark-mode systems; toggle in Settings → Appearance
|
||||
- **Dark mode** — Three modes: Light, Dark, and Auto (time-based: dark from 20:00 to 07:00, light otherwise); applies immediately without page reload; auto mode re-evaluates every 5 minutes, so night/day transitions happen automatically even on always-on kiosk displays; theme is applied before the first render to prevent a white flash
|
||||
- **Global settings tab** — A dedicated **⚙️ General** tab groups all system-wide settings (language, currency, theme, screensaver, zero-waste tips, export) at the top of the Settings panel
|
||||
|
||||
### 📱 Progressive Web App
|
||||
### �️ Database Maintenance
|
||||
- **Automatic cleanup** — Recipes older than `RECIPE_RETENTION_DAYS` (default 7) and transactions older than `TRANSACTION_RETENTION_DAYS` (default 7) are deleted automatically on every cron cycle; SQLite `VACUUM` runs after each cleanup to keep the file compact
|
||||
- **Manual cleanup** — Trigger immediately via `GET /api/?action=db_cleanup`
|
||||
- **Compact by default** — Fresh installs stay small; large accumulated databases shrink back to a few hundred KB within one cron cycle
|
||||
|
||||
### �📱 Progressive Web App
|
||||
- **Mobile-first design** — Optimized for phones, works on tablets and desktop
|
||||
- **Installable** — Add to home screen for a native app experience
|
||||
- **Multi-device** — All user data (shopping tags, pinned items, location preferences, scan history) is stored server-side in SQLite and shared across every device on the same instance; no data is siloed in a single browser's localStorage
|
||||
|
||||
### 📶 Offline Mode
|
||||
- **Automatic detection** — Full-screen overlay appears immediately on network loss; shows a "Continue offline" button after 3 s, and auto-enters offline mode after 8 s
|
||||
- **Local inventory cache** — Inventory is synced to `localStorage` at every startup and on each successful API call; the offline view always reflects the last known state
|
||||
- **Write queue** — Add, use, update and delete operations performed while offline are queued locally and synced to the server automatically on reconnect (including after a page refresh)
|
||||
- **Optimistic UI** — Queued writes are applied immediately to the local cache so the interface stays responsive
|
||||
- **Offline-computed stats** — Expiring and expired items are derived client-side from the cache; dashboard stat cards show real counts instead of zeros
|
||||
- **AI/network sections hidden** — Anti-waste chart, nutrition analysis, recipe generator, price fetching, and Gemini chat are hidden in offline mode; the inventory, history, and manually-managed shopping list remain fully functional
|
||||
- **Broken image fallback** — External product images (Open Food Facts, etc.) that fail to load are replaced with a neutral grey placeholder, keeping the layout intact
|
||||
- **Startup recovery** — If the page is refreshed while operations are queued, they are detected and synced automatically on the next successful startup
|
||||
- **Buffered error reporting** — `remoteLog` and `reportError` calls made while offline are stored locally and flushed to the server (and to GitHub issues) when the connection is restored
|
||||
### ⚖️ Smart Scale Integration (Add-on)
|
||||
- **Bluetooth gateway** — Connects a BLE smart scale to EverShelf via local WebSocket
|
||||
- **SSE relay** — Server-side relay avoids mixed-content (HTTPS→WS) issues
|
||||
@@ -192,12 +234,32 @@ TTS_URL=http://your-home-assistant:8123/api/events/tts_speak
|
||||
TTS_TOKEN=your_long_lived_token
|
||||
TTS_ENABLED=true
|
||||
|
||||
# Optional: DB retention and cleanup (applied automatically each cron cycle)
|
||||
RECIPE_RETENTION_DAYS=7 # delete recipe plans older than N days
|
||||
TRANSACTION_RETENTION_DAYS=7 # delete stock transactions older than N days
|
||||
|
||||
# Optional: Vacuum-sealed expiry grace period
|
||||
VACUUM_EXPIRY_EXTENSION_DAYS=30 # extra days before vacuum-sealed items are flagged expired
|
||||
|
||||
# Optional: Gemini cost rates (USD per million tokens, for the Info tab cost estimate)
|
||||
GEMINI_COST_25F_IN=0.15
|
||||
GEMINI_COST_25F_OUT=0.60
|
||||
GEMINI_COST_20F_IN=0.10
|
||||
GEMINI_COST_20F_OUT=0.40
|
||||
|
||||
# Optional: Security — protect the save_settings endpoint
|
||||
# Set a strong random string; the Settings UI will ask for it before saving
|
||||
SETTINGS_TOKEN=
|
||||
|
||||
# Optional: Demo mode — block all write operations at the router level
|
||||
DEMO_MODE=false
|
||||
|
||||
# Optional: Logging
|
||||
# LOG_LEVEL sets the minimum severity written to disk (DEBUG / INFO / WARN / ERROR)
|
||||
# DEBUG also logs every SQL query executed against the database
|
||||
LOG_LEVEL=INFO
|
||||
LOG_ROTATE_HOURS=24 # hours before opening a new log file (default: 24)
|
||||
LOG_MAX_FILES=14 # maximum number of rotated files to keep (default: 14)
|
||||
```
|
||||
|
||||
### Web Server Configuration
|
||||
@@ -269,6 +331,24 @@ The included `backup.sh` creates local daily backups of your database:
|
||||
0 3 * * * /path/to/evershelf/backup.sh
|
||||
```
|
||||
|
||||
### Google Drive Backup (Optional)
|
||||
|
||||
EverShelf supports automatic daily backups to Google Drive via OAuth 2.0. This works on any server, including private IP / local network setups (no public domain required).
|
||||
|
||||
**Setup:**
|
||||
|
||||
1. Go to [console.cloud.google.com](https://console.cloud.google.com) and select or create a project.
|
||||
2. Enable the **Google Drive API** (`APIs & Services → Enable APIs → Google Drive API`).
|
||||
3. Go to `APIs & Services → Credentials → Create Credentials → OAuth client ID`.
|
||||
4. Application type: **Web application**.
|
||||
5. Add **`http://localhost`** as an Authorized Redirect URI (this is the key — it works even without a real domain).
|
||||
6. Copy **Client ID** and **Client Secret** into EverShelf Settings → Backup.
|
||||
7. Enter your **Google Drive Folder ID** (the last part of the folder URL).
|
||||
8. Click **Authorize with Google** and sign in.
|
||||
9. The browser will redirect to `http://localhost` and may show a connection error — **this is expected**. Copy the full URL from the address bar (e.g. `http://localhost/?code=4%2F0A...`) and paste it into the field that appears in EverShelf, then click **Submit**.
|
||||
|
||||
> **Note:** While the OAuth app is in *Testing* status in Google Cloud Console, you must add your Google account as a test user under `APIs & Services → OAuth consent screen → Test users`.
|
||||
|
||||
---
|
||||
|
||||
## 🏗️ Architecture
|
||||
@@ -394,6 +474,54 @@ Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed g
|
||||
|
||||
---
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
EverShelf is a community project and contributions of any size are welcome!
|
||||
|
||||
### Easiest way to start — translate EverShelf into your language
|
||||
|
||||
Translations are just JSON files. No coding, no setup — fork → edit → PR.
|
||||
|
||||
```
|
||||
translations/
|
||||
├── it.json ✅ Italian (base)
|
||||
├── en.json ✅ English
|
||||
├── de.json ✅ German
|
||||
├── fr.json ✅ French
|
||||
├── es.json ✅ Spanish
|
||||
├── pt.json ❌ Portuguese — wanted!
|
||||
├── nl.json ❌ Dutch — wanted!
|
||||
└── ... ❌ Your language here!
|
||||
```
|
||||
|
||||
👉 See [issue #93](https://github.com/dadaloop82/EverShelf/issues/93) to claim a language.
|
||||
|
||||
### Other ways to contribute
|
||||
|
||||
| What | Skill needed |
|
||||
|---|---|
|
||||
| 🐛 Report a bug | None |
|
||||
| 📖 Improve the wiki | Markdown |
|
||||
| 🌍 Add a translation | JSON editing |
|
||||
| 🎨 Fix a CSS/UI issue | CSS / HTML |
|
||||
| ⚙️ Implement a feature | PHP / JS |
|
||||
| ⭐ Star the repo | Clicking |
|
||||
|
||||
👉 Browse [`help wanted`](https://github.com/dadaloop82/EverShelf/labels/help%20wanted) issues for good starting points.
|
||||
|
||||
Read [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide (branch naming, code style, how to run locally).
|
||||
|
||||
---
|
||||
|
||||
## 💬 Community
|
||||
|
||||
Join the conversation in [GitHub Discussions](https://github.com/dadaloop82/EverShelf/discussions):
|
||||
- **Vote on upcoming features** — tell us what to build next
|
||||
- **Show your setup** — share your kitchen kiosk
|
||||
- **Ask questions** — get help from the community
|
||||
|
||||
---
|
||||
|
||||
## 📄 License
|
||||
|
||||
This project is licensed under the **MIT License** — see the [LICENSE](LICENSE) file for details.
|
||||
|
||||
@@ -79,6 +79,53 @@ try {
|
||||
echo '[' . date('Y-m-d H:i:s') . '] Shelf life pre-warm warning: ' . $pe->getMessage() . "\n";
|
||||
}
|
||||
|
||||
// ── DB cleanup (retention policy) ────────────────────────────────────
|
||||
// Delete old recipes and transactions based on .env retention settings.
|
||||
try {
|
||||
ob_start();
|
||||
dbCleanup($db);
|
||||
ob_end_clean();
|
||||
echo '[' . date('Y-m-d H:i:s') . '] DB cleanup done'
|
||||
. ' (recipes >' . env('RECIPE_RETENTION_DAYS','7') . 'd'
|
||||
. ', tx >' . env('TRANSACTION_RETENTION_DAYS','90') . 'd' . ")\n";
|
||||
} catch (Throwable $ce) {
|
||||
echo '[' . date('Y-m-d H:i:s') . '] DB cleanup warning: ' . $ce->getMessage() . "\n";
|
||||
}
|
||||
|
||||
// ── Daily incremental backup ──────────────────────────────────────────
|
||||
// Create a local backup at most once every 23 h; also push to Google Drive
|
||||
// if GDRIVE_ENABLED=true. The guard prevents multiple backups per day even
|
||||
// though the cron runs every 5 minutes.
|
||||
if (env('BACKUP_ENABLED', 'true') === 'true') {
|
||||
try {
|
||||
$lastBackupTs = 0;
|
||||
if (file_exists(BACKUP_LAST_TS_PATH)) {
|
||||
$lastData = json_decode(file_get_contents(BACKUP_LAST_TS_PATH), true) ?: [];
|
||||
$lastBackupTs = (int)($lastData['ts'] ?? 0);
|
||||
}
|
||||
if (time() - $lastBackupTs >= 82800) { // 23 h
|
||||
$backupResult = createLocalBackup($db);
|
||||
if ($backupResult['success']) {
|
||||
echo '[' . date('Y-m-d H:i:s') . '] Backup local: ' . $backupResult['filename']
|
||||
. ' (' . $backupResult['size_kb'] . 'KB, purged ' . $backupResult['purged'] . " old)\n";
|
||||
if (env('GDRIVE_ENABLED', 'false') === 'true') {
|
||||
$gResult = backupToGDrive($db);
|
||||
if ($gResult['success']) {
|
||||
echo '[' . date('Y-m-d H:i:s') . '] Backup GDrive: OK'
|
||||
. ' (purged remote: ' . ($gResult['purged_remote'] ?? 0) . ")\n";
|
||||
} else {
|
||||
echo '[' . date('Y-m-d H:i:s') . '] Backup GDrive warning: ' . ($gResult['error'] ?? 'unknown') . "\n";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo '[' . date('Y-m-d H:i:s') . '] Backup warning: ' . ($backupResult['error'] ?? 'unknown') . "\n";
|
||||
}
|
||||
}
|
||||
} catch (Throwable $be) {
|
||||
echo '[' . date('Y-m-d H:i:s') . '] Backup error: ' . $be->getMessage() . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Throwable $e) {
|
||||
$msg = $e->getMessage();
|
||||
echo '[' . date('Y-m-d H:i:s') . '] ERROR: ' . $msg . "\n";
|
||||
@@ -86,3 +133,87 @@ try {
|
||||
_phpErrorReport($msg, $e->getFile(), $e->getLine(), $e->getTraceAsString(), get_class($e));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// ── Home Assistant: expiry alerts ─────────────────────────────────────────────
|
||||
// Fire one HA webhook per expiring item (once per day guard via a simple flag file).
|
||||
if (env('HA_ENABLED', 'false') === 'true' && env('HA_WEBHOOK_ID', '') !== '') {
|
||||
try {
|
||||
$haFlagFile = __DIR__ . '/../data/ha_expiry_notified_' . date('Y-m-d') . '.json';
|
||||
if (!file_exists($haFlagFile)) {
|
||||
$expiryDays = max(1, (int)env('HA_EXPIRY_DAYS', '3'));
|
||||
$expiringItems = $db->query(
|
||||
"SELECT p.name, i.quantity, i.unit, i.expiry_date, i.location
|
||||
FROM inventory i JOIN products p ON i.product_id = p.id
|
||||
WHERE i.quantity > 0 AND i.expiry_date IS NOT NULL
|
||||
AND i.expiry_date BETWEEN date('now') AND date('now', '+{$expiryDays} days')
|
||||
ORDER BY i.expiry_date ASC LIMIT 20"
|
||||
)->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
$expiredItems = $db->query(
|
||||
"SELECT p.name, i.quantity, i.unit, i.expiry_date, i.location
|
||||
FROM inventory i JOIN products p ON i.product_id = p.id
|
||||
WHERE i.quantity > 0 AND i.expiry_date IS NOT NULL
|
||||
AND i.expiry_date < date('now')
|
||||
ORDER BY i.expiry_date ASC LIMIT 10"
|
||||
)->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!empty($expiringItems)) {
|
||||
$names = implode(', ', array_column($expiringItems, 'name'));
|
||||
_fireHaWebhook('expiry_alert', [
|
||||
'count' => count($expiringItems),
|
||||
'items' => $expiringItems,
|
||||
'type' => 'expiring_soon',
|
||||
'days' => $expiryDays,
|
||||
'summary' => $names,
|
||||
]);
|
||||
// Also send HA notification if service configured
|
||||
if (env('HA_NOTIFY_SERVICE', '') !== '') {
|
||||
$msg = count($expiringItems) . ' product(s) expiring within ' . $expiryDays . ' days: ' . $names;
|
||||
_sendHaNotify($msg, ['expiring_items' => $expiringItems]);
|
||||
}
|
||||
echo '[' . date('Y-m-d H:i:s') . '] HA expiry_alert fired: ' . count($expiringItems) . " items\n";
|
||||
}
|
||||
|
||||
if (!empty($expiredItems)) {
|
||||
$expNames = implode(', ', array_column($expiredItems, 'name'));
|
||||
_fireHaWebhook('expiry_alert', [
|
||||
'count' => count($expiredItems),
|
||||
'items' => $expiredItems,
|
||||
'type' => 'expired',
|
||||
'summary' => $expNames,
|
||||
]);
|
||||
echo '[' . date('Y-m-d H:i:s') . '] HA expired fired: ' . count($expiredItems) . " items\n";
|
||||
}
|
||||
|
||||
// Mark as done for today
|
||||
file_put_contents($haFlagFile, json_encode(['ts' => time(), 'expiring' => count($expiringItems ?? []), 'expired' => count($expiredItems ?? [])]));
|
||||
// Clean up old flag files (keep last 7 days)
|
||||
foreach (glob(__DIR__ . '/../data/ha_expiry_notified_*.json') as $oldFlag) {
|
||||
$flagDate = str_replace([__DIR__ . '/../data/ha_expiry_notified_', '.json'], '', $oldFlag);
|
||||
if ($flagDate < date('Y-m-d', strtotime('-7 days'))) @unlink($oldFlag);
|
||||
}
|
||||
}
|
||||
} catch (Throwable $haE) {
|
||||
echo '[' . date('Y-m-d H:i:s') . '] HA expiry hook warning: ' . $haE->getMessage() . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
// ── Avahi/mDNS discovery registration ─────────────────────────────────────────
|
||||
// If avahi-daemon is running on this host, register the _evershelf._tcp service
|
||||
// so that Home Assistant can auto-discover this instance via Zeroconf.
|
||||
if (function_exists('shell_exec')) {
|
||||
try {
|
||||
$avahiService = '/etc/avahi/services/evershelf.xml';
|
||||
// Only create/update if avahi-daemon is installed and the file doesn't exist yet
|
||||
if (!file_exists($avahiService) && (shell_exec('which avahi-daemon 2>/dev/null') || shell_exec('which avahi-publish 2>/dev/null'))) {
|
||||
$template = __DIR__ . '/../docker/avahi-evershelf.xml';
|
||||
if (file_exists($template)) {
|
||||
$xml = file_get_contents($template);
|
||||
@file_put_contents($avahiService, $xml);
|
||||
echo '[' . date('Y-m-d H:i:s') . '] Avahi mDNS service registered at ' . $avahiService . "\n";
|
||||
}
|
||||
}
|
||||
} catch (Throwable $avahiE) {
|
||||
// Non-fatal: avahi not available
|
||||
}
|
||||
}
|
||||
|
||||
+33
-3
@@ -40,9 +40,21 @@ function _ensureDataDir(): void {
|
||||
|
||||
function getDB(): PDO {
|
||||
_ensureDataDir();
|
||||
// logger.php is required by index.php before getDB() is called.
|
||||
// In cron context it may not be loaded yet — guard with class_exists.
|
||||
$useLogging = class_exists('LoggingPDO', false);
|
||||
$isNew = !file_exists(DB_PATH);
|
||||
$db = new PDO('sqlite:' . DB_PATH);
|
||||
$db = $useLogging
|
||||
? new LoggingPDO('sqlite:' . DB_PATH)
|
||||
: new PDO('sqlite:' . DB_PATH);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
// Set a busy timeout to prevent "database is locked" errors under high concurrency.
|
||||
// This gives SQLite up to 5 seconds to acquire a lock before throwing an exception.
|
||||
$db->setAttribute(PDO::ATTR_TIMEOUT, 5); // PDO::ATTR_TIMEOUT is in seconds for MySQL, but not directly for SQLite.
|
||||
// For SQLite, we use PRAGMA busy_timeout.
|
||||
$db->exec('PRAGMA journal_mode = WAL;');
|
||||
$db->exec('PRAGMA busy_timeout = 5000;'); // 5000 milliseconds = 5 seconds
|
||||
|
||||
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
|
||||
$db->exec("PRAGMA journal_mode=WAL");
|
||||
$db->exec("PRAGMA foreign_keys=ON");
|
||||
@@ -239,6 +251,22 @@ function migrateDB(PDO $db): void {
|
||||
// Ensure composite indexes exist (added in v1.7.5 for performance)
|
||||
$db->exec("CREATE INDEX IF NOT EXISTS idx_transactions_type_date ON transactions(type, created_at)");
|
||||
$db->exec("CREATE INDEX IF NOT EXISTS idx_transactions_pid_type_undone ON transactions(product_id, type, undone)");
|
||||
|
||||
// Internal shopping list table (v1.8.0) — used when SHOPPING_MODE=internal
|
||||
$shopTables = $db->query("SELECT name FROM sqlite_master WHERE type='table' AND name='shopping_list'")->fetchAll();
|
||||
if (empty($shopTables)) {
|
||||
$db->exec("
|
||||
CREATE TABLE shopping_list (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
name TEXT NOT NULL,
|
||||
raw_name TEXT NOT NULL DEFAULT '',
|
||||
specification TEXT NOT NULL DEFAULT '',
|
||||
added_at INTEGER DEFAULT (strftime('%s','now')),
|
||||
sort_order INTEGER DEFAULT 0
|
||||
)
|
||||
");
|
||||
$db->exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_shopping_list_name ON shopping_list(lower(name))");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -379,8 +407,10 @@ function estimateOpenedExpiryDaysPHP(string $name, string $category, string $loc
|
||||
if (preg_match('/\b(yogurt|yaourt|yoghurt)\b/', $n)) return 5;
|
||||
if (preg_match('/mozzarella|burrata|stracciatella/', $n)) return 3;
|
||||
if (preg_match('/philadelphia|spalmabile/', $n)) return 7;
|
||||
// Specific hard cheeses that contain 'fresco' in their commercial name (e.g. Asiago fresco)
|
||||
// must be matched BEFORE the generic 'formaggio fresco' catch-all
|
||||
if (preg_match('/parmigiano|grana|pecorino|provolone|asiago|fontina|emmental|gruyere|scamorza|groviera/', $n)) return 28;
|
||||
if (preg_match('/formaggio.*(fresco|ricotta|mascarpone|stracchino|crescenza)/', $n)) return 5;
|
||||
if (preg_match('/parmigiano|grana|pecorino|provolone/', $n)) return 21;
|
||||
if (preg_match('/formaggio/', $n)) return 10;
|
||||
if (preg_match('/\bburro\b/', $n)) return 30;
|
||||
if (preg_match('/\bpanna\b/', $n)) return 4;
|
||||
@@ -449,7 +479,7 @@ function estimateSealedExpiryDaysPHP(string $name, string $category, string $loc
|
||||
elseif (preg_match('/yogurt/', $n)) $days = 21;
|
||||
elseif (preg_match('/mozzarella|burrata|stracciatella/', $n)) $days = 5;
|
||||
elseif (preg_match('/formaggio\s+(fresco|ricotta|mascarpone|stracchino|crescenza)/', $n)) $days = 10;
|
||||
elseif (preg_match('/parmigiano|grana|pecorino|provolone/', $n)) $days = 60;
|
||||
elseif (preg_match('/parmigiano|grana|pecorino|provolone|asiago|fontina|emmental|gruyere|scamorza|groviera/', $n)) $days = 60;
|
||||
elseif (preg_match('/burro/', $n)) $days = 60;
|
||||
elseif (preg_match('/panna/', $n)) $days = 14;
|
||||
elseif (preg_match('/prosciutto\s+cotto|mortadella|wurstel/', $n)) $days = 7;
|
||||
|
||||
+2498
-251
File diff suppressed because it is too large
Load Diff
+375
@@ -0,0 +1,375 @@
|
||||
<?php
|
||||
/**
|
||||
* EverShelf Logger — rotating file logger with 4 configurable levels.
|
||||
*
|
||||
* Levels (in order of verbosity):
|
||||
* DEBUG(0) — ogni minima operazione: query, cache, AI payload, function entry/exit
|
||||
* INFO (1) — azioni completate, AI result summary, sync status [default]
|
||||
* WARN (2) — rate limit, cache miss, AI fallback, token renewal, slow op
|
||||
* ERROR(3) — DB failure, AI API error, file write error, exception
|
||||
*
|
||||
* Config via .env (all optional):
|
||||
* LOG_LEVEL = INFO (DEBUG|INFO|WARN|ERROR)
|
||||
* LOG_ROTATE_HOURS = 24 (new file every N hours; 1–168; default 24)
|
||||
* LOG_MAX_FILES = 14 (max rotated files to keep; default 14)
|
||||
*
|
||||
* Log files: logs/evershelf_YYYY-MM-DD_HH.log
|
||||
* Each line: [2026-05-18 14:23:11] [INFO ] [rid=a1b2c3d4] [action] Message {ctx}
|
||||
*/
|
||||
class EverLog {
|
||||
|
||||
// ── Level constants ────────────────────────────────────────────────────
|
||||
const DEBUG = 0;
|
||||
const INFO = 1;
|
||||
const WARN = 2;
|
||||
const ERROR = 3;
|
||||
|
||||
private static bool $initialized = false;
|
||||
private static int $level = self::INFO;
|
||||
private static string $logFile = '';
|
||||
private static string $logDir = '';
|
||||
private static int $rotateHours = 24;
|
||||
private static int $maxFiles = 14;
|
||||
private static string $requestId = '';
|
||||
private static string $currentAction = '-';
|
||||
|
||||
// ── Init (called lazily on first write) ────────────────────────────────
|
||||
private static function init(): void {
|
||||
if (self::$initialized) return;
|
||||
self::$initialized = true;
|
||||
|
||||
// Read .env values via getenv() (populated by Apache SetEnv or putenv() in index.php)
|
||||
$envLevel = strtoupper((string)(getenv('LOG_LEVEL') ?: 'INFO'));
|
||||
$rotateHours = max(1, min(168, (int)(getenv('LOG_ROTATE_HOURS') ?: 24)));
|
||||
$maxFiles = max(1, min(365, (int)(getenv('LOG_MAX_FILES') ?: 14)));
|
||||
|
||||
self::$level = match($envLevel) {
|
||||
'DEBUG' => self::DEBUG,
|
||||
'WARN' => self::WARN,
|
||||
'ERROR' => self::ERROR,
|
||||
default => self::INFO,
|
||||
};
|
||||
self::$rotateHours = $rotateHours;
|
||||
self::$maxFiles = $maxFiles;
|
||||
self::$requestId = substr(bin2hex(random_bytes(4)), 0, 8);
|
||||
|
||||
// Ensure log directory exists
|
||||
$base = dirname(__DIR__) . '/logs';
|
||||
self::$logDir = $base;
|
||||
if (!is_dir($base)) {
|
||||
@mkdir($base, 0755, true);
|
||||
}
|
||||
|
||||
// Compute current log file path (slot by rotate-hours bucket)
|
||||
$slotTs = (int)(floor(time() / ($rotateHours * 3600)) * ($rotateHours * 3600));
|
||||
$slotLabel = gmdate('Y-m-d_H', $slotTs);
|
||||
self::$logFile = "$base/evershelf_{$slotLabel}.log";
|
||||
|
||||
// Rotate (delete oldest files beyond max)
|
||||
self::rotate();
|
||||
}
|
||||
|
||||
// ── Rotate old log files ───────────────────────────────────────────────
|
||||
private static function rotate(): void {
|
||||
$files = glob(self::$logDir . '/evershelf_*.log') ?: [];
|
||||
if (count($files) <= self::$maxFiles) return;
|
||||
sort($files); // oldest first (filenames are lexicographically sortable by date)
|
||||
$toDelete = array_slice($files, 0, count($files) - self::$maxFiles);
|
||||
foreach ($toDelete as $f) {
|
||||
@unlink($f);
|
||||
}
|
||||
}
|
||||
|
||||
// ── Core write ────────────────────────────────────────────────────────
|
||||
private static function write(int $lvl, string $msg, array $ctx, string $action): void {
|
||||
self::init();
|
||||
if ($lvl < self::$level) return;
|
||||
|
||||
$labels = ['DEBUG', 'INFO ', 'WARN ', 'ERROR'];
|
||||
$ts = gmdate('Y-m-d H:i:s');
|
||||
$act = $action !== '-' ? $action : self::$currentAction;
|
||||
$ctxStr = empty($ctx) ? '' : ' ' . json_encode($ctx, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
$line = "[{$ts}] [{$labels[$lvl]}] [rid=" . self::$requestId . "] [{$act}] {$msg}{$ctxStr}\n";
|
||||
|
||||
@file_put_contents(self::$logFile, $line, FILE_APPEND | LOCK_EX);
|
||||
}
|
||||
|
||||
// ── Public API ────────────────────────────────────────────────────────
|
||||
|
||||
/** Set the current action name (shown in every subsequent log line for this request). */
|
||||
public static function setAction(string $action): void {
|
||||
self::$currentAction = $action;
|
||||
}
|
||||
|
||||
/** Log at DEBUG level — every minor operation, query, cache hit/miss, AI payload. */
|
||||
public static function debug(string $msg, array $ctx = [], string $action = '-'): void {
|
||||
self::write(self::DEBUG, $msg, $ctx, $action);
|
||||
}
|
||||
|
||||
/** Log at INFO level — action completed, recipe generated, sync done. */
|
||||
public static function info(string $msg, array $ctx = [], string $action = '-'): void {
|
||||
self::write(self::INFO, $msg, $ctx, $action);
|
||||
}
|
||||
|
||||
/** Log at WARN level — rate limit, AI fallback, slow op, token renewal. */
|
||||
public static function warn(string $msg, array $ctx = [], string $action = '-'): void {
|
||||
self::write(self::WARN, $msg, $ctx, $action);
|
||||
}
|
||||
|
||||
/** Log at ERROR level — DB failure, AI API error, file write error, exception. */
|
||||
public static function error(string $msg, array $ctx = [], string $action = '-'): void {
|
||||
self::write(self::ERROR, $msg, $ctx, $action);
|
||||
}
|
||||
|
||||
/** Convenience: log a Throwable at ERROR level with class + location. */
|
||||
public static function exception(\Throwable $e, string $action = '-', array $extra = []): void {
|
||||
self::write(self::ERROR, $e->getMessage(), array_merge([
|
||||
'class' => get_class($e),
|
||||
'at' => basename($e->getFile()) . ':' . $e->getLine(),
|
||||
'trace' => substr($e->getTraceAsString(), 0, 800),
|
||||
], $extra), $action);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the start of an action request (INFO).
|
||||
* Automatically sets the current action name so subsequent lines inherit it.
|
||||
*/
|
||||
public static function request(string $action, string $method, array $params = []): void {
|
||||
self::setAction($action);
|
||||
// At DEBUG: include all params; at INFO just the action+method
|
||||
if (self::$level <= self::DEBUG) {
|
||||
self::write(self::DEBUG, "→ {$method} /{$action}", $params, $action);
|
||||
} else {
|
||||
self::write(self::INFO, "→ {$method} /{$action}", [], $action);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a DB query at DEBUG level.
|
||||
* @param string $sql Truncated SQL or a descriptive label
|
||||
* @param mixed $result Number of rows affected/returned (optional)
|
||||
* @param float $elapsed Execution time in seconds (optional)
|
||||
*/
|
||||
public static function query(string $sql, $result = null, float $elapsed = 0.0): void {
|
||||
if (self::$level > self::DEBUG) return; // skip entirely unless DEBUG
|
||||
$ctx = [];
|
||||
if ($result !== null) $ctx['rows'] = $result;
|
||||
if ($elapsed > 0) $ctx['ms'] = round($elapsed * 1000, 1);
|
||||
if ($elapsed > 1.0) $ctx['SLOW'] = true; // highlight slow queries even in context
|
||||
self::write(self::DEBUG, 'DB: ' . substr($sql, 0, 200), $ctx, self::$currentAction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a slow operation as WARN regardless of configured level.
|
||||
* Call this after any operation that took more than $thresholdSec.
|
||||
*/
|
||||
public static function slowOp(string $label, float $elapsed, float $thresholdSec = 2.0): void {
|
||||
if ($elapsed < $thresholdSec) return;
|
||||
self::write(self::WARN, "SLOW_OP: {$label}", ['elapsed_s' => round($elapsed, 2)], self::$currentAction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log an AI call at INFO level (or DEBUG for full payload).
|
||||
* @param string $model Model name (e.g. 'gemini-2.5-flash')
|
||||
* @param int $promptLen Character length of the prompt
|
||||
* @param bool $isFallback Whether this is the fallback model
|
||||
*/
|
||||
public static function aiCall(string $model, int $promptLen, bool $isFallback = false): void {
|
||||
$ctx = ['model' => $model, 'prompt_chars' => $promptLen];
|
||||
if ($isFallback) $ctx['fallback'] = true;
|
||||
$level = $isFallback ? self::WARN : self::INFO;
|
||||
self::write($level, 'AI call', $ctx, self::$currentAction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log an AI response at INFO level.
|
||||
* @param string $model Model that responded
|
||||
* @param int $outputLen Character length of output
|
||||
* @param float $elapsed Call duration in seconds
|
||||
* @param bool $ok Whether the call succeeded
|
||||
* @param string $errorMsg Error message if not ok
|
||||
*/
|
||||
public static function aiResponse(string $model, int $outputLen, float $elapsed, bool $ok = true, string $errorMsg = ''): void {
|
||||
$ctx = ['model' => $model, 'output_chars' => $outputLen, 'elapsed_s' => round($elapsed, 2)];
|
||||
if (!$ok) {
|
||||
$ctx['error'] = substr($errorMsg, 0, 200);
|
||||
self::write(self::ERROR, 'AI error', $ctx, self::$currentAction);
|
||||
} else {
|
||||
self::write(self::INFO, 'AI ok', $ctx, self::$currentAction);
|
||||
}
|
||||
// Warn if over 10s
|
||||
if ($ok && $elapsed > 10.0) {
|
||||
self::write(self::WARN, 'AI response slow', ['elapsed_s' => round($elapsed, 2)], self::$currentAction);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a cache event at DEBUG level.
|
||||
* @param string $cacheKey The cache key (or a label)
|
||||
* @param bool $hit true = cache hit, false = cache miss
|
||||
* @param string $cacheType 'file', 'session', 'memory'
|
||||
*/
|
||||
public static function cache(string $cacheKey, bool $hit, string $cacheType = 'file'): void {
|
||||
if (self::$level > self::DEBUG) return;
|
||||
self::write(self::DEBUG,
|
||||
($hit ? 'CACHE HIT' : 'CACHE MISS') . " [{$cacheType}]",
|
||||
['key' => substr($cacheKey, 0, 64)],
|
||||
self::$currentAction
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the last $lines log lines from all available log files, newest last.
|
||||
* Used by the get_logs API endpoint.
|
||||
*/
|
||||
public static function tail(int $lines = 500): array {
|
||||
self::init();
|
||||
$files = glob(self::$logDir . '/evershelf_*.log') ?: [];
|
||||
if (empty($files)) return [];
|
||||
rsort($files); // newest file first
|
||||
|
||||
$collected = [];
|
||||
foreach ($files as $f) {
|
||||
if (count($collected) >= $lines) break;
|
||||
$content = @file_get_contents($f);
|
||||
if ($content === false) continue;
|
||||
$fLines = array_filter(explode("\n", $content));
|
||||
// Prepend so we read newest-first → older lines at front
|
||||
$collected = array_merge(array_values($fLines), $collected);
|
||||
}
|
||||
// Return last $lines, newest at end (chronological order)
|
||||
return array_values(array_slice($collected, -$lines));
|
||||
}
|
||||
|
||||
/** List available log files with their sizes and date ranges. */
|
||||
public static function listFiles(): array {
|
||||
self::init();
|
||||
$files = glob(self::$logDir . '/evershelf_*.log') ?: [];
|
||||
rsort($files);
|
||||
return array_map(fn($f) => [
|
||||
'file' => basename($f),
|
||||
'size_kb' => round(filesize($f) / 1024, 1),
|
||||
'mtime' => date('Y-m-d H:i:s', filemtime($f)),
|
||||
], $files);
|
||||
}
|
||||
|
||||
/** Current effective level name. */
|
||||
public static function levelName(): string {
|
||||
self::init();
|
||||
return ['DEBUG', 'INFO', 'WARN', 'ERROR'][self::$level];
|
||||
}
|
||||
|
||||
/** Current log file path. */
|
||||
public static function currentFile(): string {
|
||||
self::init();
|
||||
return self::$logFile;
|
||||
}
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// LoggingPDOStatement — wraps PDOStatement to time and log every execute()
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
class LoggingPDOStatement {
|
||||
private \PDOStatement $stmt;
|
||||
private string $sql;
|
||||
|
||||
public function __construct(\PDOStatement $stmt, string $sql) {
|
||||
$this->stmt = $stmt;
|
||||
$this->sql = $sql;
|
||||
}
|
||||
|
||||
public function execute(?array $params = null): bool {
|
||||
$t0 = microtime(true);
|
||||
$ok = $this->stmt->execute($params);
|
||||
$ms = round((microtime(true) - $t0) * 1000, 2);
|
||||
$ctx = ['ms' => $ms, 'rows' => $this->stmt->rowCount()];
|
||||
if ($ms > 500) $ctx['SLOW'] = true;
|
||||
EverLog::query($this->sql, $this->stmt->rowCount(), (microtime(true) - $t0));
|
||||
return $ok;
|
||||
}
|
||||
|
||||
public function fetch(int $mode = \PDO::FETCH_DEFAULT, ...$args): mixed {
|
||||
return $this->stmt->fetch($mode, ...$args);
|
||||
}
|
||||
|
||||
public function fetchAll(int $mode = \PDO::FETCH_DEFAULT, ...$args): array {
|
||||
return $this->stmt->fetchAll($mode ?: \PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function fetchColumn(int $col = 0): mixed {
|
||||
return $this->stmt->fetchColumn($col);
|
||||
}
|
||||
|
||||
public function rowCount(): int {
|
||||
return $this->stmt->rowCount();
|
||||
}
|
||||
|
||||
public function bindValue(int|string $param, mixed $value, int $type = \PDO::PARAM_STR): bool {
|
||||
return $this->stmt->bindValue($param, $value, $type);
|
||||
}
|
||||
|
||||
public function bindParam(int|string $param, mixed &$var, int $type = \PDO::PARAM_STR, int $maxLength = 0): bool {
|
||||
return $this->stmt->bindParam($param, $var, $type, $maxLength);
|
||||
}
|
||||
|
||||
public function closeCursor(): bool {
|
||||
return $this->stmt->closeCursor();
|
||||
}
|
||||
|
||||
public function setFetchMode(int $mode, mixed ...$args): bool {
|
||||
return $this->stmt->setFetchMode($mode, ...$args);
|
||||
}
|
||||
|
||||
public function __get(string $name): mixed {
|
||||
return $this->stmt->$name;
|
||||
}
|
||||
|
||||
public function __call(string $name, array $args): mixed {
|
||||
return $this->stmt->$name(...$args);
|
||||
}
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// LoggingPDO — wraps PDO to auto-log all prepare(), query(), exec()
|
||||
// Drop-in replacement: return LoggingPDO from getDB() instead of PDO.
|
||||
// Type hint: use PDO in all functions (LoggingPDO extends PDO).
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
class LoggingPDO extends \PDO {
|
||||
public function prepare(string $query, array $options = []): LoggingPDOStatement|false {
|
||||
$stmt = parent::prepare($query, $options);
|
||||
if ($stmt === false) {
|
||||
EverLog::error('PDO::prepare failed', ['sql' => substr($query, 0, 200)]);
|
||||
return false;
|
||||
}
|
||||
return new LoggingPDOStatement($stmt, $query);
|
||||
}
|
||||
|
||||
public function query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): \PDOStatement|false {
|
||||
$t0 = microtime(true);
|
||||
$stmt = $fetchMode !== null
|
||||
? parent::query($query, $fetchMode, ...$fetchModeArgs)
|
||||
: parent::query($query);
|
||||
$elapsed = microtime(true) - $t0;
|
||||
if ($stmt !== false) {
|
||||
EverLog::query($query, $stmt->rowCount(), $elapsed);
|
||||
} else {
|
||||
EverLog::error('PDO::query failed', ['sql' => substr($query, 0, 200)]);
|
||||
}
|
||||
return $stmt;
|
||||
}
|
||||
|
||||
public function exec(string $statement): int|false {
|
||||
// Skip WAL/PRAGMA logging below DEBUG (too noisy at startup)
|
||||
$isPragma = stripos(ltrim($statement), 'PRAGMA') === 0;
|
||||
$t0 = microtime(true);
|
||||
$result = parent::exec($statement);
|
||||
$elapsed = microtime(true) - $t0;
|
||||
if (!$isPragma) {
|
||||
EverLog::query($statement, $result === false ? 0 : $result, $elapsed);
|
||||
} elseif (EverLog::DEBUG >= 0) {
|
||||
// Log PRAGMAs only at DEBUG level
|
||||
EverLog::query($statement, is_int($result) ? $result : 0, $elapsed);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
+599
-44
@@ -72,12 +72,12 @@ body {
|
||||
#app-preloader {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: var(--bg-dark, #0f172a);
|
||||
background: #0c1222;
|
||||
z-index: 200000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: opacity 0.35s ease;
|
||||
transition: opacity 0.45s ease;
|
||||
}
|
||||
#app-preloader.fade-out {
|
||||
opacity: 0;
|
||||
@@ -87,72 +87,201 @@ body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
gap: 28px;
|
||||
}
|
||||
.app-preloader-spinner {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border: 4px solid rgba(255,255,255,0.15);
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 3px solid rgba(255,255,255,0.1);
|
||||
border-top-color: #4ade80;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
animation: spin 0.9s linear infinite;
|
||||
}
|
||||
.app-preloader-label {
|
||||
color: rgba(255,255,255,0.75);
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.app-preloader-logo {
|
||||
height: 160px;
|
||||
height: 150px;
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
filter: drop-shadow(0 4px 16px rgba(74,222,128,0.2));
|
||||
animation: logoPulse 3.2s ease-in-out infinite;
|
||||
}
|
||||
@keyframes logoPulse {
|
||||
0%, 100% { filter: drop-shadow(0 4px 20px rgba(74,222,128,0.18)); }
|
||||
50% { filter: drop-shadow(0 4px 36px rgba(74,222,128,0.48)); }
|
||||
}
|
||||
.app-preloader-version {
|
||||
color: rgba(255,255,255,0.35);
|
||||
font-size: 0.72rem;
|
||||
color: rgba(255,255,255,0.22);
|
||||
font-size: 0.68rem;
|
||||
font-family: monospace;
|
||||
letter-spacing: 0.5px;
|
||||
margin-top: -8px;
|
||||
letter-spacing: 0.6px;
|
||||
margin-top: -16px;
|
||||
}
|
||||
/* ── Startup health check list ─────────────────────────────────────── */
|
||||
.preloader-checks {
|
||||
/* ── Startup progress section ────────────────────────────────────────── */
|
||||
.preloader-progress-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
width: 240px;
|
||||
max-width: 90vw;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
width: min(92vw, 520px);
|
||||
animation: zwFadeIn 0.25s ease;
|
||||
}
|
||||
.preloader-check-row {
|
||||
.preloader-bar-track {
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
background: rgba(255,255,255,0.08);
|
||||
border-radius: 99px;
|
||||
overflow: visible;
|
||||
}
|
||||
.preloader-bar {
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
background: linear-gradient(90deg, #4ade80, #22c55e);
|
||||
border-radius: 99px;
|
||||
transition: width 0.22s cubic-bezier(0.4,0,0.2,1), background 0.3s ease;
|
||||
box-shadow: 0 0 8px rgba(74,222,128,0.55);
|
||||
}
|
||||
.preloader-bar.bar-error { background: linear-gradient(90deg,#f87171,#ef4444); box-shadow: 0 0 8px rgba(239,68,68,0.5); }
|
||||
.preloader-bar.bar-warn { background: linear-gradient(90deg,#fbbf24,#f59e0b); box-shadow: 0 0 8px rgba(251,191,36,0.5); }
|
||||
.preloader-check-label { display: none; }
|
||||
|
||||
/* ── Status line: single element, opacity crossfade via JS ─────────── */
|
||||
.check-ticker {
|
||||
width: 100%;
|
||||
height: 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 0.82rem;
|
||||
color: rgba(255,255,255,0.80);
|
||||
background: rgba(255,255,255,0.07);
|
||||
border-radius: 8px;
|
||||
padding: 5px 10px;
|
||||
transition: background 0.2s;
|
||||
justify-content: center;
|
||||
}
|
||||
.preloader-status-text {
|
||||
font-size: clamp(0.78rem, 2vw, 0.9rem);
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.03em;
|
||||
color: rgba(255,255,255,0.45);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
padding: 0 12px;
|
||||
}
|
||||
.preloader-status-text.state-ok { color: #86efac; }
|
||||
.preloader-status-text.state-warn { color: #fde68a; }
|
||||
.preloader-status-text.state-error { color: #fca5a5; }
|
||||
.preloader-warnings {
|
||||
max-width: min(92vw, 600px);
|
||||
width: 100%;
|
||||
animation: zwFadeIn 0.3s ease;
|
||||
}
|
||||
|
||||
/* ── Warning popup (auto-close 5s) ─────────────────────────── */
|
||||
.startup-popup {
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
.startup-popup-warn {
|
||||
background: rgba(30,20,0,0.85);
|
||||
border: 1px solid rgba(251,191,36,0.45);
|
||||
}
|
||||
.startup-popup-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 9px 14px 7px;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
color: #fcd34d;
|
||||
gap: 8px;
|
||||
}
|
||||
.startup-popup-countdown {
|
||||
background: rgba(251,191,36,0.2);
|
||||
color: #fcd34d;
|
||||
border-radius: 50%;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.startup-popup-body {
|
||||
padding: 2px 14px 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.startup-warn-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
}
|
||||
.startup-warn-icon {
|
||||
font-size: 1rem;
|
||||
flex-shrink: 0;
|
||||
margin-top: 1px;
|
||||
}
|
||||
.startup-warn-body {
|
||||
font-size: 0.78rem;
|
||||
color: #d4c08a;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.startup-warn-body strong {
|
||||
display: block;
|
||||
color: #fcd34d;
|
||||
font-size: 0.82rem;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.startup-warn-body p {
|
||||
margin: 0;
|
||||
color: #c8a954;
|
||||
}
|
||||
.startup-popup-bar-wrap {
|
||||
height: 3px;
|
||||
background: rgba(251,191,36,0.15);
|
||||
}
|
||||
.startup-popup-bar {
|
||||
height: 3px;
|
||||
background: #fbbf24;
|
||||
width: 100%;
|
||||
will-change: width;
|
||||
}
|
||||
|
||||
/* ── Error popup (blocking) ─────────────────────────────────── */
|
||||
/* Keep .preloader-warn-badge for backward compat */
|
||||
.preloader-warn-badge {
|
||||
background: rgba(251,191,36,0.15);
|
||||
color: #fcd34d;
|
||||
border: 1px solid rgba(251,191,36,0.35);
|
||||
border-radius: 99px;
|
||||
padding: 3px 10px;
|
||||
font-size: 0.71rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.preloader-check-row[data-state="ok"] { background: rgba(74,222,128,0.10); color: rgba(255,255,255,0.92); }
|
||||
.preloader-check-row[data-state="warn"] { background: rgba(251,191,36,0.12); color: rgba(255,255,255,0.92); }
|
||||
.preloader-check-row[data-state="error"] { background: rgba(239,68,68,0.15); color: #fca5a5; }
|
||||
.pck-icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }
|
||||
.pck-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.preloader-error-msg {
|
||||
color: #fca5a5;
|
||||
background: rgba(239,68,68,0.18);
|
||||
border: 1px solid rgba(239,68,68,0.4);
|
||||
border-radius: 10px;
|
||||
padding: 10px 16px;
|
||||
font-size: 0.88rem;
|
||||
text-align: center;
|
||||
max-width: 280px;
|
||||
line-height: 1.4;
|
||||
border-radius: 12px;
|
||||
padding: 14px 18px;
|
||||
font-size: 0.80rem;
|
||||
text-align: left;
|
||||
max-width: 300px;
|
||||
line-height: 1.6;
|
||||
white-space: pre-line;
|
||||
animation: zwFadeIn 0.3s ease;
|
||||
}
|
||||
.preloader-error-msg strong {
|
||||
display: block;
|
||||
font-size: 0.9rem;
|
||||
color: #f87171;
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
.preloader-retry-btn {
|
||||
background: #ef4444;
|
||||
color: #fff;
|
||||
@@ -467,13 +596,37 @@ body {
|
||||
}
|
||||
.offline-banner-retry:hover { background: rgba(255,255,255,0.38); }
|
||||
|
||||
/* Pulsing dot shown in the banner while the offline cache is being read */
|
||||
.offline-banner-dot {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: #f87171;
|
||||
margin-right: 6px;
|
||||
vertical-align: middle;
|
||||
animation: offline-dot-pulse 1.1s ease-in-out infinite;
|
||||
}
|
||||
@keyframes offline-dot-pulse {
|
||||
0%, 100% { opacity: 0.3; transform: scale(0.8); }
|
||||
50% { opacity: 1; transform: scale(1.15); }
|
||||
}
|
||||
|
||||
/* When server is offline, block interactions with the main content */
|
||||
body.server-offline .app-content {
|
||||
body.server-offline:not(.offline-mode) .app-content {
|
||||
opacity: 0.4;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
/* In offline-mode the app is usable; just a subtle left-border indicator */
|
||||
body.offline-mode .app-content {
|
||||
border-left: 3px solid rgba(239, 68, 68, 0.45);
|
||||
}
|
||||
/* Hide the "Retry" button in the banner when in offline mode — use the Continue button instead */
|
||||
body.offline-mode .offline-banner-retry {
|
||||
display: none;
|
||||
}
|
||||
body.server-offline .bottom-nav {
|
||||
opacity: 0.4;
|
||||
pointer-events: none;
|
||||
@@ -2438,6 +2591,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;
|
||||
@@ -2898,10 +3062,82 @@ body.server-offline .bottom-nav {
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.product-preview-small {
|
||||
padding: 12px;
|
||||
/* Action and Use page hero card */
|
||||
#page-action .product-preview-small,
|
||||
#page-use .product-preview-small {
|
||||
padding: 14px 16px;
|
||||
gap: 14px;
|
||||
border-left: 4px solid var(--primary);
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* action page: slightly larger name */
|
||||
#page-action .use-hero-name {
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
/* barcode pill on action page */
|
||||
.action-pill-barcode { background: #f1f5f9; color: #64748b; }
|
||||
|
||||
.use-hero-icon {
|
||||
font-size: 2.4rem;
|
||||
width: 52px;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
line-height: 1;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.use-hero-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.use-hero-name {
|
||||
font-size: 1.05rem;
|
||||
font-weight: 700;
|
||||
color: var(--text);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.use-hero-brand {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-light);
|
||||
}
|
||||
|
||||
.use-hero-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.use-meta-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
padding: 3px 8px;
|
||||
border-radius: 99px;
|
||||
line-height: 1.3;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Expiry pill colours */
|
||||
.use-pill-ok { background: #dcfce7; color: #166534; }
|
||||
.use-pill-warn { background: #fef9c3; color: #854d0e; }
|
||||
.use-pill-soon { background: #fed7aa; color: #7c2d12; }
|
||||
.use-pill-expired { background: #fee2e2; color: #991b1b; }
|
||||
/* Quantity pill */
|
||||
.use-pill-qty { background: #e0f2fe; color: #0c4a6e; }
|
||||
|
||||
.product-preview img, .product-preview-small img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
@@ -2911,8 +3147,11 @@ body.server-offline .bottom-nav {
|
||||
}
|
||||
|
||||
.product-preview-small img {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: var(--radius-sm);
|
||||
object-fit: cover;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.product-preview-emoji {
|
||||
@@ -4062,6 +4301,15 @@ body.server-offline .bottom-nav {
|
||||
min-width: 0;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.recipe-ing-name {
|
||||
cursor: pointer;
|
||||
border-bottom: 1px dashed rgba(74,222,128,0.5);
|
||||
transition: color 0.15s, border-color 0.15s;
|
||||
}
|
||||
.recipe-ing-name:hover {
|
||||
color: #4ade80;
|
||||
border-bottom-color: #4ade80;
|
||||
}
|
||||
|
||||
.btn-use-ingredient {
|
||||
flex-shrink: 0;
|
||||
@@ -5445,6 +5693,26 @@ body.cooking-mode-active .app-header {
|
||||
background: rgba(59, 130, 246, 0.15);
|
||||
}
|
||||
|
||||
/* Related stock hint (same generic family, different brand/product) */
|
||||
.action-related-stock-card {
|
||||
background: #f0fdf4;
|
||||
border: 1.5px solid #86efac;
|
||||
border-radius: var(--radius);
|
||||
padding: 10px 14px;
|
||||
font-size: 0.82rem;
|
||||
color: #166534;
|
||||
margin-bottom: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.action-related-stock-card strong { color: #15803d; }
|
||||
.related-stock-item { display: inline-block; margin-right: 8px; }
|
||||
[data-theme="dark"] .action-related-stock-card {
|
||||
background: rgba(21, 128, 61, 0.12);
|
||||
border-color: #166534;
|
||||
color: #86efac;
|
||||
}
|
||||
[data-theme="dark"] .action-related-stock-card strong { color: #4ade80; }
|
||||
|
||||
/* ===== ACTION BUTTONS GRID ===== */
|
||||
.action-buttons-3col {
|
||||
display: grid;
|
||||
@@ -6906,6 +7174,14 @@ body.cooking-mode-active .app-header {
|
||||
color: #9ca3af;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.btn-banner-vacuum {
|
||||
background: #ede9fe;
|
||||
color: #6d28d9;
|
||||
}
|
||||
.btn-banner-edit2 {
|
||||
background: #e0f2fe;
|
||||
color: #0369a1;
|
||||
}
|
||||
|
||||
/* ===== PAGE HEADER ACTION BUTTON (export etc.) ===== */
|
||||
.page-header-action-btn {
|
||||
@@ -6987,6 +7263,7 @@ body.cooking-mode-active .app-header {
|
||||
--bg: #0f172a;
|
||||
--bg-card: #1e293b;
|
||||
--bg-dark: #020617;
|
||||
--bg-secondary: #263448;
|
||||
--text: #e2e8f0;
|
||||
--text-light: #94a3b8;
|
||||
--text-muted: #64748b;
|
||||
@@ -7238,3 +7515,281 @@ body.cooking-mode-active .app-header {
|
||||
color: var(--primary-light);
|
||||
}
|
||||
/* @media prefers-color-scheme: auto handled in JS */
|
||||
|
||||
/* ===== DARK MODE — EXTENDED COMPONENT OVERRIDES ===== */
|
||||
|
||||
/* ── Inventory badges ── */
|
||||
[data-theme="dark"] .badge-location { background: #0c2a4e; color: #7dd3fc; }
|
||||
[data-theme="dark"] .badge-category { background: #1e293b; color: #94a3b8; }
|
||||
[data-theme="dark"] .badge-qty { background: #0f2a1a; color: #86efac; }
|
||||
[data-theme="dark"] .badge-expiry { background: #2a1a00; color: #fcd34d; }
|
||||
[data-theme="dark"] .badge-expired { background: #2a0808; color: #fca5a5; }
|
||||
|
||||
/* ── Urgency / priority badges ── */
|
||||
[data-theme="dark"] .badge-critical { background: #2a0808; color: #fca5a5; }
|
||||
[data-theme="dark"] .badge-high { background: #2a1200; color: #fdba74; }
|
||||
[data-theme="dark"] .badge-medium { background: #2a1e00; color: #fde68a; }
|
||||
[data-theme="dark"] .badge-low { background: #0f2a1a; color: #86efac; }
|
||||
[data-theme="dark"] .badge-freq-high { background: #2e0d1a; color: #f9a8d4; }
|
||||
[data-theme="dark"] .badge-tag-add { background: #1e293b; color: #94a3b8; }
|
||||
|
||||
/* ── Smart shopping badges ── */
|
||||
[data-theme="dark"] .smart-freq-badge.freq-suggest { background: #0c2a4e; color: #7dd3fc; }
|
||||
[data-theme="dark"] .smart-freq-badge.freq-suggest-approx { background: #0c1f3a; color: #93c5fd; font-style: italic; }
|
||||
[data-theme="dark"] .smart-pred-badge { background: #2a1e00; color: #fde68a; }
|
||||
[data-theme="dark"] .smart-pred-badge.pred-urgent { background: #2a0808; color: #fca5a5; }
|
||||
[data-theme="dark"] .smart-pred-badge.pred-soon { background: #2a1200; color: #fdba74; }
|
||||
[data-theme="dark"] .smart-bring-badge { background: #0c2a4e; color: #7dd3fc; }
|
||||
|
||||
/* ── AW trend mini-cards ── */
|
||||
[data-theme="dark"] .aw-tcard-good { background: #0f2a1a; border-color: #166534; }
|
||||
[data-theme="dark"] .aw-tcard-ok { background: #1c1300; border-color: #78350f; }
|
||||
[data-theme="dark"] .aw-tcard-bad { background: #2a0808; border-color: #7f1d1d; }
|
||||
|
||||
/* ── Alert sections ── */
|
||||
[data-theme="dark"] .alert-danger { background: #2a0808; border-color: var(--danger); }
|
||||
[data-theme="dark"] .alert-item { background: rgba(255,255,255,0.04); }
|
||||
[data-theme="dark"] .alert-item-qty { background: rgba(255,255,255,0.06); }
|
||||
[data-theme="dark"] .alert-review { background: #1c1300; border-color: #78350f; }
|
||||
[data-theme="dark"] .alert-review h3 { color: #fcd34d; }
|
||||
[data-theme="dark"] .alert-opened { background: #0c1f3a; border-color: #1e3a8a; }
|
||||
[data-theme="dark"] .alert-opened h3 { color: #7dd3fc; }
|
||||
[data-theme="dark"] .alert-item-badge.opened { background: #1e40af; }
|
||||
|
||||
/* ── Opened expiry badges ── */
|
||||
[data-theme="dark"] .opened-expiry-ok { background: #0f2a1a; color: #86efac; }
|
||||
[data-theme="dark"] .opened-expiry-soon { background: #2a1e00; color: #fde68a; }
|
||||
[data-theme="dark"] .opened-expiry-urgent { background: #2a0808; color: #fca5a5; }
|
||||
|
||||
/* ── Alert banner: gradient overrides ── */
|
||||
[data-theme="dark"] .alert-banner.banner-expired { background: #2a0808; border-color: #7f1d1d; }
|
||||
[data-theme="dark"] .banner-expired .alert-banner-title { color: #fca5a5; }
|
||||
[data-theme="dark"] .banner-expired .alert-banner-counter { color: #f87171; }
|
||||
[data-theme="dark"] .alert-banner.banner-expiring { background: #1c1300; border-color: #78350f; }
|
||||
[data-theme="dark"] .banner-expiring .alert-banner-title { color: #fdba74; }
|
||||
[data-theme="dark"] .banner-expiring .alert-banner-counter { color: #fb923c; }
|
||||
[data-theme="dark"] .alert-banner.banner-expired-ok { background: #0f2a1a; border-color: #166534; }
|
||||
[data-theme="dark"] .banner-expired-ok .alert-banner-title { color: #86efac; }
|
||||
[data-theme="dark"] .banner-expired-ok .alert-banner-counter { color: #4ade80; }
|
||||
[data-theme="dark"] .alert-banner.banner-expired-warning { background: #1c1300; border-color: #78350f; }
|
||||
[data-theme="dark"] .banner-expired-warning .alert-banner-title { color: #fde68a; }
|
||||
[data-theme="dark"] .banner-expired-warning .alert-banner-counter { color: #fcd34d; }
|
||||
[data-theme="dark"] .alert-banner.banner-expired-danger { background: #2a0808; border-color: #7f1d1d; border-width: 2px; }
|
||||
[data-theme="dark"] .banner-expired-danger .alert-banner-title { color: #fca5a5; }
|
||||
[data-theme="dark"] .alert-banner.banner-prediction { background: #1a1040; border-color: #6d28d9; }
|
||||
[data-theme="dark"] .banner-prediction .alert-banner-title { color: #c4b5fd; }
|
||||
[data-theme="dark"] .banner-prediction .alert-banner-counter { color: #a78bfa; }
|
||||
[data-theme="dark"] .alert-banner.banner-anomaly { background: #1a1200; border-color: #c2410c; }
|
||||
[data-theme="dark"] .banner-anomaly .alert-banner-title { color: #fdba74; }
|
||||
[data-theme="dark"] .alert-banner.banner-no-expiry { background: #0f2a1a; border-color: #166534; }
|
||||
[data-theme="dark"] .banner-no-expiry .alert-banner-title { color: #86efac; }
|
||||
|
||||
/* ── Alert banner: default text & close ── */
|
||||
[data-theme="dark"] .alert-banner-title { color: #e2e8f0; }
|
||||
[data-theme="dark"] .alert-banner-detail { color: #94a3b8; }
|
||||
[data-theme="dark"] .alert-banner-close { color: #94a3b8; background: rgba(255,255,255,0.06); }
|
||||
[data-theme="dark"] .banner-safety-warning { color: #fdba74; }
|
||||
[data-theme="dark"] .banner-safety-ok { color: #86efac; }
|
||||
[data-theme="dark"] .banner-safety-danger { color: #fca5a5; }
|
||||
|
||||
/* ── Banner action buttons ── */
|
||||
[data-theme="dark"] .btn-banner-ok { background: #0f2a1a; color: #86efac; }
|
||||
[data-theme="dark"] .btn-banner-edit { background: #1a1040; color: #c4b5fd; }
|
||||
[data-theme="dark"] .btn-banner-ai { background: #2e1a4a; color: #c4b5fd; }
|
||||
[data-theme="dark"] .btn-banner-weigh { background: #2e1a4a; color: #c4b5fd; }
|
||||
[data-theme="dark"] .btn-banner-confirm { background: #0f2a1a; color: #86efac; }
|
||||
[data-theme="dark"] .btn-banner-use { background: #0c2a4e; color: #7dd3fc; }
|
||||
[data-theme="dark"] .btn-banner-throw { background: #2a0808; color: #fca5a5; }
|
||||
[data-theme="dark"] .btn-banner-throw-primary { background: #dc2626; color: #fff; }
|
||||
[data-theme="dark"] .btn-banner-use-danger { background: #1e293b; color: #64748b; }
|
||||
[data-theme="dark"] .btn-banner-vacuum { background: #2e1a4a; color: #c4b5fd; }
|
||||
[data-theme="dark"] .btn-banner-edit2 { background: #0c2a4e; color: #7dd3fc; }
|
||||
|
||||
/* ── Review items ── */
|
||||
[data-theme="dark"] .review-item { background: rgba(255,255,255,0.04); }
|
||||
[data-theme="dark"] .review-item-meta { color: #94a3b8; }
|
||||
[data-theme="dark"] .review-warn { color: #fca5a5; }
|
||||
[data-theme="dark"] .review-qty-value { background: #2a0808; color: #fca5a5; }
|
||||
[data-theme="dark"] .btn-review-ok { background: #0f2a1a; color: #86efac; }
|
||||
[data-theme="dark"] .btn-review-ok:active { background: #0d2416; }
|
||||
[data-theme="dark"] .btn-review-edit { background: #1a1040; color: #c4b5fd; }
|
||||
[data-theme="dark"] .btn-review-edit:active { background: #140d36; }
|
||||
|
||||
/* ── Chat UI ── */
|
||||
[data-theme="dark"] .chat-header-bar { background: var(--bg-card); border-color: var(--border); }
|
||||
[data-theme="dark"] .chat-title { color: #818cf8; }
|
||||
[data-theme="dark"] .chat-suggestion { background: #1a1040; border-color: #3730a3; color: #a5b4fc; }
|
||||
[data-theme="dark"] .chat-suggestion:active { background: #2e1a4a; }
|
||||
[data-theme="dark"] .chat-gemini { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
|
||||
[data-theme="dark"] .chat-gemini strong { color: #818cf8; }
|
||||
[data-theme="dark"] .chat-input-bar { background: var(--bg-card); border-color: var(--border); }
|
||||
|
||||
/* ── Settings status ── */
|
||||
[data-theme="dark"] .settings-status.success { background: #0f2a1a; color: #86efac; }
|
||||
[data-theme="dark"] .settings-status.error { background: #2a0808; color: #fca5a5; }
|
||||
|
||||
/* ── Inventory status bar ── */
|
||||
[data-theme="dark"] .inventory-status-bar {
|
||||
background: linear-gradient(135deg, #0c2a4e 0%, #1a1040 100%);
|
||||
border-color: #1e3a8a;
|
||||
}
|
||||
[data-theme="dark"] .inventory-status-bar .inv-status-title { color: #7dd3fc; }
|
||||
[data-theme="dark"] .inventory-status-bar .inv-status-total { color: #e2e8f0; background: rgba(0,0,0,0.3); }
|
||||
[data-theme="dark"] .inventory-status-bar .inv-status-item { color: #93c5fd; background: rgba(0,0,0,0.2); }
|
||||
|
||||
/* ── Use inventory info ── */
|
||||
[data-theme="dark"] .use-inventory-info { background: #0c2a4e; color: #7dd3fc; }
|
||||
[data-theme="dark"] #use-expiry-hint { background: #2a1e00; border-color: #78350f; color: #fde68a; }
|
||||
[data-theme="dark"] #page-use .product-preview-small { border-left-color: var(--primary); }
|
||||
[data-theme="dark"] #page-action .product-preview-small { border-left-color: var(--primary); }
|
||||
[data-theme="dark"] .action-pill-barcode { background: #1e293b; color: #94a3b8; }
|
||||
[data-theme="dark"] .use-pill-ok { background: #14532d; color: #86efac; }
|
||||
[data-theme="dark"] .use-pill-warn { background: #422006; color: #fde68a; }
|
||||
[data-theme="dark"] .use-pill-soon { background: #431407; color: #fdba74; }
|
||||
[data-theme="dark"] .use-pill-expired { background: #450a0a; color: #fca5a5; }
|
||||
[data-theme="dark"] .use-pill-qty { background: #0c2a4e; color: #7dd3fc; }
|
||||
|
||||
/* ── Recipe components ── */
|
||||
[data-theme="dark"] .recipe-expiry-note { background: #2a1e00; color: #fde68a; }
|
||||
[data-theme="dark"] .recipe-tools-banner { background: #1a1040; border-color: #3730a3; color: #c4b5fd; }
|
||||
[data-theme="dark"] .recipe-tool-chip { background: #2e1a4a; color: #c4b5fd; }
|
||||
[data-theme="dark"] .recipe-subtype-chip { background: #1c1300; border-color: #78350f; color: var(--text); }
|
||||
[data-theme="dark"] .recipe-subtype-chip:has(input:checked) { background: #2a1e00; border-color: #d97706; }
|
||||
|
||||
/* ── Bug report pills ── */
|
||||
[data-theme="dark"] .bug-type-pill { background: var(--bg-card); border-color: var(--border); color: var(--text-light); }
|
||||
|
||||
/* ── Shopping tag menu ── */
|
||||
[data-theme="dark"] .shopping-tag-menu-container { background: #1a2336; }
|
||||
|
||||
/* ── Edit unknown card ── */
|
||||
[data-theme="dark"] .edit-unknown-card.highlight { background: #1c1300; border-color: var(--warning); }
|
||||
|
||||
/* ── AI match image ── */
|
||||
[data-theme="dark"] .ai-match-img { background: var(--bg-card); }
|
||||
|
||||
/* ── Inline edit button ── */
|
||||
[data-theme="dark"] .btn-edit-inline { background: rgba(30,41,59,0.92); border-color: var(--border); color: var(--text); }
|
||||
|
||||
/* ── Setup wizard ── */
|
||||
[data-theme="dark"] .setup-body p { color: var(--text-muted); }
|
||||
[data-theme="dark"] .setup-footer { border-color: var(--border); }
|
||||
[data-theme="dark"] .setup-skip-link { color: var(--text-muted); }
|
||||
[data-theme="dark"] .setup-skip-link:hover { color: var(--text-light); }
|
||||
|
||||
/* ── Appliance remove active ── */
|
||||
[data-theme="dark"] .appliance-item .appliance-remove:active { background: #2a0808; }
|
||||
|
||||
/* ===== NETWORK ERROR OVERLAY ===== */
|
||||
#network-error-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(6, 8, 20, 0.97);
|
||||
z-index: 300000; /* highest: above screensaver(10000), cooking(99999), preloader(200000) */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
transition: opacity 0.4s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
#network-error-overlay.visible {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.net-error-body {
|
||||
text-align: center;
|
||||
padding: 2.5rem 2rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.net-error-icon {
|
||||
font-size: 5.5rem;
|
||||
line-height: 1;
|
||||
margin-bottom: 1.75rem;
|
||||
animation: net-pulse 2.2s ease-in-out infinite;
|
||||
display: block;
|
||||
filter: drop-shadow(0 0 32px rgba(248, 113, 113, 0.35));
|
||||
}
|
||||
#network-error-overlay.restored .net-error-icon {
|
||||
animation: none;
|
||||
filter: drop-shadow(0 0 32px rgba(74, 222, 128, 0.45));
|
||||
}
|
||||
#network-error-overlay.checking .net-error-icon {
|
||||
animation: net-spin 1.2s linear infinite;
|
||||
}
|
||||
@keyframes net-pulse {
|
||||
0%, 100% { opacity: 0.45; transform: scale(0.92); }
|
||||
50% { opacity: 1; transform: scale(1.06); }
|
||||
}
|
||||
@keyframes net-spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
.net-error-title {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 700;
|
||||
color: #f87171;
|
||||
margin-bottom: 0.75rem;
|
||||
letter-spacing: -0.02em;
|
||||
transition: color 0.4s;
|
||||
}
|
||||
#network-error-overlay.restored .net-error-title {
|
||||
color: #4ade80;
|
||||
}
|
||||
.net-error-subtitle {
|
||||
font-size: 1.1rem;
|
||||
color: #94a3b8;
|
||||
max-width: 420px;
|
||||
line-height: 1.6;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.net-error-status {
|
||||
margin-top: 1.5rem;
|
||||
font-size: 0.88rem;
|
||||
color: #475569;
|
||||
min-height: 1.3em;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
/* "Continue in offline mode" button — appears after 3 s */
|
||||
.net-error-continue-btn {
|
||||
margin-top: 2.2rem;
|
||||
background: rgba(255,255,255,0.07);
|
||||
border: 1px solid rgba(255,255,255,0.22);
|
||||
color: #94a3b8;
|
||||
border-radius: 10px;
|
||||
padding: 0.7rem 1.6rem;
|
||||
font-size: 0.92rem;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s, color 0.2s, transform 0.3s, opacity 0.3s;
|
||||
opacity: 0;
|
||||
transform: translateY(8px);
|
||||
}
|
||||
.net-error-continue-btn.visible {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
.net-error-continue-btn:hover {
|
||||
background: rgba(255,255,255,0.16);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
/* ─── Offline mode: hide AI and network-dependent UI ────────────────────────
|
||||
Sections that require a live server response or AI are hidden so the user
|
||||
isn't confronted with empty/broken widgets while offline. */
|
||||
body.offline-mode #waste-chart-section,
|
||||
body.offline-mode #nutrition-section,
|
||||
body.offline-mode #quick-recipe-bar,
|
||||
body.offline-mode .header-gemini-btn,
|
||||
body.offline-mode #btn-suggest,
|
||||
body.offline-mode #btn-fetch-prices,
|
||||
body.offline-mode .recipe-generate-btn {
|
||||
display: none !important;
|
||||
}
|
||||
/* Smart-shopping AI section: show as disabled rather than disappearing entirely */
|
||||
body.offline-mode #smart-shopping {
|
||||
opacity: 0.45;
|
||||
pointer-events: none;
|
||||
filter: grayscale(0.6);
|
||||
}
|
||||
|
||||
+2097
-251
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"2026-05": {
|
||||
"input_tokens": 4438300,
|
||||
"output_tokens": 1286760,
|
||||
"calls": 8374,
|
||||
"by_action": {},
|
||||
"by_model": {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"ts":1779204302,"filename":"evershelf_2026-05-19_1525.db","size_kb":444}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" standalone='no'?>
|
||||
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
||||
<service-group>
|
||||
<name replace-wildcards="yes">EverShelf Pantry (%h)</name>
|
||||
<service>
|
||||
<type>_evershelf._tcp</type>
|
||||
<port>80</port>
|
||||
<txt-record>path=/api/</txt-record>
|
||||
<txt-record>version=1.0</txt-record>
|
||||
<txt-record>app=evershelf</txt-record>
|
||||
</service>
|
||||
</service-group>
|
||||
@@ -0,0 +1,219 @@
|
||||
# Home Assistant Integration
|
||||
|
||||
EverShelf integrates natively with [Home Assistant](https://www.home-assistant.io/) to bring your pantry data into your smart-home automations.
|
||||
|
||||
**Capabilities:**
|
||||
- 📡 **REST sensors** — expose pantry counts as HA sensor entities (expiring, expired, shopping list, total items)
|
||||
- 🔔 **Webhooks** — trigger HA automations on pantry events (expiry alerts, shopping additions, stock updates)
|
||||
- 📣 **Push notifications** — send alerts to your phone via any HA `notify.*` service
|
||||
- 🔊 **TTS on smart speakers** — read recipe steps aloud on any HA `media_player` entity
|
||||
- ⚙️ **In-app config panel** — configure everything from Settings → 🏠 tab (no need to edit `.env` manually)
|
||||
|
||||
---
|
||||
|
||||
## Quick Setup
|
||||
|
||||
1. **Generate a Long-Lived Access Token** in Home Assistant:
|
||||
- Open HA → your **Profile** (bottom-left avatar) → **Security** → **Long-Lived Access Tokens** → **Create Token**
|
||||
- Copy the generated token — you won't see it again.
|
||||
|
||||
2. **Open EverShelf Settings** → tab **🏠 Home Assistant**.
|
||||
|
||||
3. Fill in **Home Assistant URL** (e.g. `http://homeassistant.local:8123`) and paste the token.
|
||||
|
||||
4. Click **Test connection** — you should see ✅.
|
||||
|
||||
5. Enable the features you want (TTS, Webhooks, REST Sensors) and click **Save HA settings**.
|
||||
|
||||
---
|
||||
|
||||
## REST Sensors
|
||||
|
||||
Add EverShelf pantry data as native HA sensor entities that update automatically.
|
||||
|
||||
### Endpoints
|
||||
|
||||
| URL | Returns | Sensor |
|
||||
|-----|---------|--------|
|
||||
| `/api/?action=ha_sensor` | Items expiring soon (≤3 days) | `sensor.evershelf_overview` |
|
||||
| `/api/?action=ha_sensor&sensor=expired` | Expired items count | `sensor.evershelf_expired` |
|
||||
| `/api/?action=ha_sensor&sensor=shopping` | Shopping list item count | `sensor.evershelf_shopping` |
|
||||
| `/api/?action=ha_sensor&sensor=total` | Total pantry items | `sensor.evershelf_total` |
|
||||
|
||||
### Generate & Copy YAML
|
||||
|
||||
In Settings → 🏠 Home Assistant → **REST Sensors** card, click **Copy YAML** to get a ready-to-paste `configuration.yaml` block that already contains your EverShelf URL.
|
||||
|
||||
### Manual YAML example
|
||||
|
||||
```yaml
|
||||
# configuration.yaml
|
||||
sensor:
|
||||
- platform: rest
|
||||
name: "EverShelf Overview"
|
||||
unique_id: evershelf_overview
|
||||
resource: "http://YOUR_EVERSHELF_URL/api/?action=ha_sensor"
|
||||
scan_interval: 300 # seconds
|
||||
value_template: "{{ value_json.state }}"
|
||||
json_attributes:
|
||||
- expiring_soon
|
||||
- expiring_3d
|
||||
- expired_items
|
||||
- total_items
|
||||
- shopping_items
|
||||
- expiring_list
|
||||
- last_updated
|
||||
unit_of_measurement: "items"
|
||||
|
||||
- platform: rest
|
||||
name: "EverShelf Shopping Count"
|
||||
unique_id: evershelf_shopping
|
||||
resource: "http://YOUR_EVERSHELF_URL/api/?action=ha_sensor&sensor=shopping"
|
||||
scan_interval: 180
|
||||
value_template: "{{ value_json.state }}"
|
||||
unit_of_measurement: "items"
|
||||
```
|
||||
|
||||
Restart Home Assistant after editing `configuration.yaml`.
|
||||
|
||||
---
|
||||
|
||||
## Webhook Automations
|
||||
|
||||
EverShelf fires an HTTP POST to your HA webhook URL when pantry events occur.
|
||||
|
||||
### Create the HA Webhook Automation
|
||||
|
||||
1. HA → **Settings** → **Automations & Scenes** → **Create Automation**
|
||||
2. Click **Add Trigger** → choose **Webhook**
|
||||
3. HA generates a **Webhook ID** — copy it
|
||||
4. Paste the ID into **Settings → 🏠 Home Assistant → Webhook ID**
|
||||
5. Select which events should trigger the webhook
|
||||
|
||||
### Supported Events
|
||||
|
||||
| Event key | When it fires |
|
||||
|-----------|--------------|
|
||||
| `expiry` | Daily cron — items expiring within `HA_EXPIRY_DAYS` days |
|
||||
| `shopping_add` | Item added to the shopping list |
|
||||
| `stock_update` | Inventory quantity changed |
|
||||
| `barcode_scan` | (reserved for future use) |
|
||||
|
||||
### Webhook Payload (POST body)
|
||||
|
||||
```json
|
||||
{
|
||||
"event": "expiry_alert",
|
||||
"timestamp": "2025-06-12T08:00:00+00:00",
|
||||
"data": {
|
||||
"type": "expiring_soon",
|
||||
"count": 3,
|
||||
"days": 3,
|
||||
"summary": "3 products expiring within 3 days",
|
||||
"items": [
|
||||
{ "name": "Milk", "expiry_date": "2025-06-14", "quantity": 1, "unit": "l" }
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Example: Expiry Alert → Telegram
|
||||
|
||||
```yaml
|
||||
alias: EverShelf Expiry Alert
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: "evershelf_webhook_abc123" # ← your Webhook ID
|
||||
action:
|
||||
- service: notify.telegram_bot
|
||||
data:
|
||||
message: >
|
||||
🥫 EverShelf: {{ trigger.json.data.summary }}
|
||||
{% for item in trigger.json.data.items %}
|
||||
— {{ item.name }} (expires {{ item.expiry_date }})
|
||||
{% endfor %}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Push Notifications
|
||||
|
||||
If you prefer to receive push alerts without using webhooks, configure a **HA notify service** directly:
|
||||
|
||||
1. Find your notify service name in HA: **Developer Tools → Services** → search `notify`
|
||||
2. Paste it into **Settings → 🏠 → Notify service** (e.g. `notify.mobile_app_my_phone`)
|
||||
3. Save
|
||||
|
||||
EverShelf will call this service from the cron job whenever expiry alerts fire.
|
||||
|
||||
---
|
||||
|
||||
## TTS on Smart Speakers
|
||||
|
||||
Read recipe steps aloud on an Amazon Echo, Google Home, Sonos, or any HA `media_player`.
|
||||
|
||||
### Configuration
|
||||
|
||||
1. Enter the **Entity ID** of your media player (e.g. `media_player.kitchen_display`)
|
||||
- Find it in HA: **Developer Tools → States**
|
||||
2. Click **Apply HA preset to TTS tab** — this auto-fills the TTS tab with the correct HA endpoint and auth headers
|
||||
3. Save settings
|
||||
|
||||
### How it Works
|
||||
|
||||
When recipe step TTS is triggered, EverShelf calls:
|
||||
|
||||
```
|
||||
POST /api/services/tts/speak
|
||||
Authorization: Bearer <HA_TOKEN>
|
||||
{
|
||||
"entity_id": "media_player.kitchen_display",
|
||||
"message": "Add 200 g of flour and mix well."
|
||||
}
|
||||
```
|
||||
|
||||
The request is proxied through the EverShelf PHP backend (avoids CORS / mixed-content issues).
|
||||
|
||||
---
|
||||
|
||||
## Environment Variables Reference
|
||||
|
||||
All settings are configurable from `.env` or from the in-app Settings panel.
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `HA_ENABLED` | `false` | Master switch for all HA features |
|
||||
| `HA_URL` | _(empty)_ | Base URL of HA instance, no trailing slash |
|
||||
| `HA_TOKEN` | _(empty)_ | Long-Lived Access Token |
|
||||
| `HA_TTS_ENTITY` | _(empty)_ | `media_player` entity for TTS |
|
||||
| `HA_WEBHOOK_ID` | _(empty)_ | Webhook trigger ID from HA automation |
|
||||
| `HA_WEBHOOK_EVENTS` | `expiry,shopping_add,stock_update` | Comma-separated list of events |
|
||||
| `HA_NOTIFY_SERVICE` | _(empty)_ | HA notify service (e.g. `notify.mobile_app_phone`) |
|
||||
| `HA_EXPIRY_DAYS` | `3` | Days before expiry to trigger the daily alert |
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**Test shows ❌ "Connection failed"**
|
||||
- Verify the URL is reachable from the EverShelf server (not just your browser)
|
||||
- If using HTTPS with a self-signed certificate, the server-side cURL request may fail — use HTTP on the local network instead
|
||||
- Check that port 8123 (or your custom port) is open on the HA host
|
||||
|
||||
**Test shows ❌ "bad_token"**
|
||||
- The Long-Lived Access Token may have expired or been revoked — generate a new one in HA Profile
|
||||
|
||||
**Webhook not firing**
|
||||
- Confirm HA_ENABLED=true and the Webhook ID is exactly as shown in HA
|
||||
- Check the EverShelf cron is running (`/api/cron_smart_shopping.php` every 5 minutes)
|
||||
- For shopping/stock events: verify the event name is in `HA_WEBHOOK_EVENTS`
|
||||
|
||||
**TTS not speaking**
|
||||
- Ensure the media player entity is online in HA (check its state in Developer Tools)
|
||||
- Try the "Apply HA preset to TTS tab" button and send a test from the TTS tab
|
||||
- Check HA logs for `tts.speak` errors (some platforms require `tts_options`)
|
||||
|
||||
**Sensors show unavailable in HA**
|
||||
- The EverShelf URL must be reachable from the HA host
|
||||
- If running EverShelf behind a reverse proxy, ensure `/api/` is accessible
|
||||
- Use `scan_interval` ≥ 60 to avoid hammering the server
|
||||
@@ -5,14 +5,14 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace = "it.dadaloop.evershelf.kiosk"
|
||||
compileSdk = 34
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "it.dadaloop.evershelf.kiosk"
|
||||
minSdk = 24
|
||||
targetSdk = 34
|
||||
versionCode = 16
|
||||
versionName = "1.7.15"
|
||||
targetSdk = 35
|
||||
versionCode = 18
|
||||
versionName = "1.7.17"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
||||
@@ -113,7 +113,9 @@ class KioskActivity : AppCompatActivity() {
|
||||
private const val KEY_SCREENSAVER = "screensaver_enabled"
|
||||
private const val KIOSK_DOWNLOAD_URL = "https://github.com/dadaloop82/EverShelf/releases/download/kiosk-latest/evershelf-kiosk.apk"
|
||||
private const val SPLASH_DURATION = 1500L
|
||||
private const val GITHUB_RELEASES_API = "https://api.github.com/repos/dadaloop82/EverShelf/releases/latest"
|
||||
// Use the kiosk-specific rolling release tag so version comparison is always
|
||||
// against the KIOSK version, not the webapp version (they diverge).
|
||||
private const val GITHUB_RELEASES_API = "https://api.github.com/repos/dadaloop82/EverShelf/releases/tags/kiosk-latest"
|
||||
// Keys for persisting a pending update across restarts
|
||||
private const val KEY_PENDING_UPDATE_VERSION = "pending_update_version"
|
||||
private const val KEY_PENDING_UPDATE_URL = "pending_update_url"
|
||||
@@ -627,10 +629,16 @@ class KioskActivity : AppCompatActivity() {
|
||||
packageManager.getPackageInfo(packageName, 0).versionName ?: ""
|
||||
} catch (_: Exception) { "" }
|
||||
|
||||
// Strip any non-numeric prefix so "kiosk-1.7.0", "v1.7.0", "kiosk-v1.7.1"
|
||||
// all normalise to "1.7.0" / "1.7.1" for comparison.
|
||||
// The kiosk-latest release uses a non-semver tag ("kiosk-latest").
|
||||
// Extract the actual kiosk version from the release body text.
|
||||
// Body format: "Alias automatico → kiosk-X.Y.Z" or just "kiosk-X.Y.Z".
|
||||
// Fall back to stripping the tag prefix if body parsing fails.
|
||||
val bodyText = json.optString("body", "")
|
||||
val norm = { v: String -> v.replace(Regex("^[^0-9]*"), "") }
|
||||
val isSemver = norm(latestTag).matches(Regex("\\d+\\.\\d+.*"))
|
||||
val remoteKioskVersion = Regex("""kiosk-v?(\d+\.\d+(?:\.\d+)?)""")
|
||||
.find(bodyText)?.groupValues?.get(1)
|
||||
?.takeIf { it.isNotEmpty() }
|
||||
?: norm(latestTag)
|
||||
|
||||
// Compare semver: returns true if `remote` is strictly greater than `local`
|
||||
fun semverNewer(remote: String, local: String): Boolean {
|
||||
@@ -645,29 +653,31 @@ class KioskActivity : AppCompatActivity() {
|
||||
return false
|
||||
}
|
||||
|
||||
val isSemver = remoteKioskVersion.matches(Regex("\\d+\\.\\d+.*"))
|
||||
|
||||
// Get APK URL from assets; fall back to the hardcoded KIOSK_DOWNLOAD_URL
|
||||
val assets = json.optJSONArray("assets")
|
||||
var kioskApkUrl = ""
|
||||
if (assets != null) {
|
||||
for (i in 0 until assets.length()) {
|
||||
val a = assets.getJSONObject(i)
|
||||
val name = a.optString("name", "").lowercase()
|
||||
val url = a.optString("browser_download_url", "")
|
||||
if (name.contains("kiosk") && url.isNotEmpty()) kioskApkUrl = url
|
||||
if (url.endsWith(".apk", ignoreCase = true) && url.isNotEmpty()) {
|
||||
kioskApkUrl = url; break
|
||||
}
|
||||
}
|
||||
}
|
||||
if (kioskApkUrl.isEmpty()) kioskApkUrl = KIOSK_DOWNLOAD_URL
|
||||
|
||||
// Only flag an update when the remote tag is parseable as semver AND
|
||||
// the remote version is strictly greater than the installed version.
|
||||
// Non-semver tags (e.g. "kiosk-latest", "rolling") cannot be compared
|
||||
// numerically → treat as "no update" to avoid false positives.
|
||||
val kioskNeedsUpdate = currentKiosk.isNotEmpty() &&
|
||||
isSemver && semverNewer(norm(latestTag), norm(currentKiosk))
|
||||
// Only flag an update when the remote version is parseable as semver AND
|
||||
// strictly greater than the installed version.
|
||||
val kioskNeedsUpdate = currentKiosk.isNotEmpty() && isSemver &&
|
||||
semverNewer(remoteKioskVersion, currentKiosk)
|
||||
|
||||
val result = JSONObject()
|
||||
.put("has_update", kioskNeedsUpdate)
|
||||
.put("current", currentKiosk)
|
||||
.put("latest", latestTag)
|
||||
.put("latest", remoteKioskVersion)
|
||||
.put("apk_url", kioskApkUrl)
|
||||
|
||||
notifyJs(result)
|
||||
@@ -680,12 +690,11 @@ class KioskActivity : AppCompatActivity() {
|
||||
|
||||
// Persist the pending update so the banner reappears after a crash/restart
|
||||
prefs.edit()
|
||||
.putString(KEY_PENDING_UPDATE_VERSION, latestTag)
|
||||
.putString(KEY_PENDING_UPDATE_VERSION, remoteKioskVersion)
|
||||
.putString(KEY_PENDING_UPDATE_URL, kioskApkUrl)
|
||||
.apply()
|
||||
|
||||
val label = if (isSemver) "$currentKiosk → $latestTag" else latestTag
|
||||
runOnUiThread { showNativeUpdateBanner("🔄 Kiosk $label", kioskApkUrl) }
|
||||
runOnUiThread { showNativeUpdateBanner("🔄 Kiosk $currentKiosk → $remoteKioskVersion", kioskApkUrl) }
|
||||
} catch (e: Exception) {
|
||||
notifyJs(JSONObject().put("has_update", false).put("error", e.message ?: "network error"))
|
||||
}
|
||||
@@ -765,7 +774,13 @@ class KioskActivity : AppCompatActivity() {
|
||||
val q = DownloadManager.Query().setFilterById(downloadId)
|
||||
val c = (getSystemService(DOWNLOAD_SERVICE) as DownloadManager).query(q)
|
||||
var ok = false
|
||||
if (c.moveToFirst()) ok = c.getInt(c.getColumnIndexOrThrow(DownloadManager.COLUMN_STATUS)) == DownloadManager.STATUS_SUCCESSFUL
|
||||
var dmStatus = -1
|
||||
var dmReason = -1
|
||||
if (c.moveToFirst()) {
|
||||
dmStatus = c.getInt(c.getColumnIndexOrThrow(DownloadManager.COLUMN_STATUS))
|
||||
dmReason = c.getInt(c.getColumnIndexOrThrow(DownloadManager.COLUMN_REASON))
|
||||
ok = dmStatus == DownloadManager.STATUS_SUCCESSFUL
|
||||
}
|
||||
c.close()
|
||||
if (ok) {
|
||||
pollHandler.removeCallbacksAndMessages(null); activeDownloadId = -1
|
||||
@@ -775,7 +790,12 @@ class KioskActivity : AppCompatActivity() {
|
||||
pollHandler.removeCallbacksAndMessages(null); activeDownloadId = -1
|
||||
setInstallUI("\u274C", getString(R.string.install_error_download), getString(R.string.install_error_download_detail), 0xFFf87171.toInt(), btnEnabled = true, progress = -2)
|
||||
runOnUiThread { activeInstallBtn?.text = getString(R.string.install_btn_retry) }
|
||||
ErrorReporter.reportMessage("install_download_failed", "DownloadManager returned failure for URL: $apkUrl")
|
||||
ErrorReporter.reportMessage(
|
||||
"install_download_failed",
|
||||
"DownloadManager returned failure for URL: $apkUrl",
|
||||
mapOf("dm_status" to dmStatus, "dm_reason" to dmReason,
|
||||
"device" to buildDeviceLabel())
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -802,6 +822,52 @@ class KioskActivity : AppCompatActivity() {
|
||||
file.delete()
|
||||
return
|
||||
}
|
||||
// ── Pre-install validation via PackageManager ──────────────────────
|
||||
// This catches version-downgrade or same-version attempts before PackageInstaller
|
||||
// gets them (which would silently fail with STATUS_FAILURE=1 on many OEMs).
|
||||
@Suppress("DEPRECATION")
|
||||
val apkInfo = try { packageManager.getPackageArchiveInfo(file.absolutePath, 0) } catch (_: Exception) { null }
|
||||
if (apkInfo != null) {
|
||||
// Wrong package: would always fail with STATUS_FAILURE=1
|
||||
if (apkInfo.packageName != packageName) {
|
||||
val detail = "APK package=${apkInfo.packageName}, expected=$packageName"
|
||||
setInstallUI("\u274C", "APK non valido", detail, 0xFFf87171.toInt(), btnEnabled = true, progress = -2)
|
||||
runOnUiThread { activeInstallBtn?.text = getString(R.string.install_btn_retry) }
|
||||
ErrorReporter.reportMessage("install_wrong_package", detail, mapOf("apk_pkg" to apkInfo.packageName, "expected" to packageName), forceReport = true)
|
||||
file.delete()
|
||||
return
|
||||
}
|
||||
// Version downgrade or same versionCode: Android rejects it
|
||||
@Suppress("DEPRECATION")
|
||||
val apkVc: Long = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
|
||||
apkInfo.longVersionCode
|
||||
else
|
||||
apkInfo.versionCode.toLong()
|
||||
val installedVc: Long = try {
|
||||
@Suppress("DEPRECATION")
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
|
||||
packageManager.getPackageInfo(packageName, 0).longVersionCode
|
||||
else
|
||||
packageManager.getPackageInfo(packageName, 0).versionCode.toLong()
|
||||
} catch (_: Exception) { -1L }
|
||||
|
||||
if (installedVc >= 0 && apkVc <= installedVc) {
|
||||
// Same or older version — no real update, dismiss banner silently
|
||||
runOnUiThread {
|
||||
updateBanner.visibility = View.GONE
|
||||
bannerProgressBar.visibility = View.GONE
|
||||
prefs.edit().remove(KEY_PENDING_UPDATE_VERSION).remove(KEY_PENDING_UPDATE_URL).apply()
|
||||
}
|
||||
ErrorReporter.reportMessage(
|
||||
"install_no_upgrade",
|
||||
"APK versionCode=$apkVc (${apkInfo.versionName}) ≤ installed=$installedVc — not an upgrade",
|
||||
mapOf("apk_vc" to apkVc, "apk_ver" to (apkInfo.versionName ?: ""), "installed_vc" to installedVc),
|
||||
forceReport = true
|
||||
)
|
||||
file.delete()
|
||||
return
|
||||
}
|
||||
}
|
||||
// Only kiosk self-update is handled; gateway is now integrated
|
||||
val targetPkg = packageName
|
||||
installWithPackageInstaller(file, targetPkg)
|
||||
@@ -813,6 +879,11 @@ class KioskActivity : AppCompatActivity() {
|
||||
val params = PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL)
|
||||
// Note: setAppPackageName() is intentionally omitted — it causes STATUS_FAILURE (1)
|
||||
// on some OEM/Android versions even when the package name is correct.
|
||||
// setInstallReason is required on Android 14+ (API 34+) for PackageInstaller
|
||||
// to accept self-updates; without it Android 16 returns STATUS_FAILURE=1.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
params.setInstallReason(android.content.pm.PackageManager.INSTALL_REASON_USER)
|
||||
}
|
||||
val sessionId = pi.createSession(params)
|
||||
val session = pi.openSession(sessionId)
|
||||
try {
|
||||
|
||||
@@ -58,8 +58,10 @@ import javax.net.ssl.X509TrustManager
|
||||
* 2 — Permissions rationale + grant
|
||||
* 3 — Server URL + auto-discovery + connection test
|
||||
* 4 — Smart scale question → gateway info + install
|
||||
* 5 — Screensaver toggle (NEW)
|
||||
* 6 — Done
|
||||
* 5 — Features (screensaver / prices / meal-plan / zero-waste)
|
||||
* 6 — Gemini AI key (optional, auto-skipped if already set)
|
||||
* 7 — Bring! credentials (optional, auto-skipped if already set)
|
||||
* 8 — Done
|
||||
*/
|
||||
class SetupActivity : AppCompatActivity() {
|
||||
|
||||
@@ -73,6 +75,8 @@ class SetupActivity : AppCompatActivity() {
|
||||
private lateinit var stepServer: LinearLayout
|
||||
private lateinit var stepScale: LinearLayout
|
||||
private lateinit var stepScreensaver: LinearLayout
|
||||
private lateinit var stepGemini: LinearLayout
|
||||
private lateinit var stepBring: LinearLayout
|
||||
private lateinit var stepDone: LinearLayout
|
||||
|
||||
// Progress dots
|
||||
@@ -110,6 +114,14 @@ class SetupActivity : AppCompatActivity() {
|
||||
|
||||
// Screensaver step
|
||||
private lateinit var setupSwitchScreensaver: SwitchMaterial
|
||||
private lateinit var setupSwitchPrices: SwitchMaterial
|
||||
private lateinit var setupSwitchMealPlan: SwitchMaterial
|
||||
private lateinit var setupSwitchZeroWaste: SwitchMaterial
|
||||
|
||||
// Gemini + Bring steps
|
||||
private lateinit var setupGeminiKeyEdit: EditText
|
||||
private lateinit var setupBringEmailEdit: EditText
|
||||
private lateinit var setupBringPasswordEdit: EditText
|
||||
|
||||
// Done step
|
||||
private lateinit var summaryText: TextView
|
||||
@@ -128,6 +140,12 @@ class SetupActivity : AppCompatActivity() {
|
||||
private const val KEY_HAS_SCALE = "has_scale"
|
||||
private const val KEY_LANGUAGE = "kiosk_language"
|
||||
private const val KEY_SCREENSAVER = "screensaver_enabled"
|
||||
private const val KEY_PRICE_ENABLED = "price_enabled"
|
||||
private const val KEY_MEAL_PLAN = "meal_plan_enabled"
|
||||
private const val KEY_ZEROWASTE_TIPS = "zerowaste_tips_enabled"
|
||||
private const val KEY_GEMINI_KEY = "gemini_api_key"
|
||||
private const val KEY_BRING_EMAIL = "bring_email"
|
||||
private const val KEY_BRING_PASSWORD = "bring_password"
|
||||
private const val PERMISSION_REQUEST_CODE = 2004
|
||||
private const val BLE_PERMISSION_REQUEST = 2006
|
||||
|
||||
@@ -180,6 +198,9 @@ class SetupActivity : AppCompatActivity() {
|
||||
when (currentStep) {
|
||||
0 -> confirmExit()
|
||||
1 -> showStep(0) // back to language
|
||||
8 -> showStep(7) // done → bring
|
||||
7 -> showStep(6) // bring → gemini
|
||||
6 -> showStep(5) // gemini → features
|
||||
else -> showStep(currentStep - 1)
|
||||
}
|
||||
}
|
||||
@@ -215,8 +236,18 @@ class SetupActivity : AppCompatActivity() {
|
||||
stepServer = findViewById(R.id.stepServer)
|
||||
stepScale = findViewById(R.id.stepScale)
|
||||
stepScreensaver = findViewById(R.id.stepScreensaver)
|
||||
stepGemini = findViewById(R.id.stepGemini)
|
||||
stepBring = findViewById(R.id.stepBring)
|
||||
stepDone = findViewById(R.id.stepDone)
|
||||
|
||||
// Gemini + Bring fields
|
||||
setupGeminiKeyEdit = findViewById(R.id.setupGeminiKeyEdit)
|
||||
setupBringEmailEdit = findViewById(R.id.setupBringEmailEdit)
|
||||
setupBringPasswordEdit = findViewById(R.id.setupBringPasswordEdit)
|
||||
// Pre-fill from saved prefs
|
||||
(prefs.getString(KEY_GEMINI_KEY, "") ?: "").takeIf { it.isNotEmpty() }?.let { setupGeminiKeyEdit.setText(it) }
|
||||
(prefs.getString(KEY_BRING_EMAIL, "") ?: "").takeIf { it.isNotEmpty() }?.let { setupBringEmailEdit.setText(it) }
|
||||
|
||||
// Server step
|
||||
urlEdit = findViewById(R.id.setupUrlEdit)
|
||||
urlStatus = findViewById(R.id.setupUrlStatus)
|
||||
@@ -238,10 +269,17 @@ class SetupActivity : AppCompatActivity() {
|
||||
tvTestWeight = findViewById(R.id.tvTestWeight)
|
||||
testWeightBox = findViewById(R.id.testWeightBox)
|
||||
|
||||
// Screensaver step
|
||||
// Features step — bind all four toggles
|
||||
setupSwitchScreensaver = findViewById(R.id.setupSwitchScreensaver)
|
||||
// Pre-fill saved screensaver pref
|
||||
setupSwitchScreensaver.isChecked = prefs.getBoolean(KEY_SCREENSAVER, false)
|
||||
setupSwitchPrices = findViewById(R.id.setupSwitchPrices)
|
||||
setupSwitchMealPlan = findViewById(R.id.setupSwitchMealPlan)
|
||||
setupSwitchZeroWaste = findViewById(R.id.setupSwitchZeroWaste)
|
||||
// Pre-fill from saved prefs only if each key was previously configured
|
||||
// ("se non sono impostati, chiedi!" — fresh install → all start at false)
|
||||
setupSwitchScreensaver.isChecked = if (prefs.contains(KEY_SCREENSAVER)) prefs.getBoolean(KEY_SCREENSAVER, false) else false
|
||||
setupSwitchPrices.isChecked = if (prefs.contains(KEY_PRICE_ENABLED)) prefs.getBoolean(KEY_PRICE_ENABLED, false) else false
|
||||
setupSwitchMealPlan.isChecked = if (prefs.contains(KEY_MEAL_PLAN)) prefs.getBoolean(KEY_MEAL_PLAN, false) else false
|
||||
setupSwitchZeroWaste.isChecked = if (prefs.contains(KEY_ZEROWASTE_TIPS)) prefs.getBoolean(KEY_ZEROWASTE_TIPS, false) else false
|
||||
|
||||
// Done step
|
||||
summaryText = findViewById(R.id.setupSummaryText)
|
||||
@@ -260,6 +298,8 @@ class SetupActivity : AppCompatActivity() {
|
||||
findViewById<MaterialButton>(R.id.btnLangIt).setOnClickListener { selectLanguage("it") }
|
||||
findViewById<MaterialButton>(R.id.btnLangEn).setOnClickListener { selectLanguage("en") }
|
||||
findViewById<MaterialButton>(R.id.btnLangDe).setOnClickListener { selectLanguage("de") }
|
||||
findViewById<MaterialButton>(R.id.btnLangEs).setOnClickListener { selectLanguage("es") }
|
||||
findViewById<MaterialButton>(R.id.btnLangFr).setOnClickListener { selectLanguage("fr") }
|
||||
|
||||
// ── Welcome ──────────────────────────────────────────────────────
|
||||
findViewById<MaterialButton>(R.id.btnSetupExit).setOnClickListener { confirmExit() }
|
||||
@@ -362,10 +402,10 @@ class SetupActivity : AppCompatActivity() {
|
||||
bleSetupCard.visibility = View.VISIBLE
|
||||
tvSelectedScale.text = ""
|
||||
tvSelectedScale.visibility = View.GONE
|
||||
tvScanStatus.text = "Bilancia non confermata. Riprova la scansione."
|
||||
tvScanStatus.text = getString(R.string.ble_not_confirmed)
|
||||
tvScanStatus.setTextColor(0xFFfbbf24.toInt())
|
||||
btnScanBle.isEnabled = true
|
||||
btnScanBle.text = "🔍 Cerca bilancia"
|
||||
btnScanBle.text = getString(R.string.ble_scan_again)
|
||||
findViewById<MaterialButton>(R.id.btnScaleNext).isEnabled = false
|
||||
}
|
||||
findViewById<MaterialButton>(R.id.btnTestSkip).setOnClickListener {
|
||||
@@ -381,13 +421,38 @@ class SetupActivity : AppCompatActivity() {
|
||||
findViewById<MaterialButton>(R.id.btnScaleNext).isEnabled = true
|
||||
}
|
||||
|
||||
// ── Screensaver ───────────────────────────────────────────────────
|
||||
// ── Features step (screensaver / prices / meal plan / zero-waste) ────
|
||||
findViewById<MaterialButton>(R.id.btnScreensaverBack).setOnClickListener { showStep(4) }
|
||||
findViewById<MaterialButton>(R.id.btnScreensaverNext).setOnClickListener {
|
||||
prefs.edit().putBoolean(KEY_SCREENSAVER, setupSwitchScreensaver.isChecked).apply()
|
||||
prefs.edit()
|
||||
.putBoolean(KEY_SCREENSAVER, setupSwitchScreensaver.isChecked)
|
||||
.putBoolean(KEY_PRICE_ENABLED, setupSwitchPrices.isChecked)
|
||||
.putBoolean(KEY_MEAL_PLAN, setupSwitchMealPlan.isChecked)
|
||||
.putBoolean(KEY_ZEROWASTE_TIPS, setupSwitchZeroWaste.isChecked)
|
||||
.apply()
|
||||
showStep(6)
|
||||
}
|
||||
|
||||
// ── Gemini step ───────────────────────────────────────────────────
|
||||
findViewById<MaterialButton>(R.id.btnGeminiBack).setOnClickListener { showStep(5) }
|
||||
findViewById<MaterialButton>(R.id.btnGeminiSkip).setOnClickListener { showStep(7) }
|
||||
findViewById<MaterialButton>(R.id.btnGeminiNext).setOnClickListener {
|
||||
val key = setupGeminiKeyEdit.text.toString().trim()
|
||||
if (key.isNotEmpty()) prefs.edit().putString(KEY_GEMINI_KEY, key).apply()
|
||||
showStep(7)
|
||||
}
|
||||
|
||||
// ── Bring step ────────────────────────────────────────────────────
|
||||
findViewById<MaterialButton>(R.id.btnBringBack).setOnClickListener { showStep(6) }
|
||||
findViewById<MaterialButton>(R.id.btnBringSkip).setOnClickListener { showStep(8) }
|
||||
findViewById<MaterialButton>(R.id.btnBringNext).setOnClickListener {
|
||||
val email = setupBringEmailEdit.text.toString().trim()
|
||||
val pass = setupBringPasswordEdit.text.toString().trim()
|
||||
if (email.isNotEmpty()) prefs.edit().putString(KEY_BRING_EMAIL, email).apply()
|
||||
if (pass.isNotEmpty()) prefs.edit().putString(KEY_BRING_PASSWORD, pass).apply()
|
||||
showStep(8)
|
||||
}
|
||||
|
||||
// ── Done ──────────────────────────────────────────────────────────
|
||||
findViewById<MaterialButton>(R.id.btnLaunch).setOnClickListener { finishSetup() }
|
||||
}
|
||||
@@ -403,20 +468,27 @@ class SetupActivity : AppCompatActivity() {
|
||||
|
||||
private fun highlightSelectedLang() {
|
||||
val saved = prefs.getString(KEY_LANGUAGE, null) ?: return
|
||||
val (btnIt, btnEn, btnDe) = Triple(
|
||||
findViewById<MaterialButton>(R.id.btnLangIt),
|
||||
findViewById<MaterialButton>(R.id.btnLangEn),
|
||||
findViewById<MaterialButton>(R.id.btnLangDe)
|
||||
)
|
||||
val btnIt = findViewById<MaterialButton>(R.id.btnLangIt)
|
||||
val btnEn = findViewById<MaterialButton>(R.id.btnLangEn)
|
||||
val btnDe = findViewById<MaterialButton>(R.id.btnLangDe)
|
||||
val btnEs = findViewById<MaterialButton>(R.id.btnLangEs)
|
||||
val btnFr = findViewById<MaterialButton>(R.id.btnLangFr)
|
||||
// Add checkmark to selected
|
||||
btnIt.text = if (saved == "it") "✅ 🇮🇹 Italiano" else "🇮🇹 Italiano"
|
||||
btnEn.text = if (saved == "en") "✅ 🇬🇧 English" else "🇬🇧 English"
|
||||
btnDe.text = if (saved == "de") "✅ 🇩🇪 Deutsch" else "🇩🇪 Deutsch"
|
||||
btnEs.text = if (saved == "es") "✅ 🇪🇸 Español" else "🇪🇸 Español"
|
||||
btnFr.text = if (saved == "fr") "✅ 🇫🇷 Français" else "🇫🇷 Français"
|
||||
}
|
||||
|
||||
// ── Step navigation ───────────────────────────────────────────────────
|
||||
|
||||
private fun showStep(step: Int) {
|
||||
// Auto-skip Gemini step if already configured
|
||||
if (step == 6 && !(prefs.getString(KEY_GEMINI_KEY, "") ?: "").isNullOrEmpty()) { showStep(7); return }
|
||||
// Auto-skip Bring step if already configured
|
||||
if (step == 7 && !(prefs.getString(KEY_BRING_EMAIL, "") ?: "").isNullOrEmpty()) { showStep(8); return }
|
||||
|
||||
currentStep = step
|
||||
stepLanguage.visibility = if (step == 0) View.VISIBLE else View.GONE
|
||||
stepWelcome.visibility = if (step == 1) View.VISIBLE else View.GONE
|
||||
@@ -424,7 +496,9 @@ class SetupActivity : AppCompatActivity() {
|
||||
stepServer.visibility = if (step == 3) View.VISIBLE else View.GONE
|
||||
stepScale.visibility = if (step == 4) View.VISIBLE else View.GONE
|
||||
stepScreensaver.visibility = if (step == 5) View.VISIBLE else View.GONE
|
||||
stepDone.visibility = if (step == 6) View.VISIBLE else View.GONE
|
||||
stepGemini.visibility = if (step == 6) View.VISIBLE else View.GONE
|
||||
stepBring.visibility = if (step == 7) View.VISIBLE else View.GONE
|
||||
stepDone.visibility = if (step == 8) View.VISIBLE else View.GONE
|
||||
|
||||
updateProgressDots()
|
||||
|
||||
@@ -460,7 +534,7 @@ class SetupActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
// Build summary when entering done step
|
||||
if (step == 6) buildSummary()
|
||||
if (step == 8) buildSummary()
|
||||
|
||||
// Cancel auto-discover when leaving server step
|
||||
if (step != 3) discoverCancelled.set(true)
|
||||
@@ -471,11 +545,11 @@ class SetupActivity : AppCompatActivity() {
|
||||
|
||||
private fun updateProgressDots() {
|
||||
progressDots.removeAllViews()
|
||||
// Show 5 dots for steps 1-5; step 0 (language) and step 6 (done) have no dots
|
||||
if (currentStep == 0 || currentStep == 6) return
|
||||
val active = currentStep // 1..5
|
||||
// Show 7 dots for steps 1-7; step 0 (language) and step 8 (done) have no dots
|
||||
if (currentStep == 0 || currentStep == 8) return
|
||||
val active = currentStep // 1..7
|
||||
val density = resources.displayMetrics.density
|
||||
for (i in 1..5) {
|
||||
for (i in 1..7) {
|
||||
val dot = View(this)
|
||||
val sizeDp = if (i == active) 10 else 7
|
||||
val px = (sizeDp * density).toInt()
|
||||
@@ -819,7 +893,7 @@ class SetupActivity : AppCompatActivity() {
|
||||
}
|
||||
discoveredDevices.clear()
|
||||
deviceAdapter?.notifyDataSetChanged()
|
||||
tvScanStatus.text = "🔍 Scansione in corso…"
|
||||
tvScanStatus.text = getString(R.string.ble_scanning)
|
||||
tvScanStatus.setTextColor(0xFF94a3b8.toInt())
|
||||
btnScanBle.isEnabled = false
|
||||
mgr.startScan()
|
||||
@@ -832,7 +906,7 @@ class SetupActivity : AppCompatActivity() {
|
||||
tvSelectedScale.text = "✅ ${info.name}"
|
||||
tvSelectedScale.visibility = View.VISIBLE
|
||||
btnScanBle.isEnabled = true
|
||||
btnScanBle.text = "🔄 Scansiona di nuovo"
|
||||
btnScanBle.text = getString(R.string.ble_scan_again)
|
||||
// Start connection test
|
||||
startScaleTest(info)
|
||||
}
|
||||
@@ -845,7 +919,7 @@ class SetupActivity : AppCompatActivity() {
|
||||
scaleTestCard.visibility = View.VISIBLE
|
||||
testWeightBox.visibility = View.GONE
|
||||
step3NextButtons.visibility = View.GONE
|
||||
tvTestStatus.text = "🔗 Connessione a ${info.name}…"
|
||||
tvTestStatus.text = getString(R.string.ble_connecting_to).format(info.name)
|
||||
tvTestStatus.setTextColor(0xFF94a3b8.toInt())
|
||||
tvTestWeight.text = "— g"
|
||||
// Disable confirm/retry until we have data
|
||||
@@ -869,19 +943,19 @@ class SetupActivity : AppCompatActivity() {
|
||||
}
|
||||
override fun onConnecting(device: BluetoothDevice) {
|
||||
if (!isInTestMode) return
|
||||
tvTestStatus.text = "🔗 Connessione in corso…"
|
||||
tvTestStatus.text = getString(R.string.ble_connecting)
|
||||
tvTestStatus.setTextColor(0xFF94a3b8.toInt())
|
||||
}
|
||||
override fun onConnected(deviceName: String) {
|
||||
if (!isInTestMode) return
|
||||
tvTestStatus.text = "⚖️ Connesso! Posiziona un oggetto sulla bilancia…"
|
||||
tvTestStatus.text = getString(R.string.ble_connected)
|
||||
tvTestStatus.setTextColor(0xFF34d399.toInt())
|
||||
testWeightBox.visibility = View.VISIBLE
|
||||
findViewById<MaterialButton>(R.id.btnTestRetry).isEnabled = true
|
||||
}
|
||||
override fun onDisconnected() {
|
||||
if (!isInTestMode) return
|
||||
tvTestStatus.text = "⚠️ Connessione persa. Riprova."
|
||||
tvTestStatus.text = getString(R.string.ble_disconnected)
|
||||
tvTestStatus.setTextColor(0xFFfbbf24.toInt())
|
||||
testWeightBox.visibility = View.GONE
|
||||
testHasWeight = false
|
||||
@@ -896,7 +970,7 @@ class SetupActivity : AppCompatActivity() {
|
||||
"%g ${reading.unit}".format(reading.value)
|
||||
tvTestWeight.text = display
|
||||
testWeightBox.visibility = View.VISIBLE
|
||||
tvTestStatus.text = "Peso ricevuto — coincide con quello sulla bilancia?"
|
||||
tvTestStatus.text = getString(R.string.ble_weight_received)
|
||||
tvTestStatus.setTextColor(0xFF94a3b8.toInt())
|
||||
findViewById<MaterialButton>(R.id.btnTestConfirm).isEnabled = true
|
||||
findViewById<MaterialButton>(R.id.btnTestRetry).isEnabled = true
|
||||
@@ -918,10 +992,10 @@ class SetupActivity : AppCompatActivity() {
|
||||
override fun onScanStopped() {
|
||||
btnScanBle.isEnabled = true
|
||||
if (discoveredDevices.isEmpty()) {
|
||||
tvScanStatus.text = "Nessuna bilancia trovata. Assicurati che sia accesa e vicina, poi riprova."
|
||||
tvScanStatus.text = getString(R.string.ble_no_scale_found)
|
||||
tvScanStatus.setTextColor(0xFFfbbf24.toInt())
|
||||
} else {
|
||||
tvScanStatus.text = "Seleziona la tua bilancia dall'elenco."
|
||||
tvScanStatus.text = getString(R.string.ble_select_from_list)
|
||||
tvScanStatus.setTextColor(0xFF94a3b8.toInt())
|
||||
}
|
||||
}
|
||||
@@ -974,19 +1048,29 @@ class SetupActivity : AppCompatActivity() {
|
||||
val url = prefs.getString(KEY_URL, "") ?: ""
|
||||
val hasScale = prefs.getBoolean(KEY_HAS_SCALE, false)
|
||||
val screensOn = setupSwitchScreensaver.isChecked
|
||||
val pricesOn = setupSwitchPrices.isChecked
|
||||
val mealPlanOn = setupSwitchMealPlan.isChecked
|
||||
val zeroWasteOn = setupSwitchZeroWaste.isChecked
|
||||
val scaleName = bleManager?.getSavedDeviceName()
|
||||
val scaleOk = hasScale && scaleName != null
|
||||
val lang = prefs.getString(KEY_LANGUAGE, "it") ?: "it"
|
||||
val langLabel = when (lang) { "en" -> "English 🇬🇧"; "de" -> "Deutsch 🇩🇪"; else -> "Italiano 🇮🇹" }
|
||||
val langLabel = when (lang) { "en" -> "English 🇬🇧"; "de" -> "Deutsch 🇩🇪"; "es" -> "Español 🇪🇸"; "fr" -> "Français 🇫🇷"; else -> "Italiano 🇮🇹" }
|
||||
val sb = StringBuilder()
|
||||
sb.appendLine("🌐 ${getString(R.string.summary_lang)}: $langLabel")
|
||||
if (url.isNotEmpty()) sb.appendLine("🖥️ Server: $url")
|
||||
sb.appendLine(when {
|
||||
scaleOk -> "✅ Bilancia: $scaleName"
|
||||
hasScale -> "⚠️ Bilancia: da configurare"
|
||||
scaleOk -> getString(R.string.summary_scale_ok).format(scaleName)
|
||||
hasScale -> "⚠️ ${getString(R.string.summary_scale_warn)}"
|
||||
else -> "⏭ ${getString(R.string.summary_scale_skip)}"
|
||||
})
|
||||
sb.appendLine(if (screensOn) "🌙 ${getString(R.string.summary_screensaver_on)}" else "💡 ${getString(R.string.summary_screensaver_off)}")
|
||||
sb.appendLine(if (screensOn) getString(R.string.summary_screensaver_on) else getString(R.string.summary_screensaver_off))
|
||||
if (pricesOn) sb.appendLine(getString(R.string.summary_prices_on))
|
||||
if (mealPlanOn) sb.appendLine(getString(R.string.summary_mealplan_on))
|
||||
if (zeroWasteOn) sb.appendLine(getString(R.string.summary_zerowaste_on))
|
||||
val geminiSet = !(prefs.getString(KEY_GEMINI_KEY, "") ?: "").isNullOrEmpty()
|
||||
val bringSet = !(prefs.getString(KEY_BRING_EMAIL, "") ?: "").isNullOrEmpty()
|
||||
sb.appendLine(if (geminiSet) getString(R.string.summary_gemini_set) else getString(R.string.summary_gemini_skip))
|
||||
sb.appendLine(if (bringSet) getString(R.string.summary_bring_set) else getString(R.string.summary_bring_skip))
|
||||
summaryText.text = sb.toString().trimEnd()
|
||||
}
|
||||
|
||||
@@ -996,17 +1080,27 @@ class SetupActivity : AppCompatActivity() {
|
||||
if (baseUrl.isNotEmpty()) {
|
||||
val hasScale = prefs.getBoolean(KEY_HAS_SCALE, false) && (bleManager?.getSavedDeviceAddress() != null)
|
||||
val screensaver = prefs.getBoolean(KEY_SCREENSAVER, false)
|
||||
val priceEnabled = prefs.getBoolean(KEY_PRICE_ENABLED, false)
|
||||
val mealPlan = prefs.getBoolean(KEY_MEAL_PLAN, false)
|
||||
val zeroWaste = prefs.getBoolean(KEY_ZEROWASTE_TIPS, false)
|
||||
Thread {
|
||||
try {
|
||||
val url = "$baseUrl/api/index.php?action=save_settings"
|
||||
val geminiKey = prefs.getString(KEY_GEMINI_KEY, "") ?: ""
|
||||
val bringEmail = prefs.getString(KEY_BRING_EMAIL, "") ?: ""
|
||||
val bringPassword = prefs.getString(KEY_BRING_PASSWORD, "") ?: ""
|
||||
val body = buildString {
|
||||
append("{\"screensaver_enabled\":$screensaver")
|
||||
append(",\"price_enabled\":$priceEnabled")
|
||||
append(",\"meal_plan_enabled\":$mealPlan")
|
||||
append(",\"zerowaste_tips_enabled\":$zeroWaste")
|
||||
if (hasScale) {
|
||||
// Use the tablet's actual LAN IP so the EverShelf server
|
||||
// (potentially on a different machine) can reach the gateway.
|
||||
val lanIp = getDeviceLanIp() ?: "127.0.0.1"
|
||||
append(",\"scale_enabled\":true,\"scale_gateway_url\":\"ws://$lanIp:8765\"")
|
||||
}
|
||||
if (geminiKey.isNotEmpty()) append(",\"gemini_api_key\":\"${geminiKey.replace("\"", "\\\"\")}\"")
|
||||
if (bringEmail.isNotEmpty()) append(",\"bring_email\":\"${bringEmail.replace("\"", "\\\"\")}\"")
|
||||
if (bringPassword.isNotEmpty()) append(",\"bring_password\":\"${bringPassword.replace("\"", "\\\"\")}\"")
|
||||
append("}")
|
||||
}
|
||||
val conn = (java.net.URL(url).openConnection() as java.net.HttpURLConnection).apply {
|
||||
|
||||
@@ -78,11 +78,11 @@
|
||||
android:layout_marginBottom="24dp"
|
||||
android:contentDescription="EverShelf" />
|
||||
|
||||
<!-- Title shown in all 3 languages so it's always readable -->
|
||||
<!-- Title shown in all 5 languages so it's always readable -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Scegli la lingua\nChoose your language\nSprache wählen"
|
||||
android:text="Scegli la lingua · Choose your language\nSprache wählen · Elige el idioma\nChoisissez votre langue"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
@@ -117,7 +117,27 @@
|
||||
android:text="🇩🇪 Deutsch"
|
||||
android:textSize="18sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="#b91c1c" />
|
||||
android:backgroundTint="#b91c1c"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnLangEs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:text="🇪🇸 Español"
|
||||
android:textSize="18sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="#c2410c"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnLangFr"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:text="🇫🇷 Français"
|
||||
android:textSize="18sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="#1d4ed8" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1050,7 +1070,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ════════════════════════════════════════════
|
||||
STEP 5 — Screensaver
|
||||
STEP 5 — Features
|
||||
════════════════════════════════════════════ -->
|
||||
<LinearLayout
|
||||
android:id="@+id/stepScreensaver"
|
||||
@@ -1063,66 +1083,58 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🌙"
|
||||
android:text="⚡"
|
||||
android:textSize="52sp"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tvScreensaverTitle"
|
||||
android:text="@string/setup_screensaver_title"
|
||||
android:text="@string/setup_features_title"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvScreensaverDesc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Dopo 5 minuti di inattività mostra un overlay con l'orologio e informazioni utili (statistiche, piano pasti). Lo schermo rimane SEMPRE acceso — questa opzione riguarda solo l'overlay visivo in-app."
|
||||
android:text="@string/setup_features_desc"
|
||||
android:textColor="#94a3b8"
|
||||
android:textSize="15sp"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:layout_marginBottom="28dp" />
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
<!-- Toggle card -->
|
||||
<!-- Toggle: Screensaver -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/card_background"
|
||||
android:padding="20dp"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="32dp">
|
||||
|
||||
android:layout_marginBottom="10dp">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvScreensaverToggleLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_screensaver_toggle_label"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textSize="16sp"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
android:layout_marginBottom="3dp" />
|
||||
<TextView
|
||||
android:id="@+id/tvScreensaverToggleHint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_screensaver_toggle_hint"
|
||||
android:textColor="#64748b"
|
||||
android:textSize="13sp" />
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/setupSwitchScreensaver"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -1130,6 +1142,114 @@
|
||||
android:checked="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Toggle: Prezzi lista spesa -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/card_background"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="10dp">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_prices_toggle_label"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="3dp" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_prices_toggle_hint"
|
||||
android:textColor="#64748b"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/setupSwitchPrices"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Toggle: Piano pasti -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/card_background"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="10dp">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_mealplan_toggle_label"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="3dp" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_mealplan_toggle_hint"
|
||||
android:textColor="#64748b"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/setupSwitchMealPlan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Toggle: Suggerimenti zero-waste -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/card_background"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="24dp">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_zerowaste_toggle_label"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="3dp" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_zerowaste_toggle_hint"
|
||||
android:textColor="#64748b"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/setupSwitchZeroWaste"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Navigation -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -1141,7 +1261,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="← Indietro"
|
||||
android:text="@string/setup_step_back"
|
||||
android:textSize="14sp"
|
||||
android:textAllCaps="false"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
@@ -1154,7 +1274,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="2"
|
||||
android:text="Avanti →"
|
||||
android:text="@string/setup_step_next"
|
||||
android:textSize="15sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="#7c3aed" />
|
||||
@@ -1162,7 +1282,230 @@
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ════════════════════════════════════════════
|
||||
STEP 6 — Done
|
||||
STEP 6 — Gemini AI key
|
||||
════════════════════════════════════════════ -->
|
||||
<LinearLayout
|
||||
android:id="@+id/stepGemini"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🤖"
|
||||
android:textSize="52sp"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_gemini_title"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_gemini_desc"
|
||||
android:textColor="#94a3b8"
|
||||
android:textSize="15sp"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- How-to card -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/card_background"
|
||||
android:padding="14dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="16dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="💡"
|
||||
android:textSize="20sp"
|
||||
android:layout_marginEnd="10dp" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_gemini_how"
|
||||
android:textColor="#7dd3fc"
|
||||
android:textSize="13sp"
|
||||
android:lineSpacingExtra="3dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/setupGeminiKeyEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/setup_gemini_hint"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textColorHint="#475569"
|
||||
android:backgroundTint="#334155"
|
||||
android:inputType="textVisiblePassword"
|
||||
android:textSize="14sp"
|
||||
android:fontFamily="monospace"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
<!-- Navigation -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnGeminiBack"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/setup_step_back"
|
||||
android:textSize="14sp"
|
||||
android:textAllCaps="false"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:strokeColor="#334155"
|
||||
android:textColor="#64748b"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnGeminiSkip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/setup_skip_later"
|
||||
android:textSize="13sp"
|
||||
android:textAllCaps="false"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:strokeColor="#475569"
|
||||
android:textColor="#94a3b8"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnGeminiNext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/setup_confirm"
|
||||
android:textSize="14sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="#7c3aed" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ════════════════════════════════════════════
|
||||
STEP 7 — Bring! credentials
|
||||
════════════════════════════════════════════ -->
|
||||
<LinearLayout
|
||||
android:id="@+id/stepBring"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🛒"
|
||||
android:textSize="52sp"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_bring_title"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/setup_bring_desc"
|
||||
android:textColor="#94a3b8"
|
||||
android:textSize="15sp"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/setupBringEmailEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/setup_bring_email_hint"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textColorHint="#475569"
|
||||
android:backgroundTint="#334155"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textSize="15sp"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/setupBringPasswordEdit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/setup_bring_pass_hint"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textColorHint="#475569"
|
||||
android:backgroundTint="#334155"
|
||||
android:inputType="textPassword"
|
||||
android:textSize="15sp"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
<!-- Navigation -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnBringBack"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/setup_step_back"
|
||||
android:textSize="14sp"
|
||||
android:textAllCaps="false"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:strokeColor="#334155"
|
||||
android:textColor="#64748b"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnBringSkip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/setup_skip_later"
|
||||
android:textSize="13sp"
|
||||
android:textAllCaps="false"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:strokeColor="#475569"
|
||||
android:textColor="#94a3b8"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnBringNext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/setup_confirm"
|
||||
android:textSize="14sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="#059669" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ════════════════════════════════════════════
|
||||
STEP 8 — Done
|
||||
════════════════════════════════════════════ -->
|
||||
<LinearLayout
|
||||
android:id="@+id/stepDone"
|
||||
@@ -1182,7 +1525,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Tutto pronto!"
|
||||
android:text="@string/setup_done_title"
|
||||
android:textColor="#f1f5f9"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
@@ -1191,7 +1534,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="La configurazione è completa. Premi il pulsante per avviare EverShelf in modalità kiosk."
|
||||
android:text="@string/setup_done_desc"
|
||||
android:textColor="#94a3b8"
|
||||
android:textSize="15sp"
|
||||
android:gravity="center"
|
||||
@@ -1210,10 +1553,10 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Riepilogo configurazione"
|
||||
android:text="@string/setup_done_summary_label"
|
||||
android:textColor="#94a3b8"
|
||||
android:textSize="13sp"
|
||||
android:textAllCaps="true"
|
||||
android:textAllCaps="false"
|
||||
android:letterSpacing="0.08"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
@@ -1231,7 +1574,7 @@
|
||||
android:id="@+id/btnLaunch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:text="🚀 Avvia EverShelf"
|
||||
android:text="@string/btn_launch"
|
||||
android:textSize="18sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="#059669" />
|
||||
|
||||
@@ -1,29 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">EverShelf Kiosk</string>
|
||||
|
||||
<!-- Setup-Assistent Zeichenfolgen -->
|
||||
<string name="setup_enter_url">Bitte zuerst eine URL eingeben</string>
|
||||
<string name="setup_testing">Verbindung wird getestet…</string>
|
||||
<string name="setup_server_found">EverShelf-Server gefunden und API aktiv!</string>
|
||||
<string name="setup_api_not_found">Server erreichbar, aber EverShelf-API nicht gefunden. Pfad prüfen.</string>
|
||||
<string name="setup_unreachable">Server nicht erreichbar</string>
|
||||
<string name="setup_discover_btn">🔍 Lokales Netzwerk durchsuchen</string> <string name="setup_perms_granted_next">✅ Berechtigungen erteilt — Weiter →</string> <string name="setup_discovering">Suche läuft…</string>
|
||||
<string name="setup_discover_btn">🔍 Lokales Netzwerk durchsuchen</string>
|
||||
<string name="setup_perms_granted_next">✅ Berechtigungen erteilt — Weiter →</string>
|
||||
<string name="setup_discovering">Suche läuft…</string>
|
||||
<string name="setup_discovering_detail">Suche nach EverShelf-Servern im lokalen Netzwerk…</string>
|
||||
<string name="setup_discover_not_found">Kein EverShelf-Server automatisch gefunden. URL manuell eingeben.</string>
|
||||
<string name="setup_exit_title">Setup beenden?</string>
|
||||
<string name="setup_exit_message">Die Einrichtung kann später beim erneuten Öffnen der App abgeschlossen werden.</string>
|
||||
<string name="setup_exit_confirm">Beenden</string>
|
||||
<string name="setup_exit_cancel">Weiter</string>
|
||||
|
||||
<!-- Wizard Schritt 3: Smart-Waage -->
|
||||
<string name="setup_step_back">← Zurück</string>
|
||||
<string name="setup_step_next">Weiter →</string>
|
||||
<string name="setup_skip_later">Später einrichten</string>
|
||||
<string name="setup_confirm">Bestätigen →</string>
|
||||
<string name="wizard_step3_title">Smart-Waage (Optional)</string>
|
||||
<string name="wizard_step3_description">Um eine Bluetooth-Küchenwaage zu verwenden, musst du die EverShelf Scale Gateway App separat installieren.</string>
|
||||
<string name="wizard_step3_question">Hast du eine Bluetooth-Küchenwaage?</string>
|
||||
<string name="wizard_step3_yes">✅ Ja, ich habe eine Waage</string>
|
||||
<string name="wizard_step3_no">➡️ Nein, überspringen</string>
|
||||
|
||||
<!-- Gateway-Statusmeldungen -->
|
||||
<string name="ble_scanning">🔍 Suche läuft…</string>
|
||||
<string name="ble_connected">Verbunden! Gegenstand auf die Waage legen…</string>
|
||||
<string name="ble_disconnected">Verbindung getrennt. Erneut versuchen.</string>
|
||||
<string name="ble_no_scale_found">Keine Waage gefunden. Sicherstellen, dass sie eingeschaltet und in der Nähe ist, und erneut versuchen.</string>
|
||||
<string name="ble_select_from_list">Waage aus der Liste auswählen.</string>
|
||||
<string name="ble_not_confirmed">Waage nicht bestätigt. Erneut scannen.</string>
|
||||
<string name="ble_scan_again">🔄 Erneut scannen</string>
|
||||
<string name="ble_weight_received">Gewicht empfangen — Stimmt es mit der Anzeige überein?</string>
|
||||
<string name="wizard_gateway_installed">Scale Gateway installiert ✅</string>
|
||||
<string name="wizard_gateway_installed_detail">Wird beim Fortfahren im Hintergrund gestartet.</string>
|
||||
<string name="wizard_gateway_not_installed">Scale Gateway nicht installiert</string>
|
||||
@@ -32,8 +40,6 @@
|
||||
<string name="wizard_gateway_up_to_date">Scale Gateway ist aktuell.</string>
|
||||
<string name="wizard_gateway_update_available">Update für Scale Gateway verfügbar</string>
|
||||
<string name="wizard_gateway_update_detail">Tippe auf den Button, um jetzt zu aktualisieren.</string>
|
||||
|
||||
<!-- Download- / Installationsfortschritt -->
|
||||
<string name="install_downloading">Download läuft…</string>
|
||||
<string name="install_downloading_detail">Bitte warten, die Datei wird heruntergeladen.</string>
|
||||
<string name="install_installing">Installation läuft…</string>
|
||||
@@ -43,31 +49,56 @@
|
||||
<string name="install_error_download">Download fehlgeschlagen</string>
|
||||
<string name="install_error_download_detail">Verbindung prüfen und erneut versuchen.</string>
|
||||
<string name="install_error_install">Installation fehlgeschlagen</string>
|
||||
<string name="install_perm_detail">Aktiviere \'Unbekannte Apps installieren\' in den Einstellungen, dann komm zurück.</string>
|
||||
<string name="install_perm_detail">Aktiviere 'Unbekannte Apps installieren' in den Einstellungen, dann komm zurück.</string>
|
||||
<string name="install_btn_retry">↩ Nochmal versuchen</string>
|
||||
|
||||
<!-- Schaltflächen -->
|
||||
<string name="btn_back">Zurück</string>
|
||||
<string name="btn_launch">🚀 EverShelf starten</string>
|
||||
<string name="btn_launch_no_scale">🚀 Ohne Waage starten</string>
|
||||
<string name="btn_download_gateway">📥 Scale Gateway installieren</string>
|
||||
<string name="btn_update_gateway">📥 Scale Gateway aktualisieren</string>
|
||||
|
||||
<!-- Server-Erreichbarkeit prüfen (Wizard Schritt 3) -->
|
||||
<string name="wizard_server_checking">Server-Verbindung wird geprüft…</string>
|
||||
<string name="wizard_server_ok">Server erreichbar ✅</string>
|
||||
<string name="wizard_server_ok_detail">Fehlerberichterstattung aktiv — Installationsfehler werden automatisch an GitHub Issues gesendet.</string>
|
||||
<string name="wizard_server_error">Server nicht erreichbar ⚠️</string>
|
||||
<string name="wizard_server_error_detail">Fehler werden GitHub Issues nicht erreichen. URL in Schritt 2 prüfen.</string>
|
||||
<!-- Bildschirmschoner-Schritt -->
|
||||
<string name="setup_screensaver_title">Bildschirmschoner</string>
|
||||
<string name="setup_screensaver_desc">Zeigt nach 5 Minuten Inaktivität eine Uhr mit nützlichen Fakten. Standardmäßig deaktiviert (Bildschirm bleibt immer an).</string>
|
||||
<string name="setup_screensaver_toggle_label">Bildschirmschoner aktivieren</string>
|
||||
<string name="setup_screensaver_toggle_hint">Wenn deaktiviert, bleibt der Bildschirm immer an.</string>
|
||||
<string name="setup_features_title">Funktionen</string>
|
||||
<string name="setup_features_desc">Aktiviere die gewünschten Funktionen. Du kannst sie später jederzeit in den Servereinstellungen ändern.</string>
|
||||
<string name="setup_screensaver_toggle_label">Uhr-Bildschirmschoner</string>
|
||||
<string name="setup_screensaver_toggle_hint">Zeigt eine Uhranzeige nach 5 Min. Inaktivität.</string>
|
||||
<string name="setup_prices_toggle_label">Einkaufslisten-Preise</string>
|
||||
<string name="setup_prices_toggle_hint">KI-gestützte automatische Kostensätzung für jeden Artikel.</string>
|
||||
<string name="setup_mealplan_toggle_label">Mahlzeitenplan</string>
|
||||
<string name="setup_mealplan_toggle_hint">Plane die Wöchentliche Mahlzeiten mit Rezepten aus deiner Vorratskammer.</string>
|
||||
<string name="setup_zerowaste_toggle_label">Zero-Waste-Tipps</string>
|
||||
<string name="setup_zerowaste_toggle_hint">Beim Kochen Tipps zur Wiederverwendung von Resten anzeigen (Schalen, Kochwasser usw.).</string>
|
||||
<string name="setup_gemini_title">Google Gemini AI</string>
|
||||
<string name="setup_gemini_desc">EverShelf nutzt Google Gemini AI für Rezeptvorschläge, smarte Einkaufsschätzungen und mehr.
|
||||
|
||||
<!-- Zusammenfassung -->
|
||||
Zum Aktivieren den kostenlosen Gemini API-Schlüssel eingeben.</string>
|
||||
<string name="setup_gemini_how">Kostenlosen Schlüssel unter: aistudio.google.com → "API-Schlüssel erhalten"</string>
|
||||
<string name="setup_gemini_hint">API-Schlüssel einfügen (beginnt mit AIza…)</string>
|
||||
<string name="setup_bring_title">Bring! Einkaufsliste</string>
|
||||
<string name="setup_bring_desc">EverShelf kann die Einkaufsliste mit der Bring!-App synchronisieren.
|
||||
|
||||
Bring!-Zugangsdaten eingeben, um die Integration zu aktivieren.</string>
|
||||
<string name="setup_bring_email_hint">Bring!-E-Mail-Adresse</string>
|
||||
<string name="setup_bring_pass_hint">Bring!-Passwort</string>
|
||||
<string name="setup_done_title">Alles bereit!</string>
|
||||
<string name="setup_done_desc">Die Einrichtung ist abgeschlossen. Auf den Button tippen, um EverShelf im Kiosk-Modus zu starten.</string>
|
||||
<string name="setup_done_summary_label">KONFIGURATIONSSÜBERSICHT</string>
|
||||
<string name="summary_lang">Sprache</string>
|
||||
<string name="summary_scale_skip">Waage: nicht konfiguriert</string>
|
||||
<string name="summary_screensaver_on">Bildschirmschoner: aktiv</string>
|
||||
<string name="summary_screensaver_off">Bildschirm immer an (Bildschirmschoner deaktiviert)</string>
|
||||
<string name="summary_prices_on">Einkaufslisten-Preise: aktiviert</string>
|
||||
<string name="summary_mealplan_on">Mahlzeitenplan: aktiviert</string>
|
||||
<string name="summary_zerowaste_on">Zero-Waste-Tipps: aktiviert</string>
|
||||
<string name="summary_gemini_set">Gemini AI: aktiviert</string>
|
||||
<string name="summary_gemini_skip">Gemini AI: nicht konfiguriert</string>
|
||||
<string name="summary_bring_set">Bring!: verbunden</string>
|
||||
<string name="summary_bring_skip">Bring!: nicht konfiguriert</string>
|
||||
<string name="ble_connecting_to">🔗 Verbinde mit %s…</string>
|
||||
<string name="ble_connecting">🔗 Verbindung wird hergestellt…</string>
|
||||
<string name="summary_scale_ok">Waage: %s</string>
|
||||
<string name="summary_scale_warn">Waage: nicht bestätigt</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">EverShelf Kiosk</string>
|
||||
<string name="setup_enter_url">Introduce primero una URL</string>
|
||||
<string name="setup_testing">Probando conexión…</string>
|
||||
<string name="setup_server_found">¡Servidor EverShelf encontrado y API activa!</string>
|
||||
<string name="setup_api_not_found">Servidor accesible pero API EverShelf no encontrada. Comprueba la ruta.</string>
|
||||
<string name="setup_unreachable">No se puede alcanzar el servidor</string>
|
||||
<string name="setup_discover_btn">🔍 Buscar en la red local</string>
|
||||
<string name="setup_perms_granted_next">✅ Permisos concedidos — Continuar →</string>
|
||||
<string name="setup_discovering">Escaneando…</string>
|
||||
<string name="setup_discovering_detail">Buscando servidores EverShelf en la red local…</string>
|
||||
<string name="setup_discover_not_found">Ningún servidor EverShelf encontrado automáticamente. Introduce la URL manualmente.</string>
|
||||
<string name="setup_exit_title">¿Salir de la configuración?</string>
|
||||
<string name="setup_exit_message">Puedes completar la configuración más tarde cuando vuelvas a abrir la app.</string>
|
||||
<string name="setup_exit_confirm">Salir</string>
|
||||
<string name="setup_exit_cancel">Continuar</string>
|
||||
<string name="setup_step_back">← Atrás</string>
|
||||
<string name="setup_step_next">Siguiente →</string>
|
||||
<string name="setup_skip_later">Configurar después</string>
|
||||
<string name="setup_confirm">Confirmar →</string>
|
||||
<string name="wizard_step3_title">Báscula inteligente</string>
|
||||
<string name="wizard_step3_description">EverShelf Kiosk incluye una pasarela Bluetooth integrada — no necesitas ninguna app externa. Selecciona tu báscula abajo.</string>
|
||||
<string name="wizard_step3_question">¿Tienes una báscula inteligente Bluetooth?</string>
|
||||
<string name="wizard_step3_yes">✅ Sí, tengo una báscula</string>
|
||||
<string name="wizard_step3_no">➡️ No, saltar este paso</string>
|
||||
<string name="ble_scanning">🔍 Escaneando…</string>
|
||||
<string name="ble_connected">¡Conectado! Coloca un objeto en la báscula…</string>
|
||||
<string name="ble_disconnected">Conexión perdida. Reintentar.</string>
|
||||
<string name="ble_no_scale_found">No se encontró ninguna báscula. Asegúrate de que esté encendida y cerca, e inténtalo de nuevo.</string>
|
||||
<string name="ble_select_from_list">Selecciona tu báscula de la lista.</string>
|
||||
<string name="ble_not_confirmed">Báscula no confirmada. Vuelve a escanear.</string>
|
||||
<string name="ble_scan_again">🔄 Volver a escanear</string>
|
||||
<string name="ble_weight_received">Peso recibido — ¿coincide con el mostrado en la báscula?</string>
|
||||
<string name="wizard_gateway_installed">Báscula guardada ✅</string>
|
||||
<string name="wizard_gateway_installed_detail">La pasarela BLE integrada se conectará automáticamente al inicio.</string>
|
||||
<string name="wizard_gateway_not_installed">Ninguna báscula seleccionada</string>
|
||||
<string name="wizard_gateway_not_installed_detail">Escanea las básculas BLE cercanas y toca una para seleccionarla.</string>
|
||||
<string name="wizard_gateway_checking">Escaneando básculas BLE…</string>
|
||||
<string name="wizard_gateway_up_to_date">Servicio BLE de báscula listo.</string>
|
||||
<string name="wizard_gateway_update_available">Báscula BLE encontrada</string>
|
||||
<string name="wizard_gateway_update_detail">Toca la báscula en la lista para conectarte.</string>
|
||||
<string name="install_downloading">Descargando…</string>
|
||||
<string name="install_downloading_detail">Por favor, espera mientras se descarga el archivo.</string>
|
||||
<string name="install_installing">Instalando…</string>
|
||||
<string name="install_confirm_detail">Confirma la instalación en el diálogo que se ha abierto.</string>
|
||||
<string name="install_success">¡Instalado correctamente!</string>
|
||||
<string name="install_success_detail">La app ha sido actualizada.</string>
|
||||
<string name="install_error_download">Descarga fallida</string>
|
||||
<string name="install_error_download_detail">Comprueba la conexión e inténtalo de nuevo.</string>
|
||||
<string name="install_error_install">Instalación fallida</string>
|
||||
<string name="install_perm_detail">Habilita 'Instalar apps desconocidas' en los ajustes y vuelve aquí.</string>
|
||||
<string name="install_btn_retry">↩ Reintentar</string>
|
||||
<string name="btn_back">Atrás</string>
|
||||
<string name="btn_launch">🚀 Iniciar EverShelf</string>
|
||||
<string name="btn_launch_no_scale">🚀 Iniciar sin báscula</string>
|
||||
<string name="btn_download_gateway">📥 Instalar Scale Gateway</string>
|
||||
<string name="btn_update_gateway">📥 Actualizar Scale Gateway</string>
|
||||
<string name="wizard_server_checking">Comprobando conexión al servidor…</string>
|
||||
<string name="wizard_server_ok">Servidor accesible ✅</string>
|
||||
<string name="wizard_server_ok_detail">Informe de errores activo — los fallos de instalación se enviarán automáticamente a GitHub Issues.</string>
|
||||
<string name="wizard_server_error">Servidor no accesible ⚠️</string>
|
||||
<string name="wizard_server_error_detail">Los errores no llegarán a GitHub Issues. Comprueba la URL introducida en el paso 2.</string>
|
||||
<string name="setup_features_title">Funcionalidades</string>
|
||||
<string name="setup_features_desc">Activa las funciones que quieras usar. Puedes cambiarlas en cualquier momento desde los ajustes del servidor.</string>
|
||||
<string name="setup_screensaver_toggle_label">Salvapantallas reloj</string>
|
||||
<string name="setup_screensaver_toggle_hint">Muestra un reloj después de 5 min de inactividad.</string>
|
||||
<string name="setup_prices_toggle_label">Precios lista de la compra</string>
|
||||
<string name="setup_prices_toggle_hint">Estimación automática del coste de cada artículo mediante IA.</string>
|
||||
<string name="setup_mealplan_toggle_label">Plan de comidas</string>
|
||||
<string name="setup_mealplan_toggle_hint">Planifica las comidas de la semana con recetas basadas en tu despensa.</string>
|
||||
<string name="setup_zerowaste_toggle_label">Consejos zero-waste</string>
|
||||
<string name="setup_zerowaste_toggle_hint">Muestra consejos para reutilizar restos (cáscaras, agua de cocción, etc.) al cocinar.</string>
|
||||
<string name="setup_gemini_title">Google Gemini AI</string>
|
||||
<string name="setup_gemini_desc">EverShelf usa Google Gemini AI para sugerencias de recetas, estimaciones inteligentes de la compra y más.
|
||||
|
||||
Para activarla, introduce tu clave API de Gemini gratuita.</string>
|
||||
<string name="setup_gemini_how">Obtén tu clave gratuita en: aistudio.google.com → "Obtener clave API"</string>
|
||||
<string name="setup_gemini_hint">Pega la clave API aquí (empieza por AIza…)</string>
|
||||
<string name="setup_bring_title">Bring! Lista de la compra</string>
|
||||
<string name="setup_bring_desc">EverShelf puede sincronizar tu lista de la compra con la app Bring!.
|
||||
|
||||
Introduce tus credenciales de Bring! para activar la integración.</string>
|
||||
<string name="setup_bring_email_hint">Correo electrónico de Bring!</string>
|
||||
<string name="setup_bring_pass_hint">Contraseña de Bring!</string>
|
||||
<string name="setup_done_title">¡Todo listo!</string>
|
||||
<string name="setup_done_desc">La configuración está completa. Pulsa el botón para iniciar EverShelf en modo quiosco.</string>
|
||||
<string name="setup_done_summary_label">RESUMEN DE CONFIGURACIÓN</string>
|
||||
<string name="summary_lang">Idioma</string>
|
||||
<string name="summary_scale_skip">Báscula: no configurada</string>
|
||||
<string name="summary_screensaver_on">Salvapantallas: activo</string>
|
||||
<string name="summary_screensaver_off">Pantalla siempre encendida (salvapantallas desactivado)</string>
|
||||
<string name="summary_prices_on">Precios lista de la compra: activados</string>
|
||||
<string name="summary_mealplan_on">Plan de comidas: activado</string>
|
||||
<string name="summary_zerowaste_on">Consejos zero-waste: activados</string>
|
||||
<string name="summary_gemini_set">Gemini AI: activada</string>
|
||||
<string name="summary_gemini_skip">Gemini AI: no configurada</string>
|
||||
<string name="summary_bring_set">Bring!: conectada</string>
|
||||
<string name="summary_bring_skip">Bring!: no configurada</string>
|
||||
<string name="ble_connecting_to">🔗 Conectando con %s…</string>
|
||||
<string name="ble_connecting">🔗 Estableciendo conexión…</string>
|
||||
<string name="summary_scale_ok">Báscula: %s</string>
|
||||
<string name="summary_scale_warn">Báscula: no confirmada</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">EverShelf Kiosk</string>
|
||||
<string name="setup_enter_url">Veuillez d'abord saisir une URL</string>
|
||||
<string name="setup_testing">Test de connexion…</string>
|
||||
<string name="setup_server_found">Serveur EverShelf trouvé et API active !</string>
|
||||
<string name="setup_api_not_found">Serveur accessible mais API EverShelf introuvable. Vérifiez le chemin.</string>
|
||||
<string name="setup_unreachable">Impossible d'atteindre le serveur</string>
|
||||
<string name="setup_discover_btn">🔍 Rechercher sur le réseau local</string>
|
||||
<string name="setup_perms_granted_next">✅ Permissions accordées — Continuer →</string>
|
||||
<string name="setup_discovering">Analyse en cours…</string>
|
||||
<string name="setup_discovering_detail">Recherche de serveurs EverShelf sur le réseau local…</string>
|
||||
<string name="setup_discover_not_found">Aucun serveur EverShelf trouvé automatiquement. Entrez l'URL manuellement.</string>
|
||||
<string name="setup_exit_title">Quitter la configuration ?</string>
|
||||
<string name="setup_exit_message">Vous pouvez terminer la configuration plus tard en rouvrant l'app.</string>
|
||||
<string name="setup_exit_confirm">Quitter</string>
|
||||
<string name="setup_exit_cancel">Continuer</string>
|
||||
<string name="setup_step_back">← Retour</string>
|
||||
<string name="setup_step_next">Suivant →</string>
|
||||
<string name="setup_skip_later">Configurer plus tard</string>
|
||||
<string name="setup_confirm">Confirmer →</string>
|
||||
<string name="wizard_step3_title">Balance intelligente</string>
|
||||
<string name="wizard_step3_description">EverShelf Kiosk inclut une passerelle Bluetooth intégrée — aucune app externe nécessaire. Sélectionnez votre balance ci-dessous.</string>
|
||||
<string name="wizard_step3_question">Avez-vous une balance intelligente Bluetooth ?</string>
|
||||
<string name="wizard_step3_yes">✅ Oui, j'ai une balance</string>
|
||||
<string name="wizard_step3_no">➡️ Non, ignorer cette étape</string>
|
||||
<string name="ble_scanning">🔍 Scan en cours…</string>
|
||||
<string name="ble_connected">Connecté ! Posez un objet sur la balance…</string>
|
||||
<string name="ble_disconnected">Connexion perdue. Réessayer.</string>
|
||||
<string name="ble_no_scale_found">Aucune balance trouvée. Vérifiez qu'elle est allumée et à proximité, puis réessayez.</string>
|
||||
<string name="ble_select_from_list">Sélectionnez votre balance dans la liste.</string>
|
||||
<string name="ble_not_confirmed">Balance non confirmée. Relancer le scan.</string>
|
||||
<string name="ble_scan_again">🔄 Scanner à nouveau</string>
|
||||
<string name="ble_weight_received">Poids reçu — correspond-il à l'affichage de la balance ?</string>
|
||||
<string name="wizard_gateway_installed">Balance enregistrée ✅</string>
|
||||
<string name="wizard_gateway_installed_detail">La passerelle BLE intégrée se connectera automatiquement au démarrage.</string>
|
||||
<string name="wizard_gateway_not_installed">Aucune balance sélectionnée</string>
|
||||
<string name="wizard_gateway_not_installed_detail">Scannez les balances BLE à proximité et appuyez sur l'une d'elles pour la sélectionner.</string>
|
||||
<string name="wizard_gateway_checking">Scan des balances BLE en cours…</string>
|
||||
<string name="wizard_gateway_up_to_date">Service BLE de la balance prêt.</string>
|
||||
<string name="wizard_gateway_update_available">Balance BLE trouvée</string>
|
||||
<string name="wizard_gateway_update_detail">Appuyez sur la balance dans la liste pour vous connecter.</string>
|
||||
<string name="install_downloading">Téléchargement en cours…</string>
|
||||
<string name="install_downloading_detail">Veuillez patienter, le fichier est en cours de téléchargement.</string>
|
||||
<string name="install_installing">Installation en cours…</string>
|
||||
<string name="install_confirm_detail">Confirmez l'installation dans la boîte de dialogue ouverte.</string>
|
||||
<string name="install_success">Installé avec succès !</string>
|
||||
<string name="install_success_detail">L'app a été mise à jour.</string>
|
||||
<string name="install_error_download">Téléchargement échoué</string>
|
||||
<string name="install_error_download_detail">Vérifiez la connexion et réessayez.</string>
|
||||
<string name="install_error_install">Installation échouée</string>
|
||||
<string name="install_perm_detail">Activez 'Installer des apps inconnues' dans les paramètres, puis revenez ici.</string>
|
||||
<string name="install_btn_retry">↩ Réessayer</string>
|
||||
<string name="btn_back">Retour</string>
|
||||
<string name="btn_launch">🚀 Lancer EverShelf</string>
|
||||
<string name="btn_launch_no_scale">🚀 Lancer sans balance</string>
|
||||
<string name="btn_download_gateway">📥 Installer Scale Gateway</string>
|
||||
<string name="btn_update_gateway">📥 Mettre à jour Scale Gateway</string>
|
||||
<string name="wizard_server_checking">Vérification de la connexion au serveur…</string>
|
||||
<string name="wizard_server_ok">Serveur accessible ✅</string>
|
||||
<string name="wizard_server_ok_detail">Rapport d'erreurs actif — les échecs d'installation seront envoyés automatiquement aux GitHub Issues.</string>
|
||||
<string name="wizard_server_error">Serveur inaccessible ⚠️</string>
|
||||
<string name="wizard_server_error_detail">Les erreurs n'atteindront pas GitHub Issues. Vérifiez l'URL saisie à l'étape 2.</string>
|
||||
<string name="setup_features_title">Fonctionnalités</string>
|
||||
<string name="setup_features_desc">Activez les fonctions que vous souhaitez utiliser. Vous pourrez les modifier plus tard dans les paramètres du serveur.</string>
|
||||
<string name="setup_screensaver_toggle_label">Horloge écran de veille</string>
|
||||
<string name="setup_screensaver_toggle_hint">Affiche une horloge après 5 min d'inactivité.</string>
|
||||
<string name="setup_prices_toggle_label">Prix liste de courses</string>
|
||||
<string name="setup_prices_toggle_hint">Estimation automatique du coût de chaque article via IA.</string>
|
||||
<string name="setup_mealplan_toggle_label">Plan de repas</string>
|
||||
<string name="setup_mealplan_toggle_hint">Planifiez les repas de la semaine avec des recettes basées sur votre garde-manger.</string>
|
||||
<string name="setup_zerowaste_toggle_label">Conseils zéro déchet</string>
|
||||
<string name="setup_zerowaste_toggle_hint">Affiche des conseils pour réutiliser les restes (peaux, eau de cuisson, etc.) pendant la cuisson.</string>
|
||||
<string name="setup_gemini_title">Google Gemini AI</string>
|
||||
<string name="setup_gemini_desc">EverShelf utilise Google Gemini AI pour les suggestions de recettes, les estimations intelligentes des courses et plus encore.
|
||||
|
||||
Pour l'activer, entrez votre clé API Gemini gratuite.</string>
|
||||
<string name="setup_gemini_how">Obtenez votre clé gratuite sur : aistudio.google.com → "Obtenir une clé API"</string>
|
||||
<string name="setup_gemini_hint">Collez la clé API ici (commence par AIza…)</string>
|
||||
<string name="setup_bring_title">Bring! Liste de courses</string>
|
||||
<string name="setup_bring_desc">EverShelf peut synchroniser votre liste de courses avec l'app Bring!.
|
||||
|
||||
Entrez vos identifiants Bring! pour activer l'intégration.</string>
|
||||
<string name="setup_bring_email_hint">Adresse e-mail Bring!</string>
|
||||
<string name="setup_bring_pass_hint">Mot de passe Bring!</string>
|
||||
<string name="setup_done_title">Tout est prêt !</string>
|
||||
<string name="setup_done_desc">La configuration est terminée. Appuyez sur le bouton pour lancer EverShelf en mode kiosque.</string>
|
||||
<string name="setup_done_summary_label">RÉSUMÉ DE CONFIGURATION</string>
|
||||
<string name="summary_lang">Langue</string>
|
||||
<string name="summary_scale_skip">Balance : non configurée</string>
|
||||
<string name="summary_screensaver_on">Écran de veille : actif</string>
|
||||
<string name="summary_screensaver_off">Écran toujours allumé (écran de veille désactivé)</string>
|
||||
<string name="summary_prices_on">Prix liste de courses : activés</string>
|
||||
<string name="summary_mealplan_on">Plan de repas : activé</string>
|
||||
<string name="summary_zerowaste_on">Conseils zéro déchet : activés</string>
|
||||
<string name="summary_gemini_set">Gemini AI : activée</string>
|
||||
<string name="summary_gemini_skip">Gemini AI : non configurée</string>
|
||||
<string name="summary_bring_set">Bring! : connectée</string>
|
||||
<string name="summary_bring_skip">Bring! : non configurée</string>
|
||||
<string name="ble_connecting_to">🔗 Connexion à %s…</string>
|
||||
<string name="ble_connecting">🔗 Connexion en cours…</string>
|
||||
<string name="summary_scale_ok">Balance : %s</string>
|
||||
<string name="summary_scale_warn">Balance : non confirmée</string>
|
||||
</resources>
|
||||
@@ -1,73 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">EverShelf Kiosk</string>
|
||||
|
||||
<!-- Stringhe setup wizard -->
|
||||
<string name="setup_enter_url">Inserisci prima un URL</string>
|
||||
<string name="setup_testing">Verifica connessione…</string>
|
||||
<string name="setup_server_found">Server EverShelf trovato e API attiva!</string>
|
||||
<string name="setup_api_not_found">Server raggiungibile ma API EverShelf non trovata. Verifica il percorso.</string>
|
||||
<string name="setup_unreachable">Impossibile raggiungere il server</string>
|
||||
<string name="setup_discover_btn">🔍 Cerca nella rete locale</string> <string name="setup_perms_granted_next">✅ Permessi concessi — Continua →</string> <string name="setup_discovering">Scansione in corso…</string>
|
||||
<string name="setup_discover_btn">🔍 Cerca nella rete locale</string>
|
||||
<string name="setup_perms_granted_next">✅ Permessi concessi — Continua →</string>
|
||||
<string name="setup_discovering">Scansione in corso…</string>
|
||||
<string name="setup_discovering_detail">Ricerca server EverShelf nella rete locale…</string>
|
||||
<string name="setup_discover_not_found">Nessun server EverShelf trovato automaticamente. Inserisci l\'URL manualmente.</string>
|
||||
<string name="setup_discover_not_found">Nessun server EverShelf trovato automaticamente. Inserisci l'URL manualmente.</string>
|
||||
<string name="setup_exit_title">Uscire dalla configurazione?</string>
|
||||
<string name="setup_exit_message">Puoi completare la configurazione più tardi riaprendo l\'app.</string>
|
||||
<string name="setup_exit_message">Puoi completare la configurazione più tardi riaprendo l'app.</string>
|
||||
<string name="setup_exit_confirm">Esci</string>
|
||||
<string name="setup_exit_cancel">Continua</string>
|
||||
|
||||
<!-- Wizard Step 3: Bilancia smart -->
|
||||
<string name="setup_step_back">← Indietro</string>
|
||||
<string name="setup_step_next">Avanti →</string>
|
||||
<string name="setup_skip_later">Lo faccio dopo</string>
|
||||
<string name="setup_confirm">Conferma →</string>
|
||||
<string name="wizard_step3_title">Bilancia Smart</string>
|
||||
<string name="wizard_step3_description">EverShelf Kiosk include un gateway Bluetooth integrato — nessuna app esterna necessaria. Seleziona la tua bilancia qui sotto.</string>
|
||||
<string name="wizard_step3_question">Hai una bilancia smart Bluetooth?</string>
|
||||
<string name="wizard_step3_yes">✅ Sì, ho una bilancia</string>
|
||||
<string name="wizard_step3_no">➡️ No, salta questo passaggio</string>
|
||||
|
||||
<!-- Messaggi stato gateway -->
|
||||
<string name="ble_scanning">🔍 Scansione in corso…</string>
|
||||
<string name="ble_connected">Connesso! Posiziona un oggetto sulla bilancia…</string>
|
||||
<string name="ble_disconnected">Connessione persa. Riprova.</string>
|
||||
<string name="ble_no_scale_found">Nessuna bilancia trovata. Assicurati che sia accesa e vicina, poi riprova.</string>
|
||||
<string name="ble_select_from_list">Seleziona la tua bilancia dall'elenco.</string>
|
||||
<string name="ble_not_confirmed">Bilancia non confermata. Riprova la scansione.</string>
|
||||
<string name="ble_scan_again">🔄 Scansiona di nuovo</string>
|
||||
<string name="ble_weight_received">Peso ricevuto — coincide con quello sulla bilancia?</string>
|
||||
<string name="wizard_gateway_installed">Bilancia salvata ✅</string>
|
||||
<string name="wizard_gateway_installed_detail">Il gateway BLE integrato si collegherà automaticamente all\'avvio.</string>
|
||||
<string name="wizard_gateway_installed_detail">Il gateway BLE integrato si collegherà automaticamente all'avvio.</string>
|
||||
<string name="wizard_gateway_not_installed">Nessuna bilancia selezionata</string>
|
||||
<string name="wizard_gateway_not_installed_detail">Scansiona le bilance BLE nelle vicinanze e tocca una per selezionarla.</string>
|
||||
<string name="wizard_gateway_checking">Scansione bilance BLE in corso…</string>
|
||||
<string name="wizard_gateway_up_to_date">Servizio BLE bilancia pronto.</string>
|
||||
<string name="wizard_gateway_update_available">Bilancia BLE trovata</string>
|
||||
<string name="wizard_gateway_update_detail">Tocca la bilancia nell\'elenco per connettersi.</string>
|
||||
|
||||
<!-- Stati scaricamento / installazione -->
|
||||
<string name="wizard_gateway_update_detail">Tocca la bilancia nell'elenco per connettersi.</string>
|
||||
<string name="install_downloading">Scaricamento in corso…</string>
|
||||
<string name="install_downloading_detail">Attendi, il file viene scaricato.</string>
|
||||
<string name="install_installing">Installazione in corso…</string>
|
||||
<string name="install_confirm_detail">Conferma l\'installazione nel dialog che si è aperto.</string>
|
||||
<string name="install_confirm_detail">Conferma l'installazione nel dialog che si è aperto.</string>
|
||||
<string name="install_success">Installato con successo!</string>
|
||||
<string name="install_success_detail">L\'app è stata aggiornata.</string>
|
||||
<string name="install_success_detail">L'app è stata aggiornata.</string>
|
||||
<string name="install_error_download">Download fallito</string>
|
||||
<string name="install_error_download_detail">Controlla la connessione e riprova.</string>
|
||||
<string name="install_error_install">Installazione fallita</string>
|
||||
<string name="install_perm_detail">Abilita \'Installa app sconosciute\' nelle impostazioni, poi torna qui.</string>
|
||||
<string name="install_perm_detail">Abilita 'Installa app sconosciute' nelle impostazioni, poi torna qui.</string>
|
||||
<string name="install_btn_retry">↩ Riprova</string>
|
||||
|
||||
<!-- Pulsanti -->
|
||||
<string name="btn_back">Indietro</string>
|
||||
<string name="btn_launch">🚀 Avvia EverShelf</string>
|
||||
<string name="btn_launch_no_scale">🚀 Avvia senza bilancia</string>
|
||||
<string name="btn_download_gateway">📥 Installa Scale Gateway</string>
|
||||
<string name="btn_update_gateway">📥 Aggiorna Scale Gateway</string>
|
||||
|
||||
<!-- Verifica raggiungibilità server (step 3 wizard) -->
|
||||
<string name="wizard_server_checking">Verifica connessione server…</string>
|
||||
<string name="wizard_server_ok">Server raggiungibile ✅</string>
|
||||
<string name="wizard_server_ok_detail">Segnalazione errori attiva — i problemi di installazione vengono inviati automaticamente alle GitHub Issues.</string>
|
||||
<string name="wizard_server_error">Server non raggiungibile ⚠️</string>
|
||||
<string name="wizard_server_error_detail">Gli errori non raggiungeranno GitHub Issues. Verifica l\'URL inserito al passaggio 2.</string>
|
||||
<!-- Passo salvaschermo -->
|
||||
<string name="setup_screensaver_title">Salvaschermo</string>
|
||||
<string name="setup_screensaver_desc">Mostra un orologio con fatti utili dopo 5 minuti di inattività. Di default è disattivato (lo schermo resta sempre acceso).</string>
|
||||
<string name="setup_screensaver_toggle_label">Attiva salvaschermo</string>
|
||||
<string name="setup_screensaver_toggle_hint">Se disattivo, lo schermo resta sempre acceso.</string>
|
||||
<string name="wizard_server_error_detail">Gli errori non raggiungeranno GitHub Issues. Verifica l'URL inserito al passaggio 2.</string>
|
||||
<string name="setup_features_title">Funzionalità</string>
|
||||
<string name="setup_features_desc">Attiva le funzioni che vuoi usare. Puoi sempre cambiarle in seguito dalle impostazioni del server.</string>
|
||||
<string name="setup_screensaver_toggle_label">Salvaschermo orologio</string>
|
||||
<string name="setup_screensaver_toggle_hint">Mostra l'overlay orologio dopo 5 min di inattività.</string>
|
||||
<string name="setup_prices_toggle_label">Prezzi lista spesa</string>
|
||||
<string name="setup_prices_toggle_hint">Stima automatica del costo di ogni articolo in lista tramite AI.</string>
|
||||
<string name="setup_mealplan_toggle_label">Piano pasti</string>
|
||||
<string name="setup_mealplan_toggle_hint">Pianifica i pasti della settimana suggerendo ricette basate sulla dispensa.</string>
|
||||
<string name="setup_zerowaste_toggle_label">Suggerimenti zero-waste</string>
|
||||
<string name="setup_zerowaste_toggle_hint">Durante la cottura mostra consigli per riutilizzare scarti (bucce, acqua di cottura, ecc.).</string>
|
||||
<string name="setup_gemini_title">Google Gemini AI</string>
|
||||
<string name="setup_gemini_desc">EverShelf usa Google Gemini AI per suggerimenti di ricette, stime intelligenti della spesa e altro ancora.
|
||||
|
||||
<!-- Riepilogo -->
|
||||
Per abilitarla, inserisci la tua chiave API Gemini gratuita.</string>
|
||||
<string name="setup_gemini_how">Ottieni la chiave gratuita su: aistudio.google.com → "Ottieni chiave API"</string>
|
||||
<string name="setup_gemini_hint">Incolla la chiave API (inizia con AIza…)</string>
|
||||
<string name="setup_bring_title">Bring! Lista della spesa</string>
|
||||
<string name="setup_bring_desc">EverShelf può sincronizzare la lista della spesa con l'app Bring!.
|
||||
|
||||
Inserisci le credenziali del tuo account Bring! per abilitare l'integrazione.</string>
|
||||
<string name="setup_bring_email_hint">Email Bring!</string>
|
||||
<string name="setup_bring_pass_hint">Password Bring!</string>
|
||||
<string name="setup_done_title">Tutto pronto!</string>
|
||||
<string name="setup_done_desc">La configurazione è completa. Premi il pulsante per avviare EverShelf in modalità kiosk.</string>
|
||||
<string name="setup_done_summary_label">RIEPILOGO CONFIGURAZIONE</string>
|
||||
<string name="summary_lang">Lingua</string>
|
||||
<string name="summary_scale_skip">Bilancia: non configurata</string>
|
||||
<string name="summary_screensaver_on">Salvaschermo: attivo</string>
|
||||
<string name="summary_screensaver_off">Schermo sempre acceso (salvaschermo disattivato)</string>
|
||||
<string name="summary_prices_on">Prezzi lista spesa: abilitati</string>
|
||||
<string name="summary_mealplan_on">Piano pasti: abilitato</string>
|
||||
<string name="summary_zerowaste_on">Suggerimenti zero-waste: abilitati</string>
|
||||
<string name="summary_gemini_set">Gemini AI: abilitata</string>
|
||||
<string name="summary_gemini_skip">Gemini AI: non configurata</string>
|
||||
<string name="summary_bring_set">Bring!: connessa</string>
|
||||
<string name="summary_bring_skip">Bring!: non configurata</string>
|
||||
<string name="ble_connecting_to">🔗 Connessione a %s…</string>
|
||||
<string name="ble_connecting">🔗 Connessione in corso…</string>
|
||||
<string name="summary_scale_ok">Bilancia: %s</string>
|
||||
<string name="summary_scale_warn">Bilancia: da configurare</string>
|
||||
</resources>
|
||||
@@ -1,28 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">EverShelf Kiosk</string>
|
||||
|
||||
<!-- Setup wizard strings -->
|
||||
<!-- ── Setup wizard ─────────────────────────────────────────────────── -->
|
||||
<string name="setup_enter_url">Please enter a URL first</string>
|
||||
<string name="setup_testing">Testing connection…</string>
|
||||
<string name="setup_server_found">EverShelf server found and API active!</string>
|
||||
<string name="setup_api_not_found">Server reachable but EverShelf API not found. Check the path.</string>
|
||||
<string name="setup_unreachable">Cannot reach server</string>
|
||||
<string name="setup_discover_btn">🔍 Search local network</string> <string name="setup_perms_granted_next">✅ Permissions granted — Continue →</string> <string name="setup_discovering">Scanning…</string>
|
||||
<string name="setup_discover_btn">🔍 Search local network</string>
|
||||
<string name="setup_perms_granted_next">✅ Permissions granted — Continue →</string>
|
||||
<string name="setup_discovering">Scanning…</string>
|
||||
<string name="setup_discovering_detail">Searching for EverShelf servers on the local network…</string>
|
||||
<string name="setup_discover_not_found">No EverShelf server found automatically. Enter the URL manually.</string>
|
||||
<string name="setup_exit_title">Exit setup?</string>
|
||||
<string name="setup_exit_message">You can complete setup later when you reopen the app.</string>
|
||||
<string name="setup_exit_confirm">Exit</string>
|
||||
<string name="setup_exit_cancel">Continue</string>
|
||||
<string name="setup_step_back">← Back</string>
|
||||
<string name="setup_step_next">Next →</string>
|
||||
<string name="setup_skip_later">Set up later</string>
|
||||
<string name="setup_confirm">Confirm →</string>
|
||||
|
||||
<!-- Wizard Step 3: Smart scale -->
|
||||
<!-- ── Wizard Step 4: Smart scale ───────────────────────────────────── -->
|
||||
<string name="wizard_step3_title">Smart Scale</string>
|
||||
<string name="wizard_step3_description">EverShelf Kiosk includes a built-in Bluetooth gateway — no external app needed. Select your scale below.</string>
|
||||
<string name="wizard_step3_question">Do you have a Bluetooth smart scale?</string>
|
||||
<string name="wizard_step3_yes">✅ Yes, I have a scale</string>
|
||||
<string name="wizard_step3_no">➡️ No, skip this step</string>
|
||||
|
||||
<!-- Gateway status messages -->
|
||||
<!-- BLE scan / test feedback (previously hardcoded) -->
|
||||
<string name="ble_scanning">🔍 Scanning…</string>
|
||||
<string name="ble_connected">Connected! Place an object on the scale…</string>
|
||||
<string name="ble_disconnected">Connection lost. Retry.</string>
|
||||
<string name="ble_no_scale_found">No scale found. Make sure it is on and nearby, then retry.</string>
|
||||
<string name="ble_select_from_list">Select your scale from the list.</string>
|
||||
<string name="ble_not_confirmed">Scale not confirmed. Retry scan.</string>
|
||||
<string name="ble_scan_again">🔄 Scan again</string>
|
||||
<string name="ble_weight_received">Weight received — does it match the display?</string>
|
||||
|
||||
<!-- ── Gateway status messages ──────────────────────────────────────── -->
|
||||
<string name="wizard_gateway_installed">Scale device saved ✅</string>
|
||||
<string name="wizard_gateway_installed_detail">The integrated BLE gateway will connect automatically on startup.</string>
|
||||
<string name="wizard_gateway_not_installed">No scale selected</string>
|
||||
@@ -32,41 +49,76 @@
|
||||
<string name="wizard_gateway_update_available">BLE scale found</string>
|
||||
<string name="wizard_gateway_update_detail">Tap the scale in the list to connect.</string>
|
||||
|
||||
<!-- Install / download progress states -->
|
||||
<string name="install_downloading">Scaricamento in corso…</string>
|
||||
<string name="install_downloading_detail">Attendi, il file viene scaricato.</string>
|
||||
<string name="install_installing">Installazione in corso…</string>
|
||||
<string name="install_confirm_detail">Conferma l\'installazione nel dialog che si è aperto.</string>
|
||||
<string name="install_success">Installato con successo!</string>
|
||||
<string name="install_success_detail">L\'app è stata aggiornata.</string>
|
||||
<string name="install_error_download">Download fallito</string>
|
||||
<string name="install_error_download_detail">Controlla la connessione e riprova.</string>
|
||||
<string name="install_error_install">Installazione fallita</string>
|
||||
<string name="install_perm_detail">Abilita \'Installa app sconosciute\' nelle impostazioni, poi torna qui.</string>
|
||||
<string name="install_btn_retry">↩ Riprova</string>
|
||||
<!-- ── Install / download progress states ───────────────────────────── -->
|
||||
<string name="install_downloading">Downloading…</string>
|
||||
<string name="install_downloading_detail">Please wait, the file is being downloaded.</string>
|
||||
<string name="install_installing">Installing…</string>
|
||||
<string name="install_confirm_detail">Confirm the installation in the dialog that has opened.</string>
|
||||
<string name="install_success">Installed successfully!</string>
|
||||
<string name="install_success_detail">The app has been updated.</string>
|
||||
<string name="install_error_download">Download failed</string>
|
||||
<string name="install_error_download_detail">Check your connection and try again.</string>
|
||||
<string name="install_error_install">Installation failed</string>
|
||||
<string name="install_perm_detail">Enable \'Install unknown apps\' in settings, then come back here.</string>
|
||||
<string name="install_btn_retry">↩ Retry</string>
|
||||
|
||||
<!-- Buttons -->
|
||||
<!-- ── Buttons ───────────────────────────────────────────────────────── -->
|
||||
<string name="btn_back">Back</string>
|
||||
<string name="btn_launch">🚀 Launch EverShelf</string>
|
||||
<string name="btn_launch_no_scale">🚀 Launch without scale</string>
|
||||
<string name="btn_download_gateway">📥 Install Scale Gateway</string>
|
||||
<string name="btn_update_gateway">📥 Update Scale Gateway</string>
|
||||
|
||||
<!-- Server reachability check (wizard step 3) -->
|
||||
<!-- ── Server reachability check ────────────────────────────────────── -->
|
||||
<string name="wizard_server_checking">Checking server connection…</string>
|
||||
<string name="wizard_server_ok">Server reachable ✅</string>
|
||||
<string name="wizard_server_ok_detail">Error reporting is active — install failures will be sent to GitHub Issues automatically.</string>
|
||||
<string name="wizard_server_error">Server not reachable ⚠️</string>
|
||||
<string name="wizard_server_error_detail">Install errors won\'t reach GitHub Issues. Check the URL entered in step 2.</string>
|
||||
<!-- Screensaver step -->
|
||||
<string name="setup_screensaver_title">Salvaschermo in-app</string>
|
||||
<string name="setup_screensaver_desc">Shows a clock with useful facts after 5 minutes of inactivity. Off by default (screen stays always on).</string>
|
||||
<string name="setup_screensaver_toggle_label">Abilita salvaschermo orologio</string>
|
||||
<string name="setup_screensaver_toggle_hint">Mostra l\'overlay orologio dopo 5 min. Lo schermo resta sempre acceso.</string>
|
||||
|
||||
<!-- Summary -->
|
||||
<!-- ── Step 5 — Features ─────────────────────────────────────────────── -->
|
||||
<string name="setup_features_title">Features</string>
|
||||
<string name="setup_features_desc">Enable the features you want to use. You can always change them later in the server settings.</string>
|
||||
<string name="setup_screensaver_toggle_label">Clock screensaver</string>
|
||||
<string name="setup_screensaver_toggle_hint">Shows a clock overlay after 5 min of inactivity.</string>
|
||||
<string name="setup_prices_toggle_label">Shopping list prices</string>
|
||||
<string name="setup_prices_toggle_hint">AI-powered automatic cost estimate for each item in the list.</string>
|
||||
<string name="setup_mealplan_toggle_label">Meal plan</string>
|
||||
<string name="setup_mealplan_toggle_hint">Plan the week\'s meals with recipes based on your pantry.</string>
|
||||
<string name="setup_zerowaste_toggle_label">Zero-waste tips</string>
|
||||
<string name="setup_zerowaste_toggle_hint">Show tips for reusing scraps (peels, cooking water, etc.) while cooking.</string>
|
||||
|
||||
<!-- ── Step 6 — Gemini AI key ─────────────────────────────────────────── -->
|
||||
<string name="setup_gemini_title">Google Gemini AI</string>
|
||||
<string name="setup_gemini_desc">EverShelf uses Google Gemini AI for recipe suggestions, smart shopping estimates and more.\n\nTo enable it, enter your free Gemini API key below.</string>
|
||||
<string name="setup_gemini_how">Get your free key at: aistudio.google.com → \"Get API key\"</string>
|
||||
<string name="setup_gemini_hint">Paste your API key here (starts with AIza…)</string>
|
||||
|
||||
<!-- ── Step 7 — Bring! credentials ──────────────────────────────────── -->
|
||||
<string name="setup_bring_title">Bring! Shopping List</string>
|
||||
<string name="setup_bring_desc">EverShelf can sync your shopping list with the Bring! app.\n\nEnter your Bring! account credentials to enable this integration.</string>
|
||||
<string name="setup_bring_email_hint">Bring! email address</string>
|
||||
<string name="setup_bring_pass_hint">Bring! password</string>
|
||||
|
||||
<!-- ── Step 8 — Done ─────────────────────────────────────────────────── -->
|
||||
<string name="setup_done_title">All set!</string>
|
||||
<string name="setup_done_desc">Setup is complete. Press the button below to launch EverShelf in kiosk mode.</string>
|
||||
<string name="setup_done_summary_label">CONFIGURATION SUMMARY</string>
|
||||
|
||||
<!-- ── Summary lines ─────────────────────────────────────────────────── -->
|
||||
<string name="summary_lang">Language</string>
|
||||
<string name="summary_scale_skip">Scale: not configured</string>
|
||||
<string name="summary_screensaver_on">Screensaver: enabled</string>
|
||||
<string name="summary_screensaver_off">Screen always on (screensaver disabled)</string>
|
||||
<string name="summary_prices_on">Shopping list prices: enabled</string>
|
||||
<string name="summary_mealplan_on">Meal plan: enabled</string>
|
||||
<string name="summary_zerowaste_on">Zero-waste tips: enabled</string>
|
||||
<string name="summary_gemini_set">Gemini AI: enabled</string>
|
||||
<string name="summary_gemini_skip">Gemini AI: not configured</string>
|
||||
<string name="summary_bring_set">Bring!: connected</string>
|
||||
<string name="summary_bring_skip">Bring!: not configured</string>
|
||||
<string name="ble_connecting_to">🔗 Connecting to %s…</string>
|
||||
<string name="ble_connecting">🔗 Connecting…</string>
|
||||
<string name="summary_scale_ok">Scale: %s</string>
|
||||
<string name="summary_scale_warn">Scale: not confirmed</string>
|
||||
</resources>
|
||||
|
||||
+405
-85
@@ -11,7 +11,7 @@
|
||||
<title>EverShelf</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link rel="icon" type="image/png" href="assets/img/logo/logo_icon.png">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=20260520a">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=20260517a">
|
||||
<!-- QuaggaJS for barcode scanning -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@ericblade/quagga2@1.8.4/dist/quagga.min.js"></script>
|
||||
<!-- @xenova/transformers: ES-module bootstrap that exposes a lazy category-classifier as window._categoryPipelinePromise -->
|
||||
@@ -55,10 +55,16 @@
|
||||
<div class="app-preloader-inner">
|
||||
<img src="assets/img/logo/logo.png" alt="EverShelf" class="app-preloader-logo" />
|
||||
<div class="app-preloader-spinner" id="preloader-spinner"></div>
|
||||
<div id="preloader-checks" class="preloader-checks" style="display:none"></div>
|
||||
<div id="preloader-progress-wrap" class="preloader-progress-wrap" style="display:none">
|
||||
<div class="preloader-bar-track">
|
||||
<div id="preloader-bar" class="preloader-bar"></div>
|
||||
</div>
|
||||
<div id="check-ticker" class="check-ticker"></div>
|
||||
</div>
|
||||
<div id="preloader-warnings" class="preloader-warnings" style="display:none"></div>
|
||||
<div id="preloader-error-msg" class="preloader-error-msg" style="display:none"></div>
|
||||
<button id="preloader-retry-btn" class="preloader-retry-btn" style="display:none" onclick="_startupRetry()">🔄 <span data-i18n="startup.retry">Riprova</span></button>
|
||||
<span class="app-preloader-version" id="preloader-version">v1.7.20</span>
|
||||
<span class="app-preloader-version" id="preloader-version">v1.7.25</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -71,7 +77,7 @@
|
||||
<!-- Title — left-aligned; grows to fill space -->
|
||||
<div class="header-title-wrap">
|
||||
<h1 class="header-title" onclick="showPage('dashboard')">
|
||||
<img src="assets/img/logo/logo_icon.png" alt="" class="header-logo-icon" aria-hidden="true" /><span data-i18n="nav.title">EverShelf</span><span class="header-version">v1.7.20</span>
|
||||
<img src="assets/img/logo/logo_icon.png" alt="" class="header-logo-icon" aria-hidden="true" /><span data-i18n="nav.title">EverShelf</span><span class="header-version">v1.7.25</span>
|
||||
</h1>
|
||||
<!-- Update badge — shown alongside title, never replaces it -->
|
||||
<span class="header-update-badge" id="header-update-badge" style="display:none"></span>
|
||||
@@ -325,8 +331,9 @@
|
||||
</div>
|
||||
<!-- Banner: shopping list scan context -->
|
||||
<div id="shopping-scan-target-banner" class="shopping-scan-target-banner" style="display:none"></div>
|
||||
<div class="product-preview product-preview-large" id="action-product-preview"></div>
|
||||
<div class="product-preview product-preview-small" id="action-product-preview"></div>
|
||||
<div class="inventory-status-bar" id="action-inventory-status" style="display:none"></div>
|
||||
<div id="action-related-stock" style="display:none"></div>
|
||||
<div class="action-buttons" id="action-buttons-container">
|
||||
<button class="btn btn-huge btn-success" onclick="showAddForm()">
|
||||
<span class="btn-icon">📥</span>
|
||||
@@ -665,7 +672,7 @@
|
||||
<h2 data-i18n="recipes.title">🍳 Ricette</h2>
|
||||
</div>
|
||||
<div class="recipe-page-container">
|
||||
<button class="btn btn-large btn-success full-width" onclick="openRecipeDialog()" data-i18n="recipes.generate">
|
||||
<button class="btn btn-large btn-success full-width recipe-generate-btn" onclick="openRecipeDialog()" data-i18n="recipes.generate">
|
||||
✨ Genera nuova ricetta
|
||||
</button>
|
||||
<div id="recipe-archive" class="recipe-archive"></div>
|
||||
@@ -825,20 +832,119 @@
|
||||
<h2 data-i18n="settings.title">⚙️ Configurazione</h2>
|
||||
</div>
|
||||
<div class="settings-tabs">
|
||||
<button class="settings-tab active" onclick="switchSettingsTab(this, 'tab-api')" data-tab="tab-api" title="API Keys">🔑</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-bring')" data-tab="tab-bring" title="Bring!">🛒</button>
|
||||
<button class="settings-tab active" onclick="switchSettingsTab(this, 'tab-general')" data-tab="tab-general" data-i18n-title="settings.tab_general" title="Generali">⚙️</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-api')" data-tab="tab-api" title="API Keys">🔑</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-bring')" data-tab="tab-bring" data-i18n-title="settings.shopping.tab" title="Lista spesa">🛒</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-recipe')" data-tab="tab-recipe" title="Ricette">🍳</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-mealplan')" data-tab="tab-mealplan" title="Piano Settimanale">📅</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-appliances')" data-tab="tab-appliances" title="Elettrodomestici">🔌</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-camera')" data-tab="tab-camera" title="Fotocamera">📷</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-security')" data-tab="tab-security" title="Sicurezza">🔒</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-tts')" data-tab="tab-tts" title="Voce (TTS)" data-i18n-title="settings.tab_tts">🔊</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-language')" data-tab="tab-language" title="Lingua" data-i18n-title="settings.tab_language">🌐</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-ha'); _loadHaTab();" data-tab="tab-ha" title="Home Assistant" data-i18n-title="settings.ha.tab">🏠</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-scale')" data-tab="tab-scale" title="Bilancia Smart" data-i18n-title="settings.scale.tab">⚖️</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-backup'); _loadBackupTab();" data-tab="tab-backup" data-i18n-title="settings.backup.tab" title="Backup">💾</button>
|
||||
<button class="settings-tab" onclick="switchSettingsTab(this, 'tab-info'); _loadInfoTab();" data-tab="tab-info" data-i18n-title="settings.info.tab" title="Info">ℹ️</button>
|
||||
</div>
|
||||
<div class="settings-panels">
|
||||
<!-- Generali Tab -->
|
||||
<div class="settings-panel active" id="tab-general">
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.language.title">🌐 Lingua / Language</h4>
|
||||
<p class="settings-hint" data-i18n="settings.language.hint">Seleziona la lingua dell'interfaccia. Select the interface language.</p>
|
||||
<div class="form-group">
|
||||
<select id="setting-language" class="form-input" onchange="changeLanguage(this.value)">
|
||||
</select>
|
||||
<p class="settings-hint mt-2" data-i18n="settings.language.restart_notice">La pagina verrà ricaricata per applicare la nuova lingua.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.info.currency_title">💱 Valuta</h4>
|
||||
<p class="settings-hint" data-i18n="settings.info.currency_hint">La valuta usata per tutti i costi e i prezzi nell'app.</p>
|
||||
<div class="form-group" style="margin-top:8px">
|
||||
<select id="setting-price-currency" class="form-input">
|
||||
<option value="EUR">€ Euro (EUR)</option>
|
||||
<option value="USD">$ Dollaro USA (USD)</option>
|
||||
<option value="GBP">£ Sterlina (GBP)</option>
|
||||
<option value="CHF">CHF Franco Svizzero</option>
|
||||
<option value="CAD">CA$ Dollaro Canadese</option>
|
||||
<option value="AUD">A$ Dollaro Australiano</option>
|
||||
<option value="BRL">R$ Real Brasiliano</option>
|
||||
<option value="JPY">¥ Yen Giapponese</option>
|
||||
<option value="SEK">kr Corona Svedese</option>
|
||||
<option value="NOK">kr Corona Norvegese</option>
|
||||
<option value="DKK">kr Corona Danese</option>
|
||||
<option value="PLN">zł Zloty Polacco</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" style="margin-top:10px">
|
||||
<button class="btn btn-primary" onclick="saveSettings()" data-i18n="btn.save">Salva</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.theme.title">🌙 Tema / Aspetto</h4>
|
||||
<p class="settings-hint" data-i18n="settings.theme.hint">Scegli il tema dell'interfaccia.</p>
|
||||
<div class="form-group">
|
||||
<select id="setting-dark-mode" class="form-input" onchange="_setThemeMode(this.value)">
|
||||
<option value="off" data-i18n="settings.theme.off">☀️ Chiaro</option>
|
||||
<option value="auto" selected data-i18n="settings.theme.auto">🔄 Automatico (orario)</option>
|
||||
<option value="on" data-i18n="settings.theme.on">🌙 Scuro</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.screensaver.card_title">🌙 Salvaschermo</h4>
|
||||
<p class="settings-hint" data-i18n="settings.screensaver.card_hint">Mostra un orologio con fatti utili dopo un periodo di inattività. Di default è disattivato.</p>
|
||||
<div class="form-group">
|
||||
<label class="toggle-row">
|
||||
<span data-i18n="settings.screensaver.label">Attiva salvaschermo</span>
|
||||
<span class="toggle-switch">
|
||||
<input type="checkbox" id="setting-screensaver-enabled">
|
||||
<span class="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group" id="screensaver-timeout-row" style="margin-top:10px">
|
||||
<label for="setting-screensaver-timeout" style="font-size:0.85rem;font-weight:600;color:var(--text-secondary)" data-i18n="settings.screensaver.start_after">⏱️ Avvia dopo</label>
|
||||
<select id="setting-screensaver-timeout" class="form-input" style="margin-top:6px;max-width:200px">
|
||||
<option value="1" data-i18n="settings.screensaver.timeout_1">1 minuto</option>
|
||||
<option value="2" data-i18n="settings.screensaver.timeout_2">2 minuti</option>
|
||||
<option value="5" selected data-i18n="settings.screensaver.timeout_5">5 minuti</option>
|
||||
<option value="10" data-i18n="settings.screensaver.timeout_10">10 minuti</option>
|
||||
<option value="15" data-i18n="settings.screensaver.timeout_15">15 minuti</option>
|
||||
<option value="30" data-i18n="settings.screensaver.timeout_30">30 minuti</option>
|
||||
<option value="60" data-i18n="settings.screensaver.timeout_60">1 ora</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.zerowaste.card_title">♻️ Suggerimenti zero-waste</h4>
|
||||
<p class="settings-hint" data-i18n="settings.zerowaste.card_hint">Durante la cottura, mostra consigli su come riutilizzare gli scarti prodotti in ogni passo (bucce, acqua di cottura, ecc.). Disattivo per impostazione predefinita.</p>
|
||||
<div class="form-group">
|
||||
<label class="toggle-row">
|
||||
<span data-i18n="settings.zerowaste.label">Mostra suggerimenti durante la cottura</span>
|
||||
<span class="toggle-switch">
|
||||
<input type="checkbox" id="setting-zerowaste-tips">
|
||||
<span class="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="export.title">📤 Esporta inventario</h4>
|
||||
<p class="settings-hint" data-i18n="export.hint">Scarica l'inventario corrente in CSV o apri una versione stampabile (PDF).</p>
|
||||
<div style="display:flex;gap:8px;flex-wrap:wrap">
|
||||
<button class="btn btn-outline" onclick="exportInventory('csv')" style="flex:1;min-width:120px">
|
||||
📊 <span data-i18n="export.btn_csv">CSV</span>
|
||||
</button>
|
||||
<button class="btn btn-outline" onclick="exportInventory('html')" style="flex:1;min-width:120px">
|
||||
🖨️ <span data-i18n="export.btn_pdf">PDF / Stampa</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- API Keys Tab -->
|
||||
<div class="settings-panel active" id="tab-api">
|
||||
<div class="settings-panel" id="tab-api">
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.gemini.title">🤖 Google Gemini AI</h4>
|
||||
<p class="settings-hint" data-i18n="settings.gemini.hint">Chiave API per identificazione prodotti, scadenze e ricette.</p>
|
||||
@@ -851,9 +957,36 @@
|
||||
</div>
|
||||
<!-- Bring! Tab -->
|
||||
<div class="settings-panel" id="tab-bring">
|
||||
<!-- Shopping enable + provider -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.bring.title">🛒 Bring! Shopping List</h4>
|
||||
<p class="settings-hint" data-i18n="settings.bring.hint">Credenziali per l'integrazione con la lista della spesa Bring!</p>
|
||||
<h4 data-i18n="settings.shopping.title">🛒 Lista della spesa</h4>
|
||||
<p class="settings-hint" data-i18n="settings.shopping.hint">Configura la lista della spesa integrata o collega Bring!.</p>
|
||||
<div class="form-group">
|
||||
<label class="toggle-row">
|
||||
<span data-i18n="settings.shopping.enable_label">Abilita lista della spesa</span>
|
||||
<span class="toggle-switch">
|
||||
<input type="checkbox" id="setting-shopping-enabled" onchange="onShoppingEnabledChange()">
|
||||
<span class="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group" id="shopping-mode-group">
|
||||
<label data-i18n="settings.shopping.mode_label">Provider</label>
|
||||
<div class="radio-group" style="margin-top:6px">
|
||||
<label class="radio-option">
|
||||
<input type="radio" name="shopping-mode" value="internal" onchange="onShoppingModeChange(this.value)">
|
||||
<span data-i18n="settings.shopping.mode_internal">Interno (senza Bring!)</span>
|
||||
</label>
|
||||
<label class="radio-option" style="margin-left:16px">
|
||||
<input type="radio" name="shopping-mode" value="bring" onchange="onShoppingModeChange(this.value)">
|
||||
<span data-i18n="settings.shopping.mode_bring">Bring! (app esterna)</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Bring! sub-section (shown only when mode = bring) -->
|
||||
<div class="settings-card" id="bring-subsection" style="display:none;margin-top:12px">
|
||||
<h4 data-i18n="settings.shopping.bring_section_title">Configurazione Bring!</h4>
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.bring.email_label">📧 Email Bring!</label>
|
||||
<input type="email" id="setting-bring-email" class="form-input" placeholder="email@esempio.com">
|
||||
@@ -864,6 +997,37 @@
|
||||
<button class="btn btn-small btn-secondary mt-2" onclick="togglePasswordVisibility('setting-bring-password')" data-i18n="btn.toggle_password">👁️ Mostra/Nascondi</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Smart suggestions + forecast -->
|
||||
<div class="settings-card" style="margin-top:12px">
|
||||
<h4 data-i18n="settings.shopping.ai_section_title">Assistenza AI</h4>
|
||||
<div class="form-group">
|
||||
<label class="toggle-row">
|
||||
<span data-i18n="settings.shopping.smart_suggestions_label">Suggerimenti AI</span>
|
||||
<span class="toggle-switch">
|
||||
<input type="checkbox" id="setting-shopping-smart-suggestions">
|
||||
<span class="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="toggle-row">
|
||||
<span data-i18n="settings.shopping.forecast_label">Previsione prodotti in esaurimento</span>
|
||||
<span class="toggle-switch">
|
||||
<input type="checkbox" id="setting-shopping-forecast">
|
||||
<span class="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group" style="margin-top:8px">
|
||||
<label data-i18n="settings.shopping.auto_add_label">Aggiungi automaticamente quando</label>
|
||||
<div class="qty-control" style="margin-top:6px">
|
||||
<button type="button" class="qty-btn" onclick="adjustQty('setting-shopping-auto-add', -1, 0, 20)">−</button>
|
||||
<input type="number" id="setting-shopping-auto-add" value="0" min="0" max="20" class="qty-input">
|
||||
<button type="button" class="qty-btn" onclick="adjustQty('setting-shopping-auto-add', 1, 0, 20)">+</button>
|
||||
</div>
|
||||
<p class="settings-hint" data-i18n="settings.shopping.auto_add_suffix">rimasto in magazzino (0 = solo quando esaurito)</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Price Estimation Settings -->
|
||||
<div class="settings-card" style="margin-top:12px">
|
||||
<h4 data-i18n="settings.price.title">💰 Stima Prezzi (AI)</h4>
|
||||
@@ -897,23 +1061,6 @@
|
||||
<option value="Japan">🇯🇵 Giappone</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.price.currency_label">💱 Valuta</label>
|
||||
<select id="setting-price-currency" class="form-input">
|
||||
<option value="EUR">€ Euro (EUR)</option>
|
||||
<option value="USD">$ Dollaro USA (USD)</option>
|
||||
<option value="GBP">£ Sterlina (GBP)</option>
|
||||
<option value="CHF">CHF Franco Svizzero</option>
|
||||
<option value="CAD">CA$ Dollaro Canadese</option>
|
||||
<option value="AUD">A$ Dollaro Australiano</option>
|
||||
<option value="BRL">R$ Real Brasiliano</option>
|
||||
<option value="JPY">¥ Yen Giapponese</option>
|
||||
<option value="SEK">kr Corona Svedese</option>
|
||||
<option value="NOK">kr Corona Norvegese</option>
|
||||
<option value="DKK">kr Corona Danese</option>
|
||||
<option value="PLN">zł Zloty Polacco</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.price.update_label">🔄 Aggiorna prezzi ogni</label>
|
||||
<div class="qty-control">
|
||||
@@ -1169,8 +1316,124 @@
|
||||
|
||||
<button class="btn btn-large btn-accent full-width mt-2" onclick="testTTS()" data-i18n="settings.tts.test_btn">🔊 Invia Test Vocale</button>
|
||||
<div id="tts-test-status" style="display:none;margin-top:8px"></div>
|
||||
<!-- HA TTS quick-fill hint -->
|
||||
<div style="margin-top:12px;padding:10px 12px;background:rgba(3,169,244,0.07);border:1px solid rgba(3,169,244,0.25);border-radius:8px;font-size:0.82rem">
|
||||
<span data-i18n="settings.tts.ha_hint">🏠 Se usi Home Assistant, usa il tab <strong>Home Assistant</strong> per configurare TTS, webhook e sensori.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Home Assistant Tab -->
|
||||
<div class="settings-panel" id="tab-ha">
|
||||
<!-- Connection card -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.ha.title">🏠 Home Assistant</h4>
|
||||
<p class="settings-hint" data-i18n="settings.ha.hint">Integra EverShelf con Home Assistant: TTS su speaker smart, webhook per automazioni, sensori per la dashboard.</p>
|
||||
|
||||
<div class="form-group" style="margin-bottom:10px">
|
||||
<label class="toggle-row">
|
||||
<span data-i18n="settings.ha.enabled">✅ Abilita integrazione Home Assistant</span>
|
||||
<span class="toggle-switch">
|
||||
<input type="checkbox" id="setting-ha-enabled" onchange="onHaEnabledChange()">
|
||||
<span class="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="ha-config-section">
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.ha.url_label">🌐 Home Assistant URL</label>
|
||||
<input type="url" id="setting-ha-url" class="form-input" placeholder="http://192.168.1.50:8123">
|
||||
<p class="settings-hint" data-i18n="settings.ha.url_hint">URL base della tua istanza HA (senza slash finale). Es: <code>http://homeassistant.local:8123</code></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.ha.token_label">🔑 Long-Lived Access Token</label>
|
||||
<div style="display:flex;gap:8px;align-items:center">
|
||||
<input type="password" id="setting-ha-token" class="form-input" style="flex:1" placeholder="eyJhbGci...">
|
||||
<button class="btn btn-secondary" style="flex-shrink:0" onclick="togglePasswordVisibility('setting-ha-token')" data-i18n="btn.toggle_password">👁️</button>
|
||||
</div>
|
||||
<p class="settings-hint" data-i18n="settings.ha.token_hint">Genera un token in HA → Profilo → Token di accesso a lungo termine.</p>
|
||||
</div>
|
||||
<button class="btn btn-secondary full-width" onclick="testHaConnection()" data-i18n="settings.ha.test_btn">🔗 Testa connessione HA</button>
|
||||
<div id="ha-test-status" style="display:none;margin-top:8px" class="settings-status"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TTS via HA card -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.ha.tts_title">🔊 TTS su Speaker Smart</h4>
|
||||
<p class="settings-hint" data-i18n="settings.ha.tts_hint">Leggi i passi della ricetta su un altoparlante gestito da HA (Sonos, Echo, Google Home, ecc.).</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.ha.tts_entity_label">🔈 Entity ID del media player</label>
|
||||
<input type="text" id="setting-ha-tts-entity" class="form-input" placeholder="media_player.living_room">
|
||||
<p class="settings-hint" data-i18n="settings.ha.tts_entity_hint">Copia l'entity ID del media player da HA → Strumenti sviluppatore → Stati.</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.ha.tts_platform_label">🎙️ Piattaforma TTS</label>
|
||||
<select id="setting-ha-tts-platform" class="form-input">
|
||||
<option value="tts.speak" data-i18n="settings.ha.tts_platform_speak">tts.speak (raccomandato)</option>
|
||||
<option value="notify" data-i18n="settings.ha.tts_platform_notify">notify.* (servizio notifiche)</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn-secondary full-width" onclick="applyHaTtsPreset()" data-i18n="settings.ha.tts_apply_btn">✅ Applica preset HA al TTS</button>
|
||||
<p class="settings-hint mt-2" data-i18n="settings.ha.tts_apply_hint">Configura automaticamente il tab TTS con i parametri HA corretti.</p>
|
||||
</div>
|
||||
|
||||
<!-- Webhook card -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.ha.webhook_title">⚡ Automazioni Webhook</h4>
|
||||
<p class="settings-hint" data-i18n="settings.ha.webhook_hint">EverShelf chiama il webhook HA quando si verificano eventi (prodotto in scadenza, aggiunto alla lista, ecc.).</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.ha.webhook_id_label">🔗 Webhook ID</label>
|
||||
<input type="text" id="setting-ha-webhook-id" class="form-input" placeholder="evershelf_events">
|
||||
<p class="settings-hint" data-i18n="settings.ha.webhook_id_hint">Crea un'automazione in HA con trigger "Webhook" e copia qui l'ID. <a href="#" onclick="showHaWebhookHelp();return false" style="color:var(--accent)">Come farlo?</a></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.ha.webhook_events_label">📋 Eventi da notificare</label>
|
||||
<div style="display:flex;flex-direction:column;gap:6px;margin-top:4px">
|
||||
<label style="display:flex;align-items:center;gap:8px;font-weight:normal">
|
||||
<input type="checkbox" id="ha-event-expiry" value="expiry"> <span data-i18n="settings.ha.event_expiry">Prodotti in scadenza (cron giornaliero)</span>
|
||||
</label>
|
||||
<label style="display:flex;align-items:center;gap:8px;font-weight:normal">
|
||||
<input type="checkbox" id="ha-event-shopping" value="shopping_add"> <span data-i18n="settings.ha.event_shopping">Aggiunta alla lista della spesa</span>
|
||||
</label>
|
||||
<label style="display:flex;align-items:center;gap:8px;font-weight:normal">
|
||||
<input type="checkbox" id="ha-event-stock" value="stock_update"> <span data-i18n="settings.ha.event_stock">Aggiornamento scorte (quantità modificata)</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.ha.expiry_days_label">📅 Giorni anticipo per scadenze</label>
|
||||
<input type="number" id="setting-ha-expiry-days" class="form-input" min="1" max="30" value="3">
|
||||
<p class="settings-hint" data-i18n="settings.ha.expiry_days_hint">Quanti giorni prima della scadenza inviare l'alert.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Notify service card -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.ha.notify_title">📱 Notifiche Push</h4>
|
||||
<p class="settings-hint" data-i18n="settings.ha.notify_hint">EverShelf invia notifiche push tramite il servizio <code>notify.*</code> di HA (Telegram, Pushover, app mobile, ecc.).</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.ha.notify_service_label">📣 Servizio notify</label>
|
||||
<input type="text" id="setting-ha-notify-service" class="form-input" placeholder="notify.mobile_app_mio_telefono">
|
||||
<p class="settings-hint" data-i18n="settings.ha.notify_service_hint">Formato: <code>notify.NOME_SERVIZIO</code>. Lascia vuoto per disabilitare. Richiede token HA configurato.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sensor card (read-only info) -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.ha.sensor_title">📊 Sensori REST per HA</h4>
|
||||
<p class="settings-hint" data-i18n="settings.ha.sensor_hint">HA può leggere i dati dell'inventario via REST polling. Aggiungi questo snippet a <code>configuration.yaml</code>:</p>
|
||||
<div id="ha-sensor-yaml" style="background:var(--bg-secondary,#f1f5f9);border-radius:8px;padding:12px;font-family:monospace;font-size:0.75rem;white-space:pre;overflow-x:auto;max-height:220px;overflow-y:auto;border:1px solid var(--border,#e2e8f0)"></div>
|
||||
<button class="btn btn-secondary full-width mt-2" onclick="copyHaSensorYaml()" data-i18n="settings.ha.sensor_copy_btn">📋 Copia YAML</button>
|
||||
</div>
|
||||
|
||||
<!-- Save button -->
|
||||
<button class="btn btn-large btn-accent full-width" onclick="saveHaSettings()" data-i18n="settings.ha.save_btn">💾 Salva impostazioni HA</button>
|
||||
<div id="ha-save-status" style="display:none;margin-top:8px" class="settings-status"></div>
|
||||
</div>
|
||||
<!-- Scale Tab -->
|
||||
<div class="settings-panel" id="tab-scale">
|
||||
<div class="settings-card">
|
||||
@@ -1255,77 +1518,123 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- Language Tab -->
|
||||
<div class="settings-panel" id="tab-language">
|
||||
|
||||
<!-- Backup Tab -->
|
||||
<div class="settings-panel" id="tab-backup">
|
||||
<!-- Local Backup -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.language.title">🌐 Lingua / Language</h4>
|
||||
<p class="settings-hint" data-i18n="settings.language.hint">Seleziona la lingua dell'interfaccia. Select the interface language.</p>
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.language.label">🌐 Lingua</label>
|
||||
<select id="setting-language" class="form-input" onchange="changeLanguage(this.value)">
|
||||
</select>
|
||||
<p class="settings-hint mt-2" data-i18n="settings.language.restart_notice">La pagina verrà ricaricata per applicare la nuova lingua.</p>
|
||||
<h4 data-i18n="settings.backup.local_title">💾 Backup Locale</h4>
|
||||
<p class="settings-hint" data-i18n="settings.backup.local_hint">Snapshot giornaliero automatico del database. Massimo 3 giorni di storico (configurabile).</p>
|
||||
<div id="backup-last-info" style="margin-bottom:12px;padding:10px 12px;background:var(--bg-secondary,#f8fafc);border-radius:8px;font-size:0.83rem;color:var(--text-secondary)">
|
||||
<span data-i18n="settings.info.loading">Caricamento…</span>
|
||||
</div>
|
||||
<div class="form-group" style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px">
|
||||
<label data-i18n="settings.backup.retention_days" style="flex-shrink:0">Retention (giorni):</label>
|
||||
<input type="number" id="setting-backup-retention-days" class="form-input" style="width:80px" min="1" max="90" value="3">
|
||||
</div>
|
||||
<button class="btn btn-large btn-accent full-width" onclick="_backupNow()" id="btn-backup-now" data-i18n="settings.backup.backup_now">💾 Backup Ora</button>
|
||||
<div id="backup-status" style="display:none;margin-top:8px" class="settings-status"></div>
|
||||
<!-- List of backups -->
|
||||
<div id="backup-list-container" style="margin-top:14px">
|
||||
<p class="settings-hint" data-i18n="settings.info.loading">Caricamento…</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Google Drive -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.screensaver.card_title">🌙 Salvaschermo</h4>
|
||||
<p class="settings-hint" data-i18n="settings.screensaver.card_hint">Mostra un orologio con fatti utili dopo un periodo di inattività. Di default è disattivato.</p>
|
||||
<div class="form-group">
|
||||
<h4 data-i18n="settings.backup.gdrive_title">☁️ Google Drive</h4>
|
||||
<p class="settings-hint" data-i18n="settings.backup.gdrive_hint">Carica automaticamente il backup su Google Drive usando un Service Account.</p>
|
||||
<div class="form-group" style="margin-bottom:10px">
|
||||
<label class="toggle-row">
|
||||
<span data-i18n="settings.screensaver.label">Attiva salvaschermo</span>
|
||||
<span data-i18n="settings.backup.gdrive_enabled">Abilita backup Google Drive</span>
|
||||
<span class="toggle-switch">
|
||||
<input type="checkbox" id="setting-screensaver-enabled">
|
||||
<input type="checkbox" id="setting-gdrive-enabled" onchange="saveSettings()">
|
||||
<span class="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group" id="screensaver-timeout-row" style="margin-top:10px">
|
||||
<label for="setting-screensaver-timeout" style="font-size:0.85rem;font-weight:600;color:var(--text-secondary)" data-i18n="settings.screensaver.start_after">⏱️ Avvia dopo</label>
|
||||
<select id="setting-screensaver-timeout" class="form-control" style="margin-top:6px;max-width:200px">
|
||||
<option value="1" data-i18n="settings.screensaver.timeout_1">1 minuto</option>
|
||||
<option value="2" data-i18n="settings.screensaver.timeout_2">2 minuti</option>
|
||||
<option value="5" selected data-i18n="settings.screensaver.timeout_5">5 minuti</option>
|
||||
<option value="10" data-i18n="settings.screensaver.timeout_10">10 minuti</option>
|
||||
<option value="15" data-i18n="settings.screensaver.timeout_15">15 minuti</option>
|
||||
<option value="30" data-i18n="settings.screensaver.timeout_30">30 minuti</option>
|
||||
<option value="60" data-i18n="settings.screensaver.timeout_60">1 ora</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.theme.title">🌙 Tema / Aspetto</h4>
|
||||
<p class="settings-hint" data-i18n="settings.theme.hint">Scegli il tema dell'interfaccia.</p>
|
||||
<div id="gdrive-config-section">
|
||||
<!-- Folder ID (shared between both methods) -->
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.theme.label">🌙 Tema</label>
|
||||
<select id="setting-dark-mode" class="form-input" onchange="_setThemeMode(this.value)">
|
||||
<option value="off" data-i18n="settings.theme.off">☀️ Chiaro</option>
|
||||
<option value="auto" selected data-i18n="settings.theme.auto">🔄 Automatico (sistema)</option>
|
||||
<option value="on" data-i18n="settings.theme.on">🌙 Scuro</option>
|
||||
</select>
|
||||
<label data-i18n="settings.backup.gdrive_folder_id">ID Cartella Drive</label>
|
||||
<input type="text" id="setting-gdrive-folder-id" class="form-input" placeholder="1ABCdef_xyz…">
|
||||
<p class="settings-hint" data-i18n="settings.backup.gdrive_folder_id_hint">Copia l'ID dalla URL della cartella Drive: …/folders/<strong>ID</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.zerowaste.card_title">♻️ Suggerimenti zero-waste</h4>
|
||||
<p class="settings-hint" data-i18n="settings.zerowaste.card_hint">Durante la cottura, mostra consigli su come riutilizzare gli scarti prodotti in ogni passo (bucce, acqua di cottura, ecc.). Disattivo per impostazione predefinita.</p>
|
||||
<!-- OAuth 2.0 section -->
|
||||
<div id="gdrive-oauth-section">
|
||||
<details style="margin-bottom:14px;background:var(--bg-secondary,#f8fafc);border-radius:8px;padding:10px 14px">
|
||||
<summary style="cursor:pointer;font-weight:600;font-size:0.83rem" data-i18n="settings.backup.gdrive_oauth_how_to">📋 Come configurare OAuth 2.0 (passo dopo passo)</summary>
|
||||
<ol style="margin:10px 0 0 16px;font-size:0.8rem;color:var(--text-secondary);line-height:1.8" data-i18n-html="settings.backup.gdrive_oauth_steps"></ol>
|
||||
</details>
|
||||
<div class="form-group">
|
||||
<label class="toggle-row">
|
||||
<span data-i18n="settings.zerowaste.label">Mostra suggerimenti durante la cottura</span>
|
||||
<span class="toggle-switch">
|
||||
<input type="checkbox" id="setting-zerowaste-tips">
|
||||
<span class="toggle-slider"></span>
|
||||
</span>
|
||||
</label>
|
||||
<label data-i18n="settings.backup.gdrive_client_id">Client ID</label>
|
||||
<input type="text" id="setting-gdrive-client-id" class="form-input" placeholder="1234567890-abc….apps.googleusercontent.com">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="settings.backup.gdrive_client_secret">Client Secret</label>
|
||||
<input type="password" id="setting-gdrive-client-secret" class="form-input" placeholder="GOCSPX-…">
|
||||
</div>
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="export.title">📤 Esporta inventario</h4>
|
||||
<p class="settings-hint" data-i18n="export.hint">Scarica l'inventario corrente in CSV o apri una versione stampabile (PDF).</p>
|
||||
<div class="form-group" style="background:var(--bg-secondary,#f8fafc);border-radius:8px;padding:10px 14px;font-size:0.82rem">
|
||||
<span data-i18n="settings.backup.gdrive_redirect_uri_label">Redirect URI (aggiungi in Google Cloud Console):</span>
|
||||
<code id="gdrive-redirect-uri-display" style="display:block;margin-top:4px;word-break:break-all;color:var(--text-primary);font-size:0.78rem">http://localhost</code>
|
||||
<p class="settings-hint" style="margin-top:6px;margin-bottom:0" data-i18n="settings.backup.gdrive_redirect_uri_hint">Registra questo URI in Google Cloud Console come "URI di reindirizzamento autorizzato". Per le installazioni senza dominio pubblico usa <strong>http://localhost</strong>.</p>
|
||||
</div>
|
||||
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px">
|
||||
<button class="btn btn-secondary" onclick="_gdriveAuthorize()" id="btn-gdrive-authorize" data-i18n="settings.backup.gdrive_oauth_authorize">🔑 Autorizza con Google</button>
|
||||
<span id="gdrive-oauth-token-status" style="font-size:0.83rem"></span>
|
||||
</div>
|
||||
<!-- Manual code entry (appears after clicking Authorize) -->
|
||||
<div id="gdrive-code-section" style="display:none;margin-top:12px;padding:12px 14px;background:var(--bg-secondary,#f8fafc);border-radius:8px;border:1px solid var(--border)">
|
||||
<p style="font-size:0.82rem;margin-bottom:8px;font-weight:600" data-i18n="settings.backup.gdrive_code_title">Incolla l'URL o il codice di autorizzazione</p>
|
||||
<p class="settings-hint" style="margin-bottom:8px" data-i18n="settings.backup.gdrive_code_hint">Dopo aver autorizzato su Google, il browser proverà ad aprire <code>http://localhost</code> e mostrerà un errore. Copia l'intero URL dalla barra degli indirizzi e incollalo qui sotto.</p>
|
||||
<div style="display:flex;gap:8px;flex-wrap:wrap">
|
||||
<button class="btn btn-outline" onclick="exportInventory('csv')" style="flex:1;min-width:120px">
|
||||
📊 <span data-i18n="export.btn_csv">CSV</span>
|
||||
</button>
|
||||
<button class="btn btn-outline" onclick="exportInventory('html')" style="flex:1;min-width:120px">
|
||||
🖨️ <span data-i18n="export.btn_pdf">PDF / Stampa</span>
|
||||
</button>
|
||||
<input type="text" id="gdrive-code-input" class="form-input" style="flex:1;min-width:0" placeholder="http://localhost/?code=4%2F0A… oppure solo il codice">
|
||||
<button class="btn btn-primary" onclick="_gdriveSubmitCode()" id="btn-gdrive-submit-code" data-i18n="settings.backup.gdrive_code_submit">Conferma</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Retention + action buttons (shared) -->
|
||||
<div class="form-group" style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px">
|
||||
<label data-i18n="settings.backup.gdrive_retention_days" style="flex-shrink:0">Retention Drive (giorni, 0=tutto):</label>
|
||||
<input type="number" id="setting-gdrive-retention-days" class="form-input" style="width:80px" min="0" max="365" value="30">
|
||||
</div>
|
||||
<div style="display:flex;gap:8px;flex-wrap:wrap;margin-top:12px">
|
||||
<button class="btn btn-secondary" onclick="_gdriveTest()" id="btn-gdrive-test" data-i18n="settings.backup.gdrive_test">🔗 Testa Connessione</button>
|
||||
<button class="btn btn-accent" onclick="_gdrivePushNow()" id="btn-gdrive-push" data-i18n="settings.backup.gdrive_push_now">☁️ Carica Ora su Drive</button>
|
||||
</div>
|
||||
<div id="gdrive-test-status" style="display:none;margin-top:8px" class="settings-status"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Info Tab -->
|
||||
<div class="settings-panel" id="tab-info">
|
||||
<!-- Gemini AI Usage card -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.info.ai_title">Gemini AI — Token Usage</h4>
|
||||
<p class="settings-hint info-ai-subtitle" data-i18n="settings.info.ai_overview">Utilizzo AI, inventario e sistema</p>
|
||||
<div id="info-ai-content" style="margin-top:10px">
|
||||
<p class="settings-hint" data-i18n="settings.info.loading">Caricamento…</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Inventory card -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.info.inv_title">Inventario</h4>
|
||||
<div id="info-inv-content" style="margin-top:10px">
|
||||
<p class="settings-hint" data-i18n="settings.info.loading">Caricamento…</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Activity card -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.info.act_title">Attività del mese</h4>
|
||||
<div id="info-act-content" style="margin-top:10px">
|
||||
<p class="settings-hint" data-i18n="settings.info.loading">Caricamento…</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- System Info card -->
|
||||
<div class="settings-card">
|
||||
<h4 data-i18n="settings.info.system_title">Sistema</h4>
|
||||
<div id="info-system-content" style="margin-top:10px">
|
||||
<p class="settings-hint" data-i18n="settings.info.loading">Caricamento…</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1566,6 +1875,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== NETWORK ERROR OVERLAY ===== -->
|
||||
<div id="network-error-overlay" style="display:none" aria-live="assertive" role="alert">
|
||||
<div class="net-error-body">
|
||||
<div class="net-error-icon" id="net-error-icon">📡</div>
|
||||
<div class="net-error-title" id="net-error-title" data-i18n="error.offline_title">Nessuna connessione</div>
|
||||
<div class="net-error-subtitle" id="net-error-subtitle" data-i18n="error.offline_subtitle">L'app non riesce a raggiungere il server. Verifica la connessione Wi-Fi.</div>
|
||||
<div class="net-error-status" id="net-error-status"></div>
|
||||
<button class="net-error-continue-btn" id="net-error-continue-btn" onclick="_enterOfflineMode()" data-i18n="error.offline_continue" style="display:none">Continua in modalità offline</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===== COOKING MODE OVERLAY ===== -->
|
||||
<div id="cooking-overlay" class="cooking-overlay" style="display:none" aria-live="polite">
|
||||
<div id="cooking-flash-overlay" class="cooking-flash-overlay"></div>
|
||||
@@ -1607,6 +1927,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/app.js?v=20260520a"></script>
|
||||
<script src="assets/js/app.js?v=20260518c"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# logs/
|
||||
|
||||
This directory contains EverShelf runtime log files.
|
||||
|
||||
Files are generated automatically by `api/logger.php` and follow the naming pattern:
|
||||
|
||||
```
|
||||
evershelf_YYYY-MM-DD_HH.log
|
||||
```
|
||||
|
||||
The directory is tracked in git (via this README) but `.log` files are ignored via `.gitignore`.
|
||||
|
||||
## Configuration (`.env`)
|
||||
|
||||
| Variable | Default | Description |
|
||||
|---|---|---|
|
||||
| `LOG_LEVEL` | `INFO` | Minimum log level: `DEBUG`, `INFO`, `WARN`, `ERROR` |
|
||||
| `LOG_ROTATE_HOURS` | `24` | Hours per file before rotating |
|
||||
| `LOG_MAX_FILES` | `14` | Maximum number of rotated files to keep |
|
||||
|
||||
## Format
|
||||
|
||||
```
|
||||
[2026-05-18 14:23:11] [INFO ] [rid=a1b2c3d4] [action] Message {"ctx":"value"}
|
||||
```
|
||||
|
||||
## Remote inspection
|
||||
|
||||
```
|
||||
GET /api/?action=get_logs&lines=100&level=WARN
|
||||
```
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "EverShelf",
|
||||
"short_name": "EverShelf",
|
||||
"description": "Gestione completa della dispensa di casa con scansione barcode",
|
||||
"version": "1.7.20",
|
||||
"version": "1.7.25",
|
||||
"start_url": "/evershelf/",
|
||||
"display": "standalone",
|
||||
"background_color": "#f0f4e8",
|
||||
|
||||
+219
-17
@@ -113,6 +113,8 @@
|
||||
"banner_expired_action_finished": "Habe ich verbraucht!",
|
||||
"banner_expired_action_throw": "Habe ich weggeworfen",
|
||||
"banner_expired_action_edit": "Datum korrigieren",
|
||||
"banner_expired_action_modify": "Bearbeiten",
|
||||
"banner_expired_action_vacuum": "Vakuumieren",
|
||||
"banner_anomaly_action_edit": "Bestand korrigieren",
|
||||
"banner_anomaly_action_dismiss": "Menge ist korrekt",
|
||||
"banner_no_expiry_title": "Ablaufdatum fehlt: {name}",
|
||||
@@ -211,13 +213,14 @@
|
||||
"barcode_acquired": "🔖 Barcode gescannt: {code}",
|
||||
"scan_barcode": "🔖 Barcode scannen",
|
||||
"create_named": "{name} erstellen",
|
||||
"new_without_barcode": "Neues Produkt ohne Barcode"
|
||||
"new_without_barcode": "Neues Produkt ohne Barcode",
|
||||
"stock_in_pantry": "Bereits im Vorrat:"
|
||||
},
|
||||
"action": {
|
||||
"title": "Was möchtest du tun?",
|
||||
"add_btn": "📥 HINZUFÜGEN",
|
||||
"add_sub": "in Vorrat/Kühlschrank",
|
||||
"use_btn": "📤 VERWENDEN / VERBRAUCHEN",
|
||||
"use_btn": "VERWENDEN",
|
||||
"use_sub": "aus Vorrat/Kühlschrank",
|
||||
"have_title": "📦 Schon auf Lager!",
|
||||
"add_more_sub": "weitere Menge",
|
||||
@@ -225,7 +228,8 @@
|
||||
"throw_btn": "🗑️ ENTSORGEN",
|
||||
"throw_sub": "wegwerfen",
|
||||
"edit_sub": "Ablauf, Ort…",
|
||||
"create_recipe_btn": "Rezept"
|
||||
"create_recipe_btn": "Rezept",
|
||||
"related_stock_title": "Auch zuhause"
|
||||
},
|
||||
"add": {
|
||||
"title": "Zum Vorrat hinzufügen",
|
||||
@@ -363,6 +367,7 @@
|
||||
"steps_title": "👨🍳 Zubereitung",
|
||||
"no_steps": "Keine Zubereitungsschritte verfügbar",
|
||||
"generate_error": "Fehler bei der Generierung",
|
||||
"stream_interrupted": "Generierung unterbrochen (unvollstaendige Antwort vom Server). Protokolle pruefen oder erneut versuchen.",
|
||||
"persons_short": "Pers.",
|
||||
"use_ingredient_title": "Zutat verwenden",
|
||||
"recipe_qty_label": "Rezept",
|
||||
@@ -471,7 +476,8 @@
|
||||
"priority_medium": "Mittel",
|
||||
"priority_low": "Niedrig",
|
||||
"smart_last_update": "Aktualisiert {time}",
|
||||
"names_already_updated": "Alle Namen sind bereits aktuell"
|
||||
"names_already_updated": "Alle Namen sind bereits aktuell",
|
||||
"pantry_hint": "Bereits zuhause: {qty}"
|
||||
},
|
||||
"ai": {
|
||||
"title": "🤖 KI-Identifikation",
|
||||
@@ -533,7 +539,7 @@
|
||||
"prev": "◀ Zurück",
|
||||
"next": "Weiter ▶",
|
||||
"ingredient_used": "✔️ Abgezogen",
|
||||
"ingredient_use_btn": "📦 Verwenden",
|
||||
"ingredient_use_btn": "Usa",
|
||||
"ingredient_deduct_title": "Von Vorrat abziehen",
|
||||
"timer_expired_tts": "Timer {label} abgelaufen!",
|
||||
"timer_warning_tts": "Achtung! {label}: noch 10 Sekunden!",
|
||||
@@ -753,12 +759,169 @@
|
||||
"label": "🌙 Design",
|
||||
"off": "☀️ Hell",
|
||||
"on": "🌙 Dunkel",
|
||||
"auto": "🔄 Automatisch (System)"
|
||||
"auto": "🔄 Automatisch (Tageszeit)"
|
||||
},
|
||||
"zerowaste": {
|
||||
"card_title": "♻️ Zero-Waste-Tipps",
|
||||
"card_hint": "Zeige während des Kochens Tipps zur Wiederverwendung von Abfällen (Schalen, Kochwasser usw.). Standardmäßig deaktiviert.",
|
||||
"label": "Tipps beim Kochen anzeigen"
|
||||
},
|
||||
"backup": {
|
||||
"tab": "Backup",
|
||||
"local_title": "Lokales Backup",
|
||||
"local_hint": "Täglicher Datenbank-Snapshot. Konfiguriere, wie viele Tage Backups aufbewahrt werden.",
|
||||
"enabled": "Tägliches automatisches Backup aktivieren",
|
||||
"retention_days": "Aufbewahrung (Tage)",
|
||||
"retention_info": "Backups werden aufbewahrt für",
|
||||
"backup_now": "Jetzt sichern",
|
||||
"backing_up": "Sicherung läuft…",
|
||||
"backed_up": "Sicherung abgeschlossen",
|
||||
"backup_error": "Sicherungsfehler",
|
||||
"last_backup": "Letztes Backup",
|
||||
"no_backup_yet": "Noch kein Backup erstellt",
|
||||
"list_empty": "Keine Backups verfügbar",
|
||||
"restore_btn": "Wiederherstellen",
|
||||
"restore_confirm": "Backup wiederherstellen",
|
||||
"delete_btn": "Löschen",
|
||||
"delete_confirm": "Backup löschen",
|
||||
"gdrive_title": "Google Drive",
|
||||
"gdrive_hint": "Backups automatisch via OAuth 2.0 auf Google Drive hochladen. Keine externen Bibliotheken erforderlich.",
|
||||
"gdrive_enabled": "Google Drive Backup aktivieren",
|
||||
"gdrive_folder_id": "Drive-Ordner-ID",
|
||||
"gdrive_folder_id_hint": "Kopiere die ID aus der Drive-Ordner-URL: …/folders/<strong>ID</strong>",
|
||||
"gdrive_retention_days": "Drive-Aufbewahrung (Tage, 0=alles behalten)",
|
||||
"gdrive_test": "Verbindung testen",
|
||||
"gdrive_ok": "Verbindung erfolgreich!",
|
||||
"gdrive_error": "Verbindung fehlgeschlagen",
|
||||
"gdrive_push_now": "Jetzt auf Drive hochladen",
|
||||
"gdrive_pushing": "Wird hochgeladen…",
|
||||
"gdrive_pushed": "Auf Drive hochgeladen",
|
||||
"gdrive_wizard_hint": "Optional: täglich automatisch via OAuth 2.0 auf Google Drive sichern.",
|
||||
"gdrive_skip": "Überspringen — später in Einstellungen konfigurieren",
|
||||
"gdrive_client_id": "Client-ID",
|
||||
"gdrive_client_secret": "Client-Secret",
|
||||
"gdrive_redirect_uri_hint": "Füge <strong>http://localhost</strong> als autorisierten Weiterleitungs-URI in der Google Cloud Console hinzu. Funktioniert auf jedem Server, auch ohne öffentliche Domain.",
|
||||
"gdrive_code_title": "Autorisierungs-URL oder Code einfügen",
|
||||
"gdrive_code_hint": "Nach der Autorisierung öffnet der Browser http://localhost und zeigt möglicherweise einen Verbindungsfehler — das ist normal. Kopiere die URL aus der Adressleiste (z.B. <code>http://localhost/?code=4%2F0A...</code>) und füge sie hier ein.",
|
||||
"gdrive_code_submit": "Bestätigen",
|
||||
"gdrive_code_empty": "Bitte zuerst die URL oder den Autorisierungscode einfügen",
|
||||
"gdrive_redirect_uri_label": "Redirect-URI (in Google Cloud Console eintragen):",
|
||||
"gdrive_oauth_authorize": "Mit Google autorisieren",
|
||||
"gdrive_oauth_authorized": "Autorisiert",
|
||||
"gdrive_oauth_not_authorized": "Noch nicht autorisiert",
|
||||
"gdrive_oauth_window_opened": "Browserfenster geöffnet — autorisieren und zurückkehren",
|
||||
"gdrive_oauth_how_to": "OAuth 2.0 einrichten (Schritt für Schritt)",
|
||||
"gdrive_oauth_steps": "<li>Gehe zu <a href='https://console.cloud.google.com/' target='_blank' rel='noopener'>console.cloud.google.com</a> und wähle dein Projekt</li><li>Aktiviere die <strong>Google Drive API</strong>: <em>APIs & Dienste → APIs aktivieren → Google Drive API</em></li><li>Gehe zu <em>APIs & Dienste → Anmeldedaten → Anmeldedaten erstellen → OAuth-Client-ID</em></li><li>Anwendungstyp: <strong>Webanwendung</strong>; füge die unten angezeigte URL als <em>Autorisierter Weiterleitungs-URI</em> hinzu</li><li>Kopiere <strong>Client-ID</strong> und <strong>Client-Secret</strong> in die Felder oben und speichere</li><li>Klicke auf <strong>Mit Google autorisieren</strong>: melde dich an und erteile den Zugriff</li><li>Das Fenster schließt sich automatisch und Backups sind bereit</li>"
|
||||
},
|
||||
"info": {
|
||||
"tab": "Info",
|
||||
"ai_title": "Gemini AI — Token-Nutzung",
|
||||
"ai_hint": "Monatlicher Verbrauch und geschätzte Kosten für den aktuellen API-Schlüssel.",
|
||||
"loading": "Laden…",
|
||||
"total_tokens": "Token gesamt",
|
||||
"est_cost": "Gesch. Kosten",
|
||||
"input_tok": "Eingabe-Token",
|
||||
"output_tok": "Ausgabe-Token",
|
||||
"ai_calls": "Aufrufe",
|
||||
"by_action": "Aufschlüsselung nach Funktion",
|
||||
"by_model": "Aufschlüsselung nach Modell",
|
||||
"pricing_note": "Gemini Referenzpreise: 2.5-flash $0.15/M in · $0.60/M out — 2.0-flash $0.10/M in · $0.40/M out.",
|
||||
"system_title": "System",
|
||||
"db_size": "Datenbank",
|
||||
"log_size": "Protokolle",
|
||||
"log_level": "Log-Level",
|
||||
"ai_overview": "KI-Nutzungsübersicht, Inventar und Systemstatus",
|
||||
"calls_unit": "Aufrufe",
|
||||
"inv_title": "Inventar",
|
||||
"inv_active": "Aktiv",
|
||||
"inv_products": "Produkte gesamt",
|
||||
"inv_expiring": "Ablaufend (7T)",
|
||||
"inv_expired": "Abgelaufen",
|
||||
"inv_finished": "Leer",
|
||||
"act_title": "Monatliche Aktivität",
|
||||
"act_tx_month": "Bewegungen",
|
||||
"act_restock": "Einkäufe",
|
||||
"act_use": "Verbrauch",
|
||||
"act_new_products": "Neue Produkte",
|
||||
"act_tx_year": "Jährl. Bewegungen",
|
||||
"price_cache": "Preiscache",
|
||||
"cache_entries": "Produkte",
|
||||
"last_backup": "Letztes Backup",
|
||||
"bring_days": "Token läuft in {n} Tagen ab",
|
||||
"bring_expired": "Token abgelaufen",
|
||||
"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",
|
||||
"shopping": {
|
||||
"tab": "Einkaufsliste",
|
||||
"title": "Einkaufsliste",
|
||||
"hint": "Konfiguriere die integrierte Einkaufsliste oder verbinde Bring!.",
|
||||
"enable_label": "Einkaufsliste aktivieren",
|
||||
"mode_label": "Anbieter",
|
||||
"mode_internal": "Intern (ohne Bring!)",
|
||||
"mode_bring": "Bring! (externe App)",
|
||||
"bring_section_title": "Bring!-Konfiguration",
|
||||
"ai_section_title": "KI-Unterstützung",
|
||||
"smart_suggestions_label": "KI-Vorschläge",
|
||||
"forecast_label": "Prognose für bald leere Produkte",
|
||||
"auto_add_label": "Automatisch hinzufügen wenn",
|
||||
"auto_add_suffix": "im Lager verbleibend (0 = nur wenn leer)"
|
||||
},
|
||||
"ha": {
|
||||
"tab": "Home Assistant",
|
||||
"title": "Home Assistant",
|
||||
"hint": "Verbinde EverShelf mit Home Assistant für Automationen, Push-Benachrichtigungen und REST-Sensoren.",
|
||||
"enabled": "Home Assistant-Integration aktivieren",
|
||||
"connection_title": "Verbindung",
|
||||
"url_label": "Home Assistant URL",
|
||||
"url_placeholder": "http://192.168.1.50:8123",
|
||||
"url_hint": "Basis-URL deiner Home Assistant-Instanz (z.B. http://homeassistant.local:8123).",
|
||||
"token_label": "Long-Lived Access Token",
|
||||
"token_hint": "Erstelle unter HA-Profil → Sicherheit → Langlebige Zugangstoken.",
|
||||
"token_placeholder": "eyJhbGci...",
|
||||
"token_saved": "Token gespeichert (aus Sicherheitsgründen verborgen)",
|
||||
"test_btn": "Verbindung testen",
|
||||
"test_ok": "Verbunden mit {version}",
|
||||
"test_fail": "Verbindung fehlgeschlagen: {error}",
|
||||
"test_bad_token": "HA erreichbar, aber Token ist ungültig",
|
||||
"testing": "Teste…",
|
||||
"error_no_url": "Bitte zuerst die Home Assistant URL eingeben.",
|
||||
"tts_title": "TTS auf Smart Speaker",
|
||||
"tts_hint": "Rezeptschritte auf einem Home Assistant Media Player vorlesen.",
|
||||
"tts_entity_label": "Media Player Entity ID",
|
||||
"tts_entity_placeholder": "media_player.wohnzimmer",
|
||||
"tts_entity_hint": "Entity-ID des HA-Media-Players. Zu finden unter HA: Entwicklertools → Zustände.",
|
||||
"tts_platform_label": "TTS-Plattform",
|
||||
"tts_platform_speak": "tts.speak (empfohlen)",
|
||||
"tts_platform_notify": "notify.* (Benachrichtigungsdienst)",
|
||||
"tts_apply_btn": "HA-Voreinstellung auf TTS-Tab anwenden",
|
||||
"tts_apply_hint": "Füllt den TTS-Tab mit der Home Assistant URL und dem Token aus.",
|
||||
"tts_preset_applied": "HA-Voreinstellung auf TTS-Tab angewendet.",
|
||||
"webhook_title": "Webhook-Automationen",
|
||||
"webhook_hint": "Sende Daten an Home Assistant, wenn Ereignisse in der Vorratskammer auftreten.",
|
||||
"webhook_id_label": "Webhook-ID",
|
||||
"webhook_id_placeholder": "evershelf_webhook_abc123",
|
||||
"webhook_id_hint": "ID des in HA erstellten Webhooks. Kopiere aus: HA → Einstellungen → Automationen → Erstellen → Webhook-Auslöser.",
|
||||
"webhook_events_label": "Benachrichtige bei diesen Ereignissen",
|
||||
"event_expiry": "Ablaufende Produkte (täglich)",
|
||||
"event_shopping": "Artikel zur Einkaufsliste hinzugefügt",
|
||||
"event_stock": "Lagerbestand aktualisiert",
|
||||
"expiry_days_label": "Ablaufwarnung im Voraus (Tage)",
|
||||
"expiry_days_hint": "Sende die Ablaufwarnung N Tage vor dem Ablaufdatum.",
|
||||
"webhook_help": "In HA: Einstellungen → Automationen → Automation erstellen → Auslöser: Webhook → ID kopieren.",
|
||||
"notify_title": "Push-Benachrichtigungen",
|
||||
"notify_hint": "Sende Push-Benachrichtigungen über einen Home Assistant notify-Dienst.",
|
||||
"notify_service_label": "Notify-Dienst",
|
||||
"notify_service_placeholder": "notify.mobile_app_mein_handy",
|
||||
"notify_service_hint": "Name des HA-notify-Dienstes (z.B. notify.mobile_app_phone). Leer lassen zum Deaktivieren.",
|
||||
"sensor_title": "REST-Sensoren",
|
||||
"sensor_hint": "Zur configuration.yaml hinzufügen, um EverShelf-Sensoren in Home Assistant zu erstellen.",
|
||||
"sensor_copy_btn": "YAML kopieren",
|
||||
"sensor_copied": "YAML in die Zwischenablage kopiert!",
|
||||
"save_btn": "HA-Einstellungen speichern",
|
||||
"ha_hint": "Wenn du Home Assistant verwendest, nutze den Home Assistant-Tab für TTS, Webhooks und Sensoren."
|
||||
}
|
||||
},
|
||||
"expiry": {
|
||||
@@ -831,6 +994,7 @@
|
||||
"thrown_away": "🗑️ {name} weggeworfen!",
|
||||
"thrown_away_partial": "🗑️ {qty} {unit} von {name} weggeworfen",
|
||||
"finished_all": "📤 {name} aufgebraucht!",
|
||||
"vacuum_sealed": "{name} als vakuumversiegelt gespeichert",
|
||||
"product_finished_confirmed": "✅ Entfernt — wieder hinzufügen, wenn du nachkaufst",
|
||||
"appliance_added": "Gerät hinzugefügt",
|
||||
"item_added": "{name} hinzugefügt"
|
||||
@@ -892,7 +1056,17 @@
|
||||
"server_retry": "Erneut versuchen",
|
||||
"unknown": "Unbekannter Fehler",
|
||||
"prefix": "Fehler",
|
||||
"no_inventory_entry": "Kein Inventareintrag gefunden"
|
||||
"no_inventory_entry": "Kein Inventareintrag gefunden",
|
||||
"offline_title": "Keine Verbindung",
|
||||
"offline_subtitle": "Die App kann den Server nicht erreichen. Überprüfe deine WLAN-Verbindung.",
|
||||
"offline_checking": "Verbindung prüfen…",
|
||||
"offline_restored": "Verbindung wiederhergestellt!",
|
||||
"offline_continue": "Im Offline-Modus fortfahren",
|
||||
"offline_reading_cache": "Lese aus lokalem Cache",
|
||||
"offline_ops_pending": "{n} Aktionen ausstehend",
|
||||
"offline_synced": "{n} Aktionen synchronisiert",
|
||||
"offline_ai_disabled": "Offline nicht verfügbar",
|
||||
"offline_cache_ready": "Offline — {n} Produkte im Cache"
|
||||
},
|
||||
"confirm": {
|
||||
"remove_item": "Möchtest du dieses Produkt wirklich aus dem Bestand entfernen?",
|
||||
@@ -990,7 +1164,10 @@
|
||||
"retake_btn": "🔄 Erneut aufnehmen",
|
||||
"camera_error_hint": "Stelle sicher, dass du HTTPS verwendest und Kameraberechtigungen erteilt hast.<br>Du kannst den Barcode manuell eingeben oder die KI-Identifikation verwenden.",
|
||||
"no_barcode": "Kein Barcode",
|
||||
"save_new_btn": "🆕 Keines davon — als neu speichern"
|
||||
"save_new_btn": "🆕 Keines davon — als neu speichern",
|
||||
"expiry_found": "Datum gefunden",
|
||||
"expiry_read_fail": "Datum konnte nicht gelesen werden.",
|
||||
"expiry_raw_label": "Erkannt"
|
||||
},
|
||||
"lowstock": {
|
||||
"title": "⚠️ Wird knapp!",
|
||||
@@ -1007,8 +1184,8 @@
|
||||
"thing_rest": "den Rest",
|
||||
"stay_btn": "Nein, bleibt in {location}",
|
||||
"moved_toast": "📦 Offene Packung bewegt nach {location}",
|
||||
"vacuum_restore": "🫙 Vakuum wiederherstellen",
|
||||
"vacuum_seal_rest": "🔒 Rest vakuumieren"
|
||||
"vacuum_restore": "Vakuum wiederherstellen",
|
||||
"vacuum_seal_rest": "Rest vakuumieren"
|
||||
},
|
||||
"nova": {
|
||||
"1": "Unverarbeitet",
|
||||
@@ -1203,15 +1380,40 @@
|
||||
"btn_title": "Exportieren"
|
||||
},
|
||||
"startup": {
|
||||
"check_php": "PHP",
|
||||
"check_exts": "PHP-Erweiterungen",
|
||||
"connecting": "Serververbindung wird hergestellt...",
|
||||
"check_php_memory": "PHP-Speicher",
|
||||
"check_php_timeout": "PHP-Timeout",
|
||||
"check_php_upload": "PHP-Upload",
|
||||
"check_data_dir": "Datenverzeichnis",
|
||||
"check_db": "Datenbank",
|
||||
"check_env": "Konfiguration (.env)",
|
||||
"check_rate_limits": "Rate-Limits-Verzeichnis",
|
||||
"check_backups": "Backup-Verzeichnis",
|
||||
"check_write_test": "Schreibtest",
|
||||
"check_disk_space": "Speicherplatz",
|
||||
"check_db_legacy": "Legacy-DB (dispensa.db)",
|
||||
"check_db_connect": "Datenbankverbindung",
|
||||
"check_db_tables": "Datenbanktabellen",
|
||||
"check_db_integrity": "Datenbankintegrität",
|
||||
"check_db_wal": "WAL-Modus",
|
||||
"check_db_size": "Datenbankgröße",
|
||||
"check_db_rows": "Inventardaten",
|
||||
"check_env": ".env-Datei",
|
||||
"check_gemini": "Gemini-AI-Schlüssel",
|
||||
"check_bring": "Bring!-Token",
|
||||
"check_bring_creds": "Bring!-Anmeldedaten",
|
||||
"check_bring_token": "Bring!-Token",
|
||||
"check_tts": "Text-to-Speech-URL",
|
||||
"check_scale": "Waagen-Gateway",
|
||||
"check_curl_ssl": "cURL-SSL",
|
||||
"check_internet": "Internetverbindung",
|
||||
"fresh_install": "Neuinstallation",
|
||||
"warnings_found": "Warnungen",
|
||||
"all_ok": "System OK",
|
||||
"critical_error_short": "Kritischer Fehler",
|
||||
"critical_error": "Kritischer Fehler: Die App kann nicht gestartet werden. Prüfe die Serverlogs.",
|
||||
"error_network": "Server nicht erreichbar. Bitte Verbindung prüfen.",
|
||||
"retry": "Erneut versuchen"
|
||||
"critical_error_intro": "Die App kann aufgrund folgender Probleme nicht gestartet werden:",
|
||||
"error_network": "Server nicht erreichbar.",
|
||||
"error_network_detail": "Der Browser kann den PHP-Server nicht erreichen.\n\nMögliche Ursachen:\n• Apache/PHP-Server läuft nicht\n• Netzwerk- oder Firewall-Problem\n• Falsche App-URL\n\nBitte Server starten und erneut versuchen.",
|
||||
"retry": "Erneut versuchen",
|
||||
"syncing_local": "Lokale Daten synchronisieren...",
|
||||
"sync_done": "Lokale Daten aktualisiert"
|
||||
}
|
||||
}
|
||||
+219
-17
@@ -113,6 +113,8 @@
|
||||
"banner_expired_action_finished": "I finished it!",
|
||||
"banner_expired_action_throw": "I threw it away",
|
||||
"banner_expired_action_edit": "Fix date",
|
||||
"banner_expired_action_modify": "Edit",
|
||||
"banner_expired_action_vacuum": "Put in vacuum seal",
|
||||
"banner_anomaly_action_edit": "Fix inventory",
|
||||
"banner_anomaly_action_dismiss": "Quantity is correct",
|
||||
"banner_no_expiry_title": "Missing expiry: {name}",
|
||||
@@ -211,13 +213,14 @@
|
||||
"barcode_acquired": "🔖 Barcode scanned: {code}",
|
||||
"scan_barcode": "🔖 Scan Barcode",
|
||||
"create_named": "Create {name}",
|
||||
"new_without_barcode": "New product without barcode"
|
||||
"new_without_barcode": "New product without barcode",
|
||||
"stock_in_pantry": "Already in pantry:"
|
||||
},
|
||||
"action": {
|
||||
"title": "What do you want to do?",
|
||||
"add_btn": "📥 ADD",
|
||||
"add_sub": "to pantry/fridge",
|
||||
"use_btn": "📤 USE / CONSUME",
|
||||
"use_btn": "USE",
|
||||
"use_sub": "from pantry/fridge",
|
||||
"have_title": "📦 Already in stock!",
|
||||
"add_more_sub": "add more",
|
||||
@@ -225,7 +228,8 @@
|
||||
"throw_btn": "🗑️ DISCARD",
|
||||
"throw_sub": "throw away",
|
||||
"edit_sub": "expiry, location…",
|
||||
"create_recipe_btn": "Recipe"
|
||||
"create_recipe_btn": "Recipe",
|
||||
"related_stock_title": "Also at home"
|
||||
},
|
||||
"add": {
|
||||
"title": "Add to Pantry",
|
||||
@@ -363,6 +367,7 @@
|
||||
"steps_title": "👨🍳 Steps",
|
||||
"no_steps": "No steps available",
|
||||
"generate_error": "Generation error",
|
||||
"stream_interrupted": "Generation interrupted (incomplete server response). Check logs or try again.",
|
||||
"persons_short": "serv.",
|
||||
"use_ingredient_title": "Use ingredient",
|
||||
"recipe_qty_label": "Recipe",
|
||||
@@ -471,7 +476,8 @@
|
||||
"priority_medium": "Medium",
|
||||
"priority_low": "Low",
|
||||
"smart_last_update": "Updated {time}",
|
||||
"names_already_updated": "All names are already up to date"
|
||||
"names_already_updated": "All names are already up to date",
|
||||
"pantry_hint": "Already at home: {qty}"
|
||||
},
|
||||
"ai": {
|
||||
"title": "🤖 AI Identification",
|
||||
@@ -533,7 +539,7 @@
|
||||
"prev": "◀ Previous",
|
||||
"next": "Next ▶",
|
||||
"ingredient_used": "✔️ Deducted",
|
||||
"ingredient_use_btn": "📦 Use",
|
||||
"ingredient_use_btn": "Use",
|
||||
"ingredient_deduct_title": "Deduct from pantry",
|
||||
"timer_expired_tts": "Timer {label} expired!",
|
||||
"timer_warning_tts": "Heads up! {label}: 10 seconds left!",
|
||||
@@ -753,12 +759,169 @@
|
||||
"label": "🌙 Theme",
|
||||
"off": "☀️ Light",
|
||||
"on": "🌙 Dark",
|
||||
"auto": "🔄 Auto (system)"
|
||||
"auto": "🔄 Automatic (time of day)"
|
||||
},
|
||||
"zerowaste": {
|
||||
"card_title": "♻️ Zero-waste tips",
|
||||
"card_hint": "During cooking, show tips on how to reuse scraps generated in each step (peels, cooking water, etc.). Disabled by default.",
|
||||
"label": "Show tips during cooking"
|
||||
},
|
||||
"backup": {
|
||||
"tab": "Backup",
|
||||
"local_title": "Local Backup",
|
||||
"local_hint": "Daily database snapshot. Configure how many days of backups to keep.",
|
||||
"enabled": "Enable daily automatic backup",
|
||||
"retention_days": "Retention (days)",
|
||||
"retention_info": "Backups are kept for",
|
||||
"backup_now": "Backup Now",
|
||||
"backing_up": "Backing up…",
|
||||
"backed_up": "Backup complete",
|
||||
"backup_error": "Backup error",
|
||||
"last_backup": "Last backup",
|
||||
"no_backup_yet": "No backup has been created yet",
|
||||
"list_empty": "No backups available",
|
||||
"restore_btn": "Restore",
|
||||
"restore_confirm": "Restore backup",
|
||||
"delete_btn": "Delete",
|
||||
"delete_confirm": "Delete backup",
|
||||
"gdrive_title": "Google Drive",
|
||||
"gdrive_hint": "Automatically back up to Google Drive via OAuth 2.0. No external libraries required.",
|
||||
"gdrive_enabled": "Enable Google Drive backup",
|
||||
"gdrive_folder_id": "Drive Folder ID",
|
||||
"gdrive_folder_id_hint": "Copy the ID from the Drive folder URL: …/folders/<strong>ID</strong>",
|
||||
"gdrive_retention_days": "Drive retention (days, 0=keep all)",
|
||||
"gdrive_test": "Test Connection",
|
||||
"gdrive_ok": "Connection successful!",
|
||||
"gdrive_error": "Connection failed",
|
||||
"gdrive_push_now": "Upload to Drive Now",
|
||||
"gdrive_pushing": "Uploading…",
|
||||
"gdrive_pushed": "Uploaded to Drive",
|
||||
"gdrive_wizard_hint": "Optional: automatically back up to Google Drive daily via OAuth 2.0.",
|
||||
"gdrive_skip": "Skip — configure later in Settings",
|
||||
"gdrive_client_id": "Client ID",
|
||||
"gdrive_client_secret": "Client Secret",
|
||||
"gdrive_redirect_uri_hint": "Add <strong>http://localhost</strong> as an authorized redirect URI in Google Cloud Console. This works on any server, even without a public domain.",
|
||||
"gdrive_code_title": "Paste the authorization URL or code",
|
||||
"gdrive_code_hint": "After authorizing, the browser will open http://localhost and may show a connection error — that is expected. Copy the URL from the address bar (e.g. <code>http://localhost/?code=4%2F0A...</code>) and paste it here.",
|
||||
"gdrive_code_submit": "Submit",
|
||||
"gdrive_code_empty": "Paste the URL or authorization code first",
|
||||
"gdrive_redirect_uri_label": "Redirect URI (add this in Google Cloud Console):",
|
||||
"gdrive_oauth_authorize": "Authorize with Google",
|
||||
"gdrive_oauth_authorized": "Authorized",
|
||||
"gdrive_oauth_not_authorized": "Not authorized yet",
|
||||
"gdrive_oauth_window_opened": "Browser window opened — authorize and come back",
|
||||
"gdrive_oauth_how_to": "How to set up OAuth 2.0 (step by step)",
|
||||
"gdrive_oauth_steps": "<li>Go to <a href='https://console.cloud.google.com/' target='_blank' rel='noopener'>console.cloud.google.com</a> and select your project</li><li>Enable the <strong>Google Drive API</strong>: <em>APIs & Services → Enable APIs → Google Drive API</em></li><li>Go to <em>APIs & Services → Credentials → Create Credentials → OAuth client ID</em></li><li>Application type: <strong>Web application</strong>; add <strong>http://localhost</strong> as an <em>Authorized redirect URI</em></li><li>Copy the <strong>Client ID</strong> and <strong>Client Secret</strong> into the fields above and save</li><li>Click <strong>Authorize with Google</strong>, sign in and grant access</li><li>The browser will open <code>http://localhost</code> (a connection error is expected): copy the URL from the address bar and paste it in the field that appears below</li>"
|
||||
},
|
||||
"info": {
|
||||
"tab": "Info",
|
||||
"ai_title": "Gemini AI — Token Usage",
|
||||
"ai_hint": "Monthly consumption and estimated cost for the current API key.",
|
||||
"loading": "Loading…",
|
||||
"total_tokens": "Total tokens",
|
||||
"est_cost": "Est. cost",
|
||||
"input_tok": "Input tokens",
|
||||
"output_tok": "Output tokens",
|
||||
"ai_calls": "Calls",
|
||||
"by_action": "Breakdown by function",
|
||||
"by_model": "Breakdown by model",
|
||||
"pricing_note": "Gemini reference pricing: 2.5-flash $0.15/M in · $0.60/M out — 2.0-flash $0.10/M in · $0.40/M out.",
|
||||
"system_title": "System",
|
||||
"db_size": "Database",
|
||||
"log_size": "Logs",
|
||||
"log_level": "Log level",
|
||||
"ai_overview": "AI usage overview, inventory and system status",
|
||||
"calls_unit": "calls",
|
||||
"inv_title": "Inventory",
|
||||
"inv_active": "Active",
|
||||
"inv_products": "Total products",
|
||||
"inv_expiring": "Expiring (7d)",
|
||||
"inv_expired": "Expired",
|
||||
"inv_finished": "Finished",
|
||||
"act_title": "Monthly activity",
|
||||
"act_tx_month": "Movements",
|
||||
"act_restock": "Restocks",
|
||||
"act_use": "Usages",
|
||||
"act_new_products": "New products",
|
||||
"act_tx_year": "Yearly movements",
|
||||
"price_cache": "Price cache",
|
||||
"cache_entries": "products",
|
||||
"last_backup": "Last backup",
|
||||
"bring_days": "token expires in {n} days",
|
||||
"bring_expired": "token expired",
|
||||
"year_label": "Year {year}",
|
||||
"currency_title": "Currency",
|
||||
"currency_hint": "The currency used for all costs and prices in the app."
|
||||
},
|
||||
"tab_general": "General",
|
||||
"shopping": {
|
||||
"tab": "Shopping list",
|
||||
"title": "Shopping list",
|
||||
"hint": "Configure the built-in shopping list or connect Bring!.",
|
||||
"enable_label": "Enable shopping list",
|
||||
"mode_label": "Provider",
|
||||
"mode_internal": "Built-in (no Bring!)",
|
||||
"mode_bring": "Bring! (external app)",
|
||||
"bring_section_title": "Bring! configuration",
|
||||
"ai_section_title": "AI assistance",
|
||||
"smart_suggestions_label": "AI suggestions",
|
||||
"forecast_label": "Forecast low-stock products",
|
||||
"auto_add_label": "Auto-add to list when",
|
||||
"auto_add_suffix": "remaining in stock (0 = only when empty)"
|
||||
},
|
||||
"ha": {
|
||||
"tab": "Home Assistant",
|
||||
"title": "Home Assistant",
|
||||
"hint": "Connect EverShelf to Home Assistant for automations, push notifications and REST sensors.",
|
||||
"enabled": "Enable Home Assistant integration",
|
||||
"connection_title": "Connection",
|
||||
"url_label": "Home Assistant URL",
|
||||
"url_placeholder": "http://192.168.1.50:8123",
|
||||
"url_hint": "Base URL of your Home Assistant instance (e.g. http://homeassistant.local:8123).",
|
||||
"token_label": "Long-Lived Access Token",
|
||||
"token_hint": "Generate from HA Profile → Security → Long-Lived Access Tokens.",
|
||||
"token_placeholder": "eyJhbGci...",
|
||||
"token_saved": "Token saved (hidden for security)",
|
||||
"test_btn": "Test connection",
|
||||
"test_ok": "Connected to {version}",
|
||||
"test_fail": "Connection failed: {error}",
|
||||
"test_bad_token": "HA reachable but token is invalid",
|
||||
"testing": "Testing…",
|
||||
"error_no_url": "Please enter the Home Assistant URL first.",
|
||||
"tts_title": "TTS on Smart Speaker",
|
||||
"tts_hint": "Read recipe steps aloud on a Home Assistant media player.",
|
||||
"tts_entity_label": "Media player entity ID",
|
||||
"tts_entity_placeholder": "media_player.living_room",
|
||||
"tts_entity_hint": "Entity ID of the HA media player. Find it in HA: Developer Tools → States.",
|
||||
"tts_platform_label": "TTS platform",
|
||||
"tts_platform_speak": "tts.speak (recommended)",
|
||||
"tts_platform_notify": "notify.* (notification service)",
|
||||
"tts_apply_btn": "Apply HA preset to TTS tab",
|
||||
"tts_apply_hint": "Pre-fills the TTS tab with the Home Assistant URL and token.",
|
||||
"tts_preset_applied": "HA preset applied to TTS tab.",
|
||||
"webhook_title": "Webhook Automations",
|
||||
"webhook_hint": "Send data to Home Assistant when pantry events occur. Create an HA automation with a Webhook trigger and paste the generated ID here.",
|
||||
"webhook_id_label": "Webhook ID",
|
||||
"webhook_id_placeholder": "evershelf_webhook_abc123",
|
||||
"webhook_id_hint": "ID of the webhook created in HA. Copy from: HA → Settings → Automations → Create → Webhook Trigger.",
|
||||
"webhook_events_label": "Notify on these events",
|
||||
"event_expiry": "Expiring products (daily)",
|
||||
"event_shopping": "Item added to shopping list",
|
||||
"event_stock": "Stock level updated",
|
||||
"expiry_days_label": "Expiry lead time (days)",
|
||||
"expiry_days_hint": "Send the expiry alert N days before the expiry date.",
|
||||
"webhook_help": "In HA: Settings → Automations → Create automation → Trigger: Webhook → copy the generated ID above.",
|
||||
"notify_title": "Push Notifications",
|
||||
"notify_hint": "Send push notifications to your phone via a Home Assistant notify service.",
|
||||
"notify_service_label": "Notify service",
|
||||
"notify_service_placeholder": "notify.mobile_app_my_phone",
|
||||
"notify_service_hint": "HA notify service name (e.g. notify.mobile_app_phone). Leave empty to disable.",
|
||||
"sensor_title": "REST Sensors",
|
||||
"sensor_hint": "Add to configuration.yaml to create EverShelf sensors in Home Assistant.",
|
||||
"sensor_copy_btn": "Copy YAML",
|
||||
"sensor_copied": "YAML copied to clipboard!",
|
||||
"save_btn": "Save HA settings",
|
||||
"ha_hint": "If you use Home Assistant, use the Home Assistant tab to configure TTS, webhooks and sensors."
|
||||
}
|
||||
},
|
||||
"expiry": {
|
||||
@@ -831,6 +994,7 @@
|
||||
"thrown_away": "🗑️ {name} thrown away!",
|
||||
"thrown_away_partial": "🗑️ Thrown away {qty} {unit} of {name}",
|
||||
"finished_all": "📤 {name} finished!",
|
||||
"vacuum_sealed": "{name} saved as vacuum sealed",
|
||||
"product_finished_confirmed": "✅ Removed — add it again when you restock",
|
||||
"appliance_added": "Appliance added",
|
||||
"item_added": "{name} added"
|
||||
@@ -892,7 +1056,17 @@
|
||||
"server_retry": "Retry",
|
||||
"unknown": "Unknown error",
|
||||
"prefix": "Error",
|
||||
"no_inventory_entry": "No inventory entry found"
|
||||
"no_inventory_entry": "No inventory entry found",
|
||||
"offline_title": "No connection",
|
||||
"offline_subtitle": "The app cannot reach the server. Check your Wi-Fi connection.",
|
||||
"offline_checking": "Checking connection…",
|
||||
"offline_restored": "Connection restored!",
|
||||
"offline_continue": "Continue in offline mode",
|
||||
"offline_reading_cache": "Reading from local cache",
|
||||
"offline_ops_pending": "{n} operations pending",
|
||||
"offline_synced": "{n} operations synced",
|
||||
"offline_ai_disabled": "Not available offline",
|
||||
"offline_cache_ready": "Offline — {n} items cached"
|
||||
},
|
||||
"confirm": {
|
||||
"remove_item": "Do you really want to remove this product from inventory?",
|
||||
@@ -990,7 +1164,10 @@
|
||||
"retake_btn": "🔄 Retake",
|
||||
"camera_error_hint": "Ensure you use HTTPS and have granted camera permissions.<br>You can enter the barcode manually or use AI identification.",
|
||||
"no_barcode": "No barcode",
|
||||
"save_new_btn": "🆕 None of these — save as new"
|
||||
"save_new_btn": "🆕 None of these — save as new",
|
||||
"expiry_found": "Date found",
|
||||
"expiry_read_fail": "Cannot read the date.",
|
||||
"expiry_raw_label": "Read"
|
||||
},
|
||||
"lowstock": {
|
||||
"title": "⚠️ Running low!",
|
||||
@@ -1007,8 +1184,8 @@
|
||||
"thing_rest": "rest",
|
||||
"stay_btn": "No, stay in {location}",
|
||||
"moved_toast": "📦 Opened package moved to {location}",
|
||||
"vacuum_restore": "🫙 Restore vacuum sealed",
|
||||
"vacuum_seal_rest": "🔒 Vacuum seal the rest"
|
||||
"vacuum_restore": "Restore vacuum sealed",
|
||||
"vacuum_seal_rest": "Vacuum seal the rest"
|
||||
},
|
||||
"nova": {
|
||||
"1": "Unprocessed",
|
||||
@@ -1203,15 +1380,40 @@
|
||||
"btn_title": "Export"
|
||||
},
|
||||
"startup": {
|
||||
"check_php": "PHP",
|
||||
"check_exts": "PHP extensions",
|
||||
"connecting": "Connecting to server...",
|
||||
"check_php_memory": "PHP memory",
|
||||
"check_php_timeout": "PHP timeout",
|
||||
"check_php_upload": "PHP upload",
|
||||
"check_data_dir": "Data directory",
|
||||
"check_db": "Database",
|
||||
"check_env": "Configuration (.env)",
|
||||
"check_rate_limits": "Rate limits dir",
|
||||
"check_backups": "Backup dir",
|
||||
"check_write_test": "Disk write test",
|
||||
"check_disk_space": "Disk space",
|
||||
"check_db_legacy": "Legacy DB (dispensa.db)",
|
||||
"check_db_connect": "Database connection",
|
||||
"check_db_tables": "Database tables",
|
||||
"check_db_integrity": "Database integrity",
|
||||
"check_db_wal": "WAL mode",
|
||||
"check_db_size": "Database size",
|
||||
"check_db_rows": "Inventory data",
|
||||
"check_env": ".env file",
|
||||
"check_gemini": "Gemini AI key",
|
||||
"check_bring": "Bring! token",
|
||||
"check_bring_creds": "Bring! credentials",
|
||||
"check_bring_token": "Bring! token",
|
||||
"check_tts": "Text-to-Speech URL",
|
||||
"check_scale": "Scale gateway",
|
||||
"check_curl_ssl": "cURL SSL",
|
||||
"check_internet": "Internet connection",
|
||||
"fresh_install": "fresh install",
|
||||
"warnings_found": "warnings found",
|
||||
"all_ok": "System OK",
|
||||
"critical_error_short": "Critical error",
|
||||
"critical_error": "Critical error: the app cannot start. Check your server logs.",
|
||||
"error_network": "Cannot reach the server. Check your connection.",
|
||||
"retry": "Retry"
|
||||
"critical_error_intro": "The app cannot start due to the following issues:",
|
||||
"error_network": "Cannot reach the server.",
|
||||
"error_network_detail": "The browser cannot reach the PHP server.\n\nPossible causes:\n• Apache/PHP server is not running\n• Network or firewall issue\n• Incorrect app URL\n\nMake sure the server is started and try again.",
|
||||
"retry": "Retry",
|
||||
"syncing_local": "Syncing local data...",
|
||||
"sync_done": "Local data synced"
|
||||
}
|
||||
}
|
||||
+154
-8
@@ -759,6 +759,122 @@
|
||||
"card_title": "♻️ Consejos sin desperdicios",
|
||||
"card_hint": "Durante la cocción, muestra consejos sobre cómo reutilizar los restos generados en cada paso (peladuras, agua de cocción, etc.). Desactivado por defecto.",
|
||||
"label": "Mostrar consejos durante la cocción"
|
||||
},
|
||||
"backup": {
|
||||
"tab": "Copia de seguridad",
|
||||
"local_title": "Copia local",
|
||||
"local_hint": "Instantánea diaria de la base de datos. Configura cuántos días de copias de seguridad conservar.",
|
||||
"enabled": "Activar copia de seguridad diaria automática",
|
||||
"retention_days": "Retención (días)",
|
||||
"retention_info": "Las copias se conservan durante",
|
||||
"backup_now": "Hacer copia ahora",
|
||||
"backing_up": "Haciendo copia…",
|
||||
"backed_up": "Copia completada",
|
||||
"backup_error": "Error en la copia",
|
||||
"last_backup": "Última copia",
|
||||
"no_backup_yet": "Aún no se ha creado ninguna copia",
|
||||
"list_empty": "No hay copias disponibles",
|
||||
"restore_btn": "Restaurar",
|
||||
"restore_confirm": "Restaurar la copia",
|
||||
"delete_btn": "Eliminar",
|
||||
"delete_confirm": "Eliminar la copia",
|
||||
"gdrive_title": "Google Drive",
|
||||
"gdrive_hint": "Copias de seguridad automáticas en Google Drive via OAuth 2.0. No se requieren bibliotecas externas.",
|
||||
"gdrive_enabled": "Activar copia en Google Drive",
|
||||
"gdrive_folder_id": "ID de carpeta de Drive",
|
||||
"gdrive_folder_id_hint": "Copia el ID desde la URL de la carpeta de Drive: …/folders/<strong>ID</strong>",
|
||||
"gdrive_retention_days": "Retención en Drive (días, 0=mantener todo)",
|
||||
"gdrive_test": "Probar conexión",
|
||||
"gdrive_ok": "Conexión exitosa!",
|
||||
"gdrive_error": "Conexión fallida",
|
||||
"gdrive_push_now": "Subir a Drive ahora",
|
||||
"gdrive_pushing": "Subiendo…",
|
||||
"gdrive_pushed": "Subido a Drive",
|
||||
"gdrive_wizard_hint": "Opcional: copia de seguridad diaria automática en Google Drive via OAuth 2.0.",
|
||||
"gdrive_skip": "Omitir — configurar después en Ajustes",
|
||||
"gdrive_client_id": "Client ID",
|
||||
"gdrive_client_secret": "Client Secret",
|
||||
"gdrive_redirect_uri_hint": "Agrega <strong>http://localhost</strong> como URI de redireccionamiento autorizado en Google Cloud Console. Funciona en cualquier servidor, incluso sin dominio público.",
|
||||
"gdrive_code_title": "Pegar la URL o el código de autorización",
|
||||
"gdrive_code_hint": "Tras autorizar, el navegador abrirá http://localhost y puede mostrar un error de conexión — es normal. Copia la URL de la barra de direcciones (ej. <code>http://localhost/?code=4%2F0A...</code>) y pégala aquí.",
|
||||
"gdrive_code_submit": "Confirmar",
|
||||
"gdrive_code_empty": "Pega primero la URL o el código de autorización",
|
||||
"gdrive_redirect_uri_label": "URI de redirección (agregar en Google Cloud Console):",
|
||||
"gdrive_oauth_authorize": "Autorizar con Google",
|
||||
"gdrive_oauth_authorized": "Autorizado",
|
||||
"gdrive_oauth_not_authorized": "Aún no autorizado",
|
||||
"gdrive_oauth_window_opened": "Ventana abierta — autoriza y regresa aquí",
|
||||
"gdrive_oauth_how_to": "Cómo configurar OAuth 2.0 (paso a paso)",
|
||||
"gdrive_oauth_steps": "<li>Ve a <a href='https://console.cloud.google.com/' target='_blank' rel='noopener'>console.cloud.google.com</a> y selecciona tu proyecto</li><li>Habilita la <strong>API de Google Drive</strong>: <em>API y servicios → Habilitar API → Google Drive API</em></li><li>Ve a <em>API y servicios → Credenciales → Crear credenciales → ID de cliente OAuth</em></li><li>Tipo de aplicación: <strong>Aplicación web</strong>; agrega la URL mostrada abajo como <em>URI de redirección autorizado</em></li><li>Copia el <strong>Client ID</strong> y el <strong>Client Secret</strong> en los campos de arriba y guarda</li><li>Haz clic en <strong>Autorizar con Google</strong>: inicia sesión en tu cuenta de Google y concede acceso</li><li>La ventana se cierra automáticamente al finalizar y las copias de seguridad están listas</li>"
|
||||
},
|
||||
"shopping": {
|
||||
"tab": "Lista de la compra",
|
||||
"title": "Lista de la compra",
|
||||
"hint": "Configura la lista de la compra integrada o conecta Bring!.",
|
||||
"enable_label": "Activar lista de la compra",
|
||||
"mode_label": "Proveedor",
|
||||
"mode_internal": "Integrado (sin Bring!)",
|
||||
"mode_bring": "Bring! (app externa)",
|
||||
"bring_section_title": "Configuración de Bring!",
|
||||
"ai_section_title": "Asistencia IA",
|
||||
"smart_suggestions_label": "Sugerencias IA",
|
||||
"forecast_label": "Previsión de productos por agotar",
|
||||
"auto_add_label": "Añadir automáticamente cuando",
|
||||
"auto_add_suffix": "restante en stock (0 = solo cuando se agota)"
|
||||
},
|
||||
"ha": {
|
||||
"tab": "Home Assistant",
|
||||
"title": "Home Assistant",
|
||||
"hint": "Conecta EverShelf a Home Assistant para automatizaciones, notificaciones push y sensores REST.",
|
||||
"enabled": "Activar integración con Home Assistant",
|
||||
"connection_title": "Conexión",
|
||||
"url_label": "URL de Home Assistant",
|
||||
"url_placeholder": "http://192.168.1.50:8123",
|
||||
"url_hint": "URL base de tu instancia de Home Assistant.",
|
||||
"token_label": "Token de acceso de larga duración",
|
||||
"token_hint": "Genera desde Perfil HA → Seguridad → Tokens de acceso de larga duración.",
|
||||
"token_placeholder": "eyJhbGci...",
|
||||
"token_saved": "Token guardado (oculto por seguridad)",
|
||||
"test_btn": "Probar conexión",
|
||||
"test_ok": "Conectado a {version}",
|
||||
"test_fail": "Conexión fallida: {error}",
|
||||
"test_bad_token": "HA accesible pero el token no es válido",
|
||||
"testing": "Probando…",
|
||||
"error_no_url": "Por favor, introduce primero la URL de Home Assistant.",
|
||||
"tts_title": "TTS en altavoz inteligente",
|
||||
"tts_hint": "Lee los pasos de la receta en un reproductor de medios de Home Assistant.",
|
||||
"tts_entity_label": "Entity ID del reproductor multimedia",
|
||||
"tts_entity_placeholder": "media_player.salon",
|
||||
"tts_entity_hint": "ID de entidad del reproductor multimedia HA. Encuéntralo en HA: Herramientas para desarrolladores → Estados.",
|
||||
"tts_platform_label": "Plataforma TTS",
|
||||
"tts_platform_speak": "tts.speak (recomendado)",
|
||||
"tts_platform_notify": "notify.* (servicio de notificaciones)",
|
||||
"tts_apply_btn": "Aplicar preset HA a la pestaña TTS",
|
||||
"tts_apply_hint": "Pre-rellena la pestaña TTS con la URL y el token de Home Assistant.",
|
||||
"tts_preset_applied": "Preset HA aplicado a la pestaña TTS.",
|
||||
"webhook_title": "Automatizaciones Webhook",
|
||||
"webhook_hint": "Envía datos a Home Assistant cuando ocurren eventos en la despensa.",
|
||||
"webhook_id_label": "ID de Webhook",
|
||||
"webhook_id_placeholder": "evershelf_webhook_abc123",
|
||||
"webhook_id_hint": "ID del webhook creado en HA. Copia desde: HA → Ajustes → Automatizaciones → Crear → Disparador Webhook.",
|
||||
"webhook_events_label": "Notificar en estos eventos",
|
||||
"event_expiry": "Productos próximos a caducar (diario)",
|
||||
"event_shopping": "Artículo añadido a la lista de compras",
|
||||
"event_stock": "Nivel de stock actualizado",
|
||||
"expiry_days_label": "Antelación de caducidad (días)",
|
||||
"expiry_days_hint": "Enviar alerta de caducidad N días antes de la fecha.",
|
||||
"webhook_help": "En HA: Ajustes → Automatizaciones → Crear automatización → Disparador: Webhook → copia el ID generado.",
|
||||
"notify_title": "Notificaciones push",
|
||||
"notify_hint": "Envía notificaciones push a tu teléfono mediante un servicio notify de Home Assistant.",
|
||||
"notify_service_label": "Servicio notify",
|
||||
"notify_service_placeholder": "notify.mobile_app_mi_telefono",
|
||||
"notify_service_hint": "Nombre del servicio notify de HA. Déjalo vacío para desactivar.",
|
||||
"sensor_title": "Sensores REST",
|
||||
"sensor_hint": "Añade a configuration.yaml para crear sensores de EverShelf en Home Assistant.",
|
||||
"sensor_copy_btn": "Copiar YAML",
|
||||
"sensor_copied": "¡YAML copiado al portapapeles!",
|
||||
"save_btn": "Guardar ajustes HA",
|
||||
"ha_hint": "Si usas Home Assistant, utiliza la pestaña Home Assistant para configurar TTS, webhooks y sensores."
|
||||
}
|
||||
},
|
||||
"expiry": {
|
||||
@@ -892,7 +1008,17 @@
|
||||
"server_retry": "Reintentar",
|
||||
"unknown": "Error desconocido",
|
||||
"prefix": "Error",
|
||||
"no_inventory_entry": "No se encontró ninguna entrada de inventario"
|
||||
"no_inventory_entry": "No se encontró ninguna entrada de inventario",
|
||||
"offline_title": "Sin conexión",
|
||||
"offline_subtitle": "La app no puede conectar con el servidor. Verifica tu conexión Wi-Fi.",
|
||||
"offline_checking": "Verificando conexión…",
|
||||
"offline_restored": "¡Conexión restaurada!",
|
||||
"offline_continue": "Continuar en modo sin conexión",
|
||||
"offline_reading_cache": "Leyendo desde caché local",
|
||||
"offline_ops_pending": "{n} operaciones pendientes",
|
||||
"offline_synced": "{n} operaciones sincronizadas",
|
||||
"offline_ai_disabled": "No disponible sin conexión",
|
||||
"offline_cache_ready": "Offline — {n} productos en caché"
|
||||
},
|
||||
"confirm": {
|
||||
"remove_item": "¿Realmente quieres eliminar este producto del inventario?",
|
||||
@@ -1203,15 +1329,35 @@
|
||||
"btn_title": "Exportar"
|
||||
},
|
||||
"startup": {
|
||||
"check_php": "PHP",
|
||||
"check_exts": "Extensiones PHP",
|
||||
"connecting": "Conectando al servidor...",
|
||||
"check_php_memory": "Memoria PHP",
|
||||
"check_php_timeout": "Tiempo de espera PHP",
|
||||
"check_php_upload": "Upload PHP",
|
||||
"check_data_dir": "Carpeta de datos",
|
||||
"check_db": "Base de datos",
|
||||
"check_env": "Configuración (.env)",
|
||||
"check_rate_limits": "Dir. rate limits",
|
||||
"check_backups": "Dir. copias de seguridad",
|
||||
"check_write_test": "Prueba escritura disco",
|
||||
"check_disk_space": "Espacio en disco",
|
||||
"check_db_connect": "Conexión base de datos",
|
||||
"check_db_tables": "Tablas de la BD",
|
||||
"check_db_integrity": "Integridad BD",
|
||||
"check_db_wal": "Modo WAL",
|
||||
"check_db_size": "Tamaño de la BD",
|
||||
"check_db_rows": "Datos del inventario",
|
||||
"check_env": "Archivo .env",
|
||||
"check_gemini": "Clave Gemini AI",
|
||||
"check_bring": "Token de Bring!",
|
||||
"check_bring_creds": "Credenciales Bring!",
|
||||
"check_bring_token": "Token de Bring!",
|
||||
"check_curl_ssl": "cURL SSL",
|
||||
"check_internet": "Conexión a internet",
|
||||
"fresh_install": "instalación nueva",
|
||||
"warnings_found": "avisos detectados",
|
||||
"all_ok": "Sistema OK",
|
||||
"critical_error_short": "Error crítico",
|
||||
"critical_error": "Error crítico: la aplicación no puede iniciarse. Revisa los registros del servidor.",
|
||||
"error_network": "No se puede contactar con el servidor. Comprueba tu conexión.",
|
||||
"retry": "Reintentar"
|
||||
"error_network": "No se puede contactar con el servidor. Comprueba tu conexión de red.",
|
||||
"retry": "Reintentar",
|
||||
"syncing_local": "Sincronizando datos locales...",
|
||||
"sync_done": "Datos locales sincronizados"
|
||||
}
|
||||
}
|
||||
+155
-9
@@ -759,6 +759,122 @@
|
||||
"card_title": "♻️ Conseils zéro déchet",
|
||||
"card_hint": "Pendant la cuisson, affichez des conseils pour réutiliser les déchets produits à chaque étape (épluchures, eau de cuisson, etc.). Désactivé par défaut.",
|
||||
"label": "Afficher les conseils pendant la cuisson"
|
||||
},
|
||||
"backup": {
|
||||
"tab": "Sauvegarde",
|
||||
"local_title": "Sauvegarde locale",
|
||||
"local_hint": "Instantané quotidien de la base de données. Configurez le nombre de jours de rétention.",
|
||||
"enabled": "Activer la sauvegarde automatique quotidienne",
|
||||
"retention_days": "Rétention (jours)",
|
||||
"retention_info": "Les sauvegardes sont conservées pendant",
|
||||
"backup_now": "Sauvegarder maintenant",
|
||||
"backing_up": "Sauvegarde en cours…",
|
||||
"backed_up": "Sauvegarde terminée",
|
||||
"backup_error": "Erreur de sauvegarde",
|
||||
"last_backup": "Dernière sauvegarde",
|
||||
"no_backup_yet": "Aucune sauvegarde créée",
|
||||
"list_empty": "Aucune sauvegarde disponible",
|
||||
"restore_btn": "Restaurer",
|
||||
"restore_confirm": "Restaurer la sauvegarde",
|
||||
"delete_btn": "Supprimer",
|
||||
"delete_confirm": "Supprimer la sauvegarde",
|
||||
"gdrive_title": "Google Drive",
|
||||
"gdrive_hint": "Sauvegardez automatiquement sur Google Drive via OAuth 2.0. Aucune bibliothèque externe requise.",
|
||||
"gdrive_enabled": "Activer la sauvegarde Google Drive",
|
||||
"gdrive_folder_id": "ID du dossier Drive",
|
||||
"gdrive_folder_id_hint": "Copiez l'ID depuis l'URL du dossier Drive : …/folders/<strong>ID</strong>",
|
||||
"gdrive_retention_days": "Rétention Drive (jours, 0=tout garder)",
|
||||
"gdrive_test": "Tester la connexion",
|
||||
"gdrive_ok": "Connexion réussie !",
|
||||
"gdrive_error": "Échec de la connexion",
|
||||
"gdrive_push_now": "Téléverser sur Drive maintenant",
|
||||
"gdrive_pushing": "Téléversement en cours…",
|
||||
"gdrive_pushed": "Téléversé sur Drive",
|
||||
"gdrive_wizard_hint": "Optionnel : sauvegarde quotidienne automatique sur Google Drive via OAuth 2.0.",
|
||||
"gdrive_skip": "Passer — configurer plus tard dans Paramètres",
|
||||
"gdrive_client_id": "Client ID",
|
||||
"gdrive_client_secret": "Client Secret",
|
||||
"gdrive_redirect_uri_hint": "Ajoute <strong>http://localhost</strong> comme URI de redirection autorisé dans la Google Cloud Console. Fonctionne sur n'importe quel serveur, même sans domaine public.",
|
||||
"gdrive_code_title": "Coller l'URL ou le code d'autorisation",
|
||||
"gdrive_code_hint": "Après autorisation, le navigateur ouvre http://localhost et peut afficher une erreur de connexion — c'est normal. Copie l'URL dans la barre d'adresse (ex. <code>http://localhost/?code=4%2F0A...</code>) et colle-la ici.",
|
||||
"gdrive_code_submit": "Confirmer",
|
||||
"gdrive_code_empty": "Coller d'abord l'URL ou le code d'autorisation",
|
||||
"gdrive_redirect_uri_label": "URI de redirection (ajouter dans Google Cloud Console) :",
|
||||
"gdrive_oauth_authorize": "Autoriser avec Google",
|
||||
"gdrive_oauth_authorized": "Autorisé",
|
||||
"gdrive_oauth_not_authorized": "Pas encore autorisé",
|
||||
"gdrive_oauth_window_opened": "Fenêtre ouverte — autorisez et revenez ici",
|
||||
"gdrive_oauth_how_to": "Configurer OAuth 2.0 (étape par étape)",
|
||||
"gdrive_oauth_steps": "<li>Allez sur <a href='https://console.cloud.google.com/' target='_blank' rel='noopener'>console.cloud.google.com</a> et sélectionnez votre projet</li><li>Activez l’<strong>API Google Drive</strong> : <em>API et services → Activer les API → Google Drive API</em></li><li>Allez dans <em>API et services → Identifiants → Créer des identifiants → ID client OAuth</em></li><li>Type d’application : <strong>Application Web</strong> ; ajoutez l’URL affichée ci-dessous comme <em>URI de redirection autorisé</em></li><li>Copiez le <strong>Client ID</strong> et le <strong>Client Secret</strong> dans les champs ci-dessus et enregistrez</li><li>Cliquez sur <strong>Autoriser avec Google</strong> : connectez-vous et accordez l’accès</li><li>La fenêtre se ferme automatiquement une fois terminé et les sauvegardes sont prêtes</li>"
|
||||
},
|
||||
"shopping": {
|
||||
"tab": "Liste de courses",
|
||||
"title": "Liste de courses",
|
||||
"hint": "Configurez la liste de courses intégrée ou connectez Bring!.",
|
||||
"enable_label": "Activer la liste de courses",
|
||||
"mode_label": "Fournisseur",
|
||||
"mode_internal": "Intégré (sans Bring!)",
|
||||
"mode_bring": "Bring! (application externe)",
|
||||
"bring_section_title": "Configuration Bring!",
|
||||
"ai_section_title": "Assistance IA",
|
||||
"smart_suggestions_label": "Suggestions IA",
|
||||
"forecast_label": "Prévision des produits bientôt épuisés",
|
||||
"auto_add_label": "Ajouter automatiquement quand",
|
||||
"auto_add_suffix": "restant en stock (0 = seulement quand épuisé)"
|
||||
},
|
||||
"ha": {
|
||||
"tab": "Home Assistant",
|
||||
"title": "Home Assistant",
|
||||
"hint": "Connectez EverShelf à Home Assistant pour les automations, les notifications push et les capteurs REST.",
|
||||
"enabled": "Activer l'intégration Home Assistant",
|
||||
"connection_title": "Connexion",
|
||||
"url_label": "URL Home Assistant",
|
||||
"url_placeholder": "http://192.168.1.50:8123",
|
||||
"url_hint": "URL de base de votre instance Home Assistant.",
|
||||
"token_label": "Jeton d'accès longue durée",
|
||||
"token_hint": "Générez depuis Profil HA → Sécurité → Jetons d'accès longue durée.",
|
||||
"token_placeholder": "eyJhbGci...",
|
||||
"token_saved": "Jeton enregistré (masqué pour des raisons de sécurité)",
|
||||
"test_btn": "Tester la connexion",
|
||||
"test_ok": "Connecté à {version}",
|
||||
"test_fail": "Connexion échouée : {error}",
|
||||
"test_bad_token": "HA accessible mais le jeton est invalide",
|
||||
"testing": "Test en cours…",
|
||||
"error_no_url": "Veuillez d'abord saisir l'URL de Home Assistant.",
|
||||
"tts_title": "TTS sur enceinte connectée",
|
||||
"tts_hint": "Lisez les étapes de recette sur un media player Home Assistant.",
|
||||
"tts_entity_label": "Entity ID du lecteur multimédia",
|
||||
"tts_entity_placeholder": "media_player.salon",
|
||||
"tts_entity_hint": "Entity ID du lecteur multimédia HA. Disponible dans HA : Outils développeur → États.",
|
||||
"tts_platform_label": "Plateforme TTS",
|
||||
"tts_platform_speak": "tts.speak (recommandé)",
|
||||
"tts_platform_notify": "notify.* (service de notification)",
|
||||
"tts_apply_btn": "Appliquer le preset HA à l'onglet TTS",
|
||||
"tts_apply_hint": "Pré-remplit l'onglet TTS avec l'URL et le jeton de Home Assistant.",
|
||||
"tts_preset_applied": "Preset HA appliqué à l'onglet TTS.",
|
||||
"webhook_title": "Automations Webhook",
|
||||
"webhook_hint": "Envoyez des données à Home Assistant lors d'événements dans le garde-manger.",
|
||||
"webhook_id_label": "ID Webhook",
|
||||
"webhook_id_placeholder": "evershelf_webhook_abc123",
|
||||
"webhook_id_hint": "ID du webhook créé dans HA. Copiez depuis : HA → Paramètres → Automations → Créer → Déclencheur Webhook.",
|
||||
"webhook_events_label": "Notifier pour ces événements",
|
||||
"event_expiry": "Produits expirant bientôt (quotidien)",
|
||||
"event_shopping": "Article ajouté à la liste de courses",
|
||||
"event_stock": "Niveau de stock mis à jour",
|
||||
"expiry_days_label": "Préavis d'expiration (jours)",
|
||||
"expiry_days_hint": "Envoyer l'alerte d'expiration N jours avant la date d'expiration.",
|
||||
"webhook_help": "Dans HA : Paramètres → Automations → Créer → Déclencheur : Webhook → copier l'ID généré.",
|
||||
"notify_title": "Notifications push",
|
||||
"notify_hint": "Envoyez des notifications push sur votre téléphone via un service notify de Home Assistant.",
|
||||
"notify_service_label": "Service notify",
|
||||
"notify_service_placeholder": "notify.mobile_app_mon_telephone",
|
||||
"notify_service_hint": "Nom du service notify HA. Laissez vide pour désactiver.",
|
||||
"sensor_title": "Capteurs REST",
|
||||
"sensor_hint": "Ajoutez à configuration.yaml pour créer des capteurs EverShelf dans Home Assistant.",
|
||||
"sensor_copy_btn": "Copier le YAML",
|
||||
"sensor_copied": "YAML copié dans le presse-papiers !",
|
||||
"save_btn": "Enregistrer les paramètres HA",
|
||||
"ha_hint": "Si vous utilisez Home Assistant, utilisez l'onglet Home Assistant pour configurer TTS, webhooks et capteurs."
|
||||
}
|
||||
},
|
||||
"expiry": {
|
||||
@@ -892,7 +1008,17 @@
|
||||
"server_retry": "Réessayer",
|
||||
"unknown": "Erreur inconnue",
|
||||
"prefix": "Erreur",
|
||||
"no_inventory_entry": "Aucune entrée d'inventaire trouvée"
|
||||
"no_inventory_entry": "Aucune entrée d'inventaire trouvée",
|
||||
"offline_title": "Aucune connexion",
|
||||
"offline_subtitle": "L'app ne peut pas atteindre le serveur. Vérifiez votre connexion Wi-Fi.",
|
||||
"offline_checking": "Vérification de la connexion…",
|
||||
"offline_restored": "Connexion rétablie !",
|
||||
"offline_continue": "Continuer en mode hors ligne",
|
||||
"offline_reading_cache": "Lecture depuis le cache local",
|
||||
"offline_ops_pending": "{n} opérations en attente",
|
||||
"offline_synced": "{n} opérations synchronisées",
|
||||
"offline_ai_disabled": "Indisponible hors ligne",
|
||||
"offline_cache_ready": "Offline — {n} produits en cache"
|
||||
},
|
||||
"confirm": {
|
||||
"remove_item": "Voulez-vous vraiment supprimer ce produit de l'inventaire ?",
|
||||
@@ -1203,15 +1329,35 @@
|
||||
"btn_title": "Exporter"
|
||||
},
|
||||
"startup": {
|
||||
"check_php": "PHP",
|
||||
"check_exts": "Extensions PHP",
|
||||
"connecting": "Connexion au serveur...",
|
||||
"check_php_memory": "Mémoire PHP",
|
||||
"check_php_timeout": "Délai PHP",
|
||||
"check_php_upload": "Upload PHP",
|
||||
"check_data_dir": "Dossier de données",
|
||||
"check_db": "Base de données",
|
||||
"check_env": "Configuration (.env)",
|
||||
"check_rate_limits": "Dossier rate limits",
|
||||
"check_backups": "Dossier sauvegardes",
|
||||
"check_write_test": "Test d'écriture disque",
|
||||
"check_disk_space": "Espace disque",
|
||||
"check_db_connect": "Connexion base de données",
|
||||
"check_db_tables": "Tables de la BDD",
|
||||
"check_db_integrity": "Intégrité BDD",
|
||||
"check_db_wal": "Mode WAL",
|
||||
"check_db_size": "Taille de la BDD",
|
||||
"check_db_rows": "Données inventaire",
|
||||
"check_env": "Fichier .env",
|
||||
"check_gemini": "Clé Gemini AI",
|
||||
"check_bring": "Token Bring!",
|
||||
"critical_error": "Erreur critique : l'application ne peut pas démarrer. Vérifiez les logs du serveur.",
|
||||
"error_network": "Impossible de contacter le serveur. Vérifiez votre connexion.",
|
||||
"retry": "Réessayer"
|
||||
"check_bring_creds": "Identifiants Bring!",
|
||||
"check_bring_token": "Token Bring!",
|
||||
"check_curl_ssl": "cURL SSL",
|
||||
"check_internet": "Connexion internet",
|
||||
"fresh_install": "nouvelle installation",
|
||||
"warnings_found": "avertissements détectés",
|
||||
"all_ok": "Système OK",
|
||||
"critical_error_short": "Erreur critique",
|
||||
"critical_error": "Erreur critique : l'application ne peut pas démarrer. Vérifiez les logs.",
|
||||
"error_network": "Impossible de contacter le serveur. Vérifiez votre connexion réseau.",
|
||||
"retry": "Réessayer",
|
||||
"syncing_local": "Synchronisation des données locales...",
|
||||
"sync_done": "Données locales synchronisées"
|
||||
}
|
||||
}
|
||||
+220
-18
@@ -113,6 +113,8 @@
|
||||
"banner_expired_action_finished": "L'ho finito!",
|
||||
"banner_expired_action_throw": "L'ho buttato",
|
||||
"banner_expired_action_edit": "Correggi data",
|
||||
"banner_expired_action_modify": "Modifica",
|
||||
"banner_expired_action_vacuum": "Metti sottovuoto",
|
||||
"banner_anomaly_action_edit": "Correggi inventario",
|
||||
"banner_anomaly_action_dismiss": "La quantità è giusta",
|
||||
"banner_no_expiry_title": "Scadenza mancante: {name}",
|
||||
@@ -211,13 +213,14 @@
|
||||
"barcode_acquired": "🔖 Barcode acquisito: {code}",
|
||||
"scan_barcode": "🔖 Scansiona Barcode",
|
||||
"create_named": "Crea {name}",
|
||||
"new_without_barcode": "Nuovo prodotto senza barcode"
|
||||
"new_without_barcode": "Nuovo prodotto senza barcode",
|
||||
"stock_in_pantry": "Hai gia in dispensa:"
|
||||
},
|
||||
"action": {
|
||||
"title": "Cosa vuoi fare?",
|
||||
"add_btn": "📥 AGGIUNGI",
|
||||
"add_sub": "in dispensa/frigo",
|
||||
"use_btn": "📤 USA / CONSUMA",
|
||||
"use_btn": "USA",
|
||||
"use_sub": "dalla dispensa/frigo",
|
||||
"have_title": "📦 Ce l'hai già!",
|
||||
"add_more_sub": "altra quantità",
|
||||
@@ -225,7 +228,8 @@
|
||||
"throw_btn": "🗑️ BUTTA",
|
||||
"throw_sub": "butta il prodotto",
|
||||
"edit_sub": "scadenza, luogo…",
|
||||
"create_recipe_btn": "Ricetta"
|
||||
"create_recipe_btn": "Ricetta",
|
||||
"related_stock_title": "Hai anche in casa"
|
||||
},
|
||||
"add": {
|
||||
"title": "Aggiungi alla Dispensa",
|
||||
@@ -363,6 +367,7 @@
|
||||
"steps_title": "👨🍳 Procedimento",
|
||||
"no_steps": "Nessun procedimento disponibile",
|
||||
"generate_error": "Errore nella generazione",
|
||||
"stream_interrupted": "Generazione interrotta (risposta incompleta dal server). Controlla i log o riprova.",
|
||||
"persons_short": "pers.",
|
||||
"use_ingredient_title": "Usa ingrediente",
|
||||
"recipe_qty_label": "Ricetta",
|
||||
@@ -471,7 +476,8 @@
|
||||
"priority_medium": "Media",
|
||||
"priority_low": "Bassa",
|
||||
"smart_last_update": "Aggiornato {time}",
|
||||
"names_already_updated": "Tutti i nomi sono già aggiornati"
|
||||
"names_already_updated": "Tutti i nomi sono già aggiornati",
|
||||
"pantry_hint": "Hai gia {qty} in dispensa"
|
||||
},
|
||||
"ai": {
|
||||
"title": "🤖 Identificazione AI",
|
||||
@@ -533,7 +539,7 @@
|
||||
"prev": "◀ Precedente",
|
||||
"next": "Successivo ▶",
|
||||
"ingredient_used": "✔️ Scalato",
|
||||
"ingredient_use_btn": "📦 Usa",
|
||||
"ingredient_use_btn": "Usa",
|
||||
"ingredient_deduct_title": "Scala dalla dispensa",
|
||||
"timer_expired_tts": "Timer {label} scaduto!",
|
||||
"timer_warning_tts": "Attenzione! {label}: mancano 10 secondi!",
|
||||
@@ -753,12 +759,169 @@
|
||||
"label": "🌙 Tema",
|
||||
"off": "☀️ Chiaro",
|
||||
"on": "🌙 Scuro",
|
||||
"auto": "🔄 Automatico (sistema)"
|
||||
"auto": "🔄 Automatico (orario)"
|
||||
},
|
||||
"zerowaste": {
|
||||
"card_title": "♻️ Suggerimenti zero-waste",
|
||||
"card_hint": "Durante la cottura, mostra consigli su come riutilizzare gli scarti prodotti in ogni passo (bucce, acqua di cottura, ecc.). Disattivo per impostazione predefinita.",
|
||||
"label": "Mostra suggerimenti durante la cottura"
|
||||
},
|
||||
"backup": {
|
||||
"tab": "Backup",
|
||||
"local_title": "Backup Locale",
|
||||
"local_hint": "Snapshot giornaliero del database. Configura quanti giorni di backup conservare.",
|
||||
"enabled": "Backup automatico quotidiano",
|
||||
"retention_days": "Giorni di retention",
|
||||
"retention_info": "I backup vengono conservati per",
|
||||
"backup_now": "Backup Ora",
|
||||
"backing_up": "Backup in corso…",
|
||||
"backed_up": "Backup completato",
|
||||
"backup_error": "Errore backup",
|
||||
"last_backup": "Ultimo backup",
|
||||
"no_backup_yet": "Nessun backup ancora eseguito",
|
||||
"list_empty": "Nessun backup disponibile",
|
||||
"restore_btn": "Ripristina",
|
||||
"restore_confirm": "Ripristinare il backup",
|
||||
"delete_btn": "Elimina",
|
||||
"delete_confirm": "Eliminare il backup",
|
||||
"gdrive_title": "Google Drive",
|
||||
"gdrive_hint": "Backup automatici su Google Drive via OAuth 2.0. Nessuna libreria esterna richiesta.",
|
||||
"gdrive_enabled": "Abilita backup Google Drive",
|
||||
"gdrive_folder_id": "ID Cartella Drive",
|
||||
"gdrive_folder_id_hint": "Copia l'ID dalla URL della cartella Drive: …/folders/<strong>ID</strong>",
|
||||
"gdrive_retention_days": "Retention Drive (giorni, 0=tutto)",
|
||||
"gdrive_test": "Testa Connessione",
|
||||
"gdrive_ok": "Connessione riuscita!",
|
||||
"gdrive_error": "Connessione fallita",
|
||||
"gdrive_push_now": "Carica Ora su Drive",
|
||||
"gdrive_pushing": "Upload in corso…",
|
||||
"gdrive_pushed": "Caricato su Drive",
|
||||
"gdrive_wizard_hint": "Opzionale: backup giornaliero automatico su Google Drive via OAuth 2.0.",
|
||||
"gdrive_skip": "Salta — configura dopo in Impostazioni",
|
||||
"gdrive_client_id": "Client ID",
|
||||
"gdrive_client_secret": "Client Secret",
|
||||
"gdrive_redirect_uri_label": "Redirect URI (da aggiungere in Google Cloud Console):",
|
||||
"gdrive_redirect_uri_hint": "Aggiungi <strong>http://localhost</strong> come URI di reindirizzamento autorizzato in Google Cloud Console. Funziona su qualsiasi server, anche senza dominio pubblico.",
|
||||
"gdrive_oauth_authorize": "Autorizza con Google",
|
||||
"gdrive_oauth_authorized": "Autorizzato",
|
||||
"gdrive_oauth_not_authorized": "Non ancora autorizzato",
|
||||
"gdrive_oauth_window_opened": "Finestra aperta — autorizza e torna qui",
|
||||
"gdrive_oauth_how_to": "Come configurare OAuth 2.0 (passo dopo passo)",
|
||||
"gdrive_oauth_steps": "<li>Vai su <a href='https://console.cloud.google.com/' target='_blank' rel='noopener'>console.cloud.google.com</a> e seleziona il progetto</li><li>Abilita la <strong>Google Drive API</strong>: <em>API e servizi → Abilita API → Google Drive API</em></li><li>Vai su <em>API e servizi → Credenziali → Crea credenziali → ID client OAuth 2.0</em></li><li>Tipo applicazione: <strong>Applicazione web</strong>; aggiungi <strong>http://localhost</strong> come <em>URI di reindirizzamento autorizzato</em></li><li>Copia <strong>Client ID</strong> e <strong>Client Secret</strong> nei campi qui sopra e salva</li><li>Clicca <strong>Autorizza con Google</strong>, accedi e concedi l'accesso</li><li>Il browser aprirà <code>http://localhost</code> (possibile errore di connessione è normale): copia l'URL dalla barra degli indirizzi e incollalo nel campo che appare qui sotto</li>",
|
||||
"gdrive_code_title": "Incolla l'URL o il codice di autorizzazione",
|
||||
"gdrive_code_hint": "Dopo aver autorizzato, il browser aprirà http://localhost e potrebbe mostrare un errore. Copia l'URL dalla barra degli indirizzi (es. <code>http://localhost/?code=4%2F0A...</code>) e incollalo qui.",
|
||||
"gdrive_code_submit": "Conferma",
|
||||
"gdrive_code_empty": "Incolla prima l'URL o il codice di autorizzazione"
|
||||
},
|
||||
"info": {
|
||||
"tab": "Info",
|
||||
"ai_title": "Gemini AI — Utilizzo Token",
|
||||
"ai_hint": "Consumo mensile e costo stimato per la chiave API corrente.",
|
||||
"loading": "Caricamento…",
|
||||
"total_tokens": "Token totali",
|
||||
"est_cost": "Costo stimato",
|
||||
"input_tok": "Token input",
|
||||
"output_tok": "Token output",
|
||||
"ai_calls": "Chiamate",
|
||||
"by_action": "Dettaglio per funzione",
|
||||
"by_model": "Dettaglio per modello",
|
||||
"pricing_note": "Prezzi di riferimento Gemini: 2.5-flash $0.15/M in · $0.60/M out — 2.0-flash $0.10/M in · $0.40/M out.",
|
||||
"system_title": "Sistema",
|
||||
"db_size": "Database",
|
||||
"log_size": "Log",
|
||||
"log_level": "Livello log",
|
||||
"ai_overview": "Prospetto utilizzo AI, inventario e stato del sistema",
|
||||
"calls_unit": "call",
|
||||
"inv_title": "Inventario",
|
||||
"inv_active": "Attivi",
|
||||
"inv_products": "Prodotti totali",
|
||||
"inv_expiring": "In scadenza (7gg)",
|
||||
"inv_expired": "Scaduti",
|
||||
"inv_finished": "Finiti",
|
||||
"act_title": "Attività del mese",
|
||||
"act_tx_month": "Movimenti",
|
||||
"act_restock": "Acquisti",
|
||||
"act_use": "Consumi",
|
||||
"act_new_products": "Nuovi prodotti",
|
||||
"act_tx_year": "Movimenti anno",
|
||||
"price_cache": "Cache prezzi",
|
||||
"cache_entries": "prodotti",
|
||||
"last_backup": "Ultimo backup",
|
||||
"bring_days": "token scade tra {n} giorni",
|
||||
"bring_expired": "token scaduto",
|
||||
"year_label": "Anno {year}",
|
||||
"currency_title": "Valuta",
|
||||
"currency_hint": "La valuta usata per tutti i costi e i prezzi nell'app."
|
||||
},
|
||||
"tab_general": "Generali",
|
||||
"shopping": {
|
||||
"tab": "Lista spesa",
|
||||
"title": "Lista della spesa",
|
||||
"hint": "Configura la lista della spesa integrata o collega Bring!.",
|
||||
"enable_label": "Abilita lista della spesa",
|
||||
"mode_label": "Provider",
|
||||
"mode_internal": "Interno (senza Bring!)",
|
||||
"mode_bring": "Bring! (app esterna)",
|
||||
"bring_section_title": "Configurazione Bring!",
|
||||
"ai_section_title": "Assistenza AI",
|
||||
"smart_suggestions_label": "Suggerimenti AI",
|
||||
"forecast_label": "Previsione prodotti in esaurimento",
|
||||
"auto_add_label": "Aggiungi automaticamente quando",
|
||||
"auto_add_suffix": "rimasto in magazzino (0 = solo quando esaurito)"
|
||||
},
|
||||
"ha": {
|
||||
"tab": "Home Assistant",
|
||||
"title": "Home Assistant",
|
||||
"hint": "Collega EverShelf a Home Assistant per automazioni, notifiche push e sensori REST.",
|
||||
"enabled": "Abilita integrazione Home Assistant",
|
||||
"connection_title": "Connessione",
|
||||
"url_label": "URL Home Assistant",
|
||||
"url_placeholder": "http://192.168.1.50:8123",
|
||||
"url_hint": "URL del tuo server Home Assistant (es. http://homeassistant.local:8123).",
|
||||
"token_label": "Long-Lived Access Token",
|
||||
"token_hint": "Genera da Profilo HA → Sicurezza → Token di accesso a lungo termine.",
|
||||
"token_placeholder": "eyJhbGci...",
|
||||
"token_saved": "Token salvato (non mostrato per sicurezza)",
|
||||
"test_btn": "Testa connessione",
|
||||
"test_ok": "Connesso a {version}",
|
||||
"test_fail": "Connessione fallita: {error}",
|
||||
"test_bad_token": "HA raggiungibile ma token non valido",
|
||||
"testing": "Test in corso…",
|
||||
"error_no_url": "Inserisci prima l'URL di Home Assistant.",
|
||||
"tts_title": "TTS su Speaker Smart",
|
||||
"tts_hint": "Leggi i passi delle ricette su un media player di Home Assistant.",
|
||||
"tts_entity_label": "Entity ID media player",
|
||||
"tts_entity_placeholder": "media_player.living_room",
|
||||
"tts_entity_hint": "Entity ID del media player su cui vuoi la voce. Puoi trovarlo in HA: Strumenti per sviluppatori → Stati.",
|
||||
"tts_platform_label": "Piattaforma TTS",
|
||||
"tts_platform_speak": "tts.speak (raccomandato)",
|
||||
"tts_platform_notify": "notify.* (servizio notifiche)",
|
||||
"tts_apply_btn": "Applica preset HA al tab TTS",
|
||||
"tts_apply_hint": "Pre-compila il tab TTS con l'URL e il token di Home Assistant.",
|
||||
"tts_preset_applied": "Preset HA applicato al tab TTS.",
|
||||
"webhook_title": "Automazioni Webhook",
|
||||
"webhook_hint": "Invia dati a Home Assistant quando avvengono eventi nella dispensa. Crea un'automazione in HA con trigger Webhook e copia l'ID generato.",
|
||||
"webhook_id_label": "Webhook ID",
|
||||
"webhook_id_placeholder": "evershelf_webhook_abc123",
|
||||
"webhook_id_hint": "ID del webhook creato in HA. Copia da: HA → Impostazioni → Automazioni → Crea → Trigger Webhook.",
|
||||
"webhook_events_label": "Notifica per questi eventi",
|
||||
"event_expiry": "Prodotti in scadenza (giornaliero)",
|
||||
"event_shopping": "Aggiunta alla lista della spesa",
|
||||
"event_stock": "Aggiornamento scorte",
|
||||
"expiry_days_label": "Anticipo scadenze (giorni)",
|
||||
"expiry_days_hint": "Invia la notifica di scadenza N giorni prima della data di scadenza.",
|
||||
"webhook_help": "In HA: Impostazioni → Automazioni → Crea automazione → Trigger: Webhook → copia l'ID generato qui sopra.",
|
||||
"notify_title": "Notifiche Push",
|
||||
"notify_hint": "Invia notifiche push al tuo telefono tramite il servizio notify di Home Assistant.",
|
||||
"notify_service_label": "Servizio notify",
|
||||
"notify_service_placeholder": "notify.mobile_app_mio_telefono",
|
||||
"notify_service_hint": "Nome del servizio notify HA (es. notify.mobile_app_phone). Lascia vuoto per disabilitare.",
|
||||
"sensor_title": "Sensori REST",
|
||||
"sensor_hint": "Aggiungi a configuration.yaml per creare sensori EverShelf in Home Assistant.",
|
||||
"sensor_copy_btn": "Copia YAML",
|
||||
"sensor_copied": "YAML copiato negli appunti!",
|
||||
"save_btn": "Salva impostazioni HA",
|
||||
"ha_hint": "Se usi Home Assistant, usa il tab Home Assistant per configurare TTS, webhook e sensori."
|
||||
}
|
||||
},
|
||||
"expiry": {
|
||||
@@ -831,6 +994,7 @@
|
||||
"thrown_away": "🗑️ {name} buttato!",
|
||||
"thrown_away_partial": "🗑️ Buttato {qty} {unit} di {name}",
|
||||
"finished_all": "📤 {name} terminato!",
|
||||
"vacuum_sealed": "{name} salvato come sottovuoto",
|
||||
"product_finished_confirmed": "✅ Rimosso — riaggiungi quando ne ricompri",
|
||||
"appliance_added": "Elettrodomestico aggiunto",
|
||||
"item_added": "{name} aggiunto"
|
||||
@@ -892,7 +1056,17 @@
|
||||
"server_retry": "Riprova",
|
||||
"unknown": "Errore sconosciuto",
|
||||
"prefix": "Errore",
|
||||
"no_inventory_entry": "Nessuna voce di inventario trovata"
|
||||
"no_inventory_entry": "Nessuna voce di inventario trovata",
|
||||
"offline_title": "Nessuna connessione",
|
||||
"offline_subtitle": "L'app non riesce a raggiungere il server. Verifica la connessione Wi-Fi.",
|
||||
"offline_checking": "Verifica connessione…",
|
||||
"offline_restored": "Connessione ripristinata!",
|
||||
"offline_continue": "Continua in modalità offline",
|
||||
"offline_reading_cache": "Lettura dalla cache locale",
|
||||
"offline_ops_pending": "{n} operazioni in attesa",
|
||||
"offline_synced": "{n} operazioni sincronizzate",
|
||||
"offline_ai_disabled": "Non disponibile offline",
|
||||
"offline_cache_ready": "Offline — {n} prodotti in cache"
|
||||
},
|
||||
"confirm": {
|
||||
"remove_item": "Vuoi davvero rimuovere questo prodotto dall'inventario?",
|
||||
@@ -990,7 +1164,10 @@
|
||||
"retake_btn": "🔄 Riscatta",
|
||||
"camera_error_hint": "Assicurati di usare HTTPS e di aver concesso i permessi della fotocamera.<br>Puoi inserire il barcode manualmente o usare l'identificazione AI.",
|
||||
"no_barcode": "Senza barcode",
|
||||
"save_new_btn": "🆕 Non è nessuno di questi — salva come nuovo"
|
||||
"save_new_btn": "🆕 Non è nessuno di questi — salva come nuovo",
|
||||
"expiry_found": "Data trovata",
|
||||
"expiry_read_fail": "Non riesco a leggere la data.",
|
||||
"expiry_raw_label": "Letto"
|
||||
},
|
||||
"lowstock": {
|
||||
"title": "⚠️ Sta per finire!",
|
||||
@@ -1007,8 +1184,8 @@
|
||||
"thing_rest": "il resto",
|
||||
"stay_btn": "No, resta in {location}",
|
||||
"moved_toast": "📦 Confezione aperta spostata in {location}",
|
||||
"vacuum_restore": "🫙 Torna sotto vuoto",
|
||||
"vacuum_seal_rest": "🔒 Metti sotto vuoto il resto"
|
||||
"vacuum_restore": "Torna sotto vuoto",
|
||||
"vacuum_seal_rest": "Metti sotto vuoto il resto"
|
||||
},
|
||||
"nova": {
|
||||
"1": "Non trasformato",
|
||||
@@ -1203,15 +1380,40 @@
|
||||
"btn_title": "Esporta"
|
||||
},
|
||||
"startup": {
|
||||
"check_php": "PHP",
|
||||
"check_exts": "Estensioni PHP",
|
||||
"connecting": "Connessione al server...",
|
||||
"check_php_memory": "Memoria PHP",
|
||||
"check_php_timeout": "Timeout PHP",
|
||||
"check_php_upload": "Upload PHP",
|
||||
"check_data_dir": "Cartella dati",
|
||||
"check_db": "Database",
|
||||
"check_env": "Configurazione (.env)",
|
||||
"check_rate_limits": "Dir rate limits",
|
||||
"check_backups": "Dir backup",
|
||||
"check_write_test": "Test scrittura disco",
|
||||
"check_disk_space": "Spazio disco",
|
||||
"check_db_legacy": "DB legacy (dispensa.db)",
|
||||
"check_db_connect": "Connessione database",
|
||||
"check_db_tables": "Tabelle database",
|
||||
"check_db_integrity": "Integrità database",
|
||||
"check_db_wal": "WAL mode",
|
||||
"check_db_size": "Dimensione database",
|
||||
"check_db_rows": "Dati inventario",
|
||||
"check_env": "File .env",
|
||||
"check_gemini": "Chiave Gemini AI",
|
||||
"check_bring": "Token Bring!",
|
||||
"critical_error": "Errore critico: impossibile avviare l'app. Controlla i log del server.",
|
||||
"error_network": "Impossibile contattare il server. Controlla la connessione.",
|
||||
"retry": "Riprova"
|
||||
"check_bring_creds": "Credenziali Bring!",
|
||||
"check_bring_token": "Token Bring!",
|
||||
"check_tts": "URL Text-to-Speech",
|
||||
"check_scale": "Gateway bilancia",
|
||||
"check_curl_ssl": "cURL SSL",
|
||||
"check_internet": "Connessione internet",
|
||||
"fresh_install": "nuovo impianto",
|
||||
"warnings_found": "avvisi rilevati",
|
||||
"all_ok": "Sistema OK",
|
||||
"critical_error_short": "Errore critico",
|
||||
"critical_error": "Errore critico: l'app non può avviarsi. Controlla i log del server.",
|
||||
"critical_error_intro": "L'app non può avviarsi a causa dei seguenti problemi:",
|
||||
"error_network": "Impossibile contattare il server.",
|
||||
"error_network_detail": "Il browser non riesce a raggiungere il server PHP.\n\nPossibili cause:\n• Il server Apache/PHP non è in esecuzione\n• Problema di rete o firewall\n• URL dell'app non corretta\n\nControlla che il server sia avviato e riprova.",
|
||||
"retry": "Riprova",
|
||||
"syncing_local": "Sincronizzazione dati locali...",
|
||||
"sync_done": "Dati locali aggiornati"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user