chore: auto-merge develop → main

Triggered by: b9082ea fix: log.title emoji; add price estimate total to shopping stat card
This commit is contained in:
github-actions[bot]
2026-05-07 17:43:27 +00:00
5 changed files with 39 additions and 4 deletions
+9
View File
@@ -2609,6 +2609,15 @@ body {
border-radius: 8px;
line-height: 1.3;
}
.stat-price-total {
display: block;
font-size: 0.62rem;
font-weight: 600;
color: #15803d;
margin-top: 2px;
white-space: nowrap;
line-height: 1.2;
}
/* ===== PRODUCT PREVIEW ===== */
.product-preview, .product-preview-small {
+25
View File
@@ -9001,6 +9001,7 @@ async function fetchAllPrices(forceRefresh = false) {
if (totalEl) totalEl.textContent = pricesFound > 0 ? `ca. ${sym}${runningTotal.toFixed(2)}` : '';
if (fetchBtn) fetchBtn.disabled = false;
if (refreshBtn) { refreshBtn.disabled = false; refreshBtn.textContent = '🔄'; }
_updateDashboardPriceTotal();
}
}
@@ -9228,6 +9229,29 @@ function _updateSmartUrgencyBadge() {
}
}
function _updateDashboardPriceTotal() {
const el = document.getElementById('stat-price-total');
if (!el) return;
const s = getSettings();
if (!s.price_enabled || !shoppingItems.length) { el.style.display = 'none'; return; }
const sym = _currencySymbol(s.price_currency || 'EUR');
const items = _buildPricePayload();
let total = 0, count = 0;
for (const item of items) {
const e = _cachedPrices[item.name];
if (e && e._qty === item.quantity && e._unit === item.unit && e.estimated_total != null) {
total += e.estimated_total;
count++;
}
}
if (count > 0) {
el.textContent = `ca. ${sym}${total.toFixed(2)}`;
el.style.display = '';
} else {
el.style.display = 'none';
}
}
/**
* Sync the on_bring flag for every smartShoppingItem against the current shoppingItems list.
* The server cache can be up to 10 min old so on_bring may be stale this corrects it
@@ -9579,6 +9603,7 @@ async function loadShoppingCount() {
}
} catch { /* ignore */ }
}
_updateDashboardPriceTotal();
}
/**
+3 -2
View File
@@ -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=20260507a">
<link rel="stylesheet" href="assets/css/style.css?v=20260507b">
<!-- 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 -->
@@ -120,6 +120,7 @@
<span class="stat-value" id="stat-spesa">-</span>
<span class="stat-label" data-i18n="nav.shopping">Spesa</span>
<span class="stat-urgent" id="stat-urgent" style="display:none"></span>
<span class="stat-price-total" id="stat-price-total" style="display:none"></span>
</div>
</div>
@@ -1461,6 +1462,6 @@
</div>
</div>
<script src="assets/js/app.js?v=20260507a"></script>
<script src="assets/js/app.js?v=20260507b"></script>
</body>
</html>
+1 -1
View File
@@ -440,7 +440,7 @@
"use_data_no_barcode": "✅ KI-Daten verwenden (ohne Barcode)"
},
"log": {
"title": " Verlauf",
"title": "📒 Verlauf",
"type_added": "Hinzugefügt",
"type_waste": "Entsorgt",
"type_used": "Verwendet",
+1 -1
View File
@@ -440,7 +440,7 @@
"use_data_no_barcode": "✅ Usa dati AI (senza barcode)"
},
"log": {
"title": " Storico",
"title": "📒 Storico",
"type_added": "Aggiunto",
"type_waste": "Buttato",
"type_used": "Usato",