🛡️ Warracker is an open source, self-hostable warranty tracker to monitor expirations, store receipts, files. You own the data, your rules!
Total Value click popover explaining calculation; remove duplicate status.js include (issue #192)
Omega (QA)07407802859a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 045aca3..a1352fc 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -149,6 +149,10 @@- _Files: `frontend/about.html`_- **Total Value dashboard card (#192):** New "Total Value" card on the status dashboard showing the sum of purchase prices across non-archived warranties, formatted with the user's currency symbol. Added `total_value` to both `/api/statistics` and `/api/statistics/global` (`COALESCE` to 0, so empty/null prices are safe); i18n key `status.total_value` added to all 20 locales.- _Files: `backend/statistics_routes.py`, `frontend/status.html`, `frontend/status.js`, `locales/*/translation.json`_+- **Total Value calculation tooltip (#192):** Clicking the Total Value card opens a popover explaining how the figure is calculated (sum of purchase prices of non-archived warranties; missing prices count as 0). New i18n key `status.total_value_tooltip` in all 20 locales; keyboard accessible (Enter/Space toggles, Escape dismisses).+ - _Files: `frontend/status.html`, `frontend/status.js`, `frontend/style.css`, `locales/*/translation.json`_+- **Duplicate `status.js` include removed:** `status.html` loaded `status.js` twice (once in `<head>`, once at end of `<body>`), attaching every event listener twice and initializing the dashboard twice.+ - _Files: `frontend/status.html`_## 1.0.2 - 2025-10-30diff --git a/frontend/status.html b/frontend/status.htmlindex 6df866b..5be6b2f 100644--- a/frontend/status.html+++ b/frontend/status.html@@ -38,7 +38,6 @@<!-- Load fix for auth buttons --><script src="fix-auth-buttons-loader.js?v=20250119001"></script><script src="script.js?v=20260518002" defer></script> <!-- Added script.js -->- <script src="status.js?v=20250119001" defer></script> <!-- Status page specific functionality --><style>.user-menu {position: relative;@@ -452,14 +451,15 @@</div></div>- <div class="status-card" data-status="total_value">+ <div class="status-card" data-status="total_value" id="totalValueCard" role="button" tabindex="0" aria-label="Total Value details"><div class="card-icon"><i class="fas fa-coins"></i></div><div class="card-content">- <h3 data-i18n="status.total_value">Total Value</h3>+ <h3><span data-i18n="status.total_value">Total Value</span> <i class="fas fa-circle-info info-hint"></i></h3><p class="count" id="totalValueCount">-</p></div>+ <div class="info-popover" id="totalValuePopover" data-i18n="status.total_value_tooltip">Sum of the purchase prices of all non-archived warranties. Warranties without a purchase price count as 0.</div></div></div>diff --git a/frontend/status.js b/frontend/status.jsindex 46b76a5..5958a53 100644--- a/frontend/status.js+++ b/frontend/status.js@@ -1344,6 +1344,31 @@// Setup event listeners for status page specific controlsif (refreshDashboardBtn) refreshDashboardBtn.addEventListener('click', refreshDashboard);if (searchWarranties) searchWarranties.addEventListener('input', filterAndSortWarranties);+ // Total Value card: click toggles the "how it's calculated" popover+ const totalValueCard = document.getElementById('totalValueCard');+ const totalValuePopover = document.getElementById('totalValuePopover');+ if (totalValueCard && totalValuePopover) {+ totalValueCard.addEventListener('click', function(event) {+ event.stopPropagation();+ totalValuePopover.classList.toggle('show');+ });+ totalValueCard.addEventListener('keydown', function(event) {+ if (event.key === 'Enter' || event.key === ' ') {+ event.preventDefault();+ totalValuePopover.classList.toggle('show');+ }+ });+ document.addEventListener('click', function(event) {+ if (!totalValueCard.contains(event.target)) {+ totalValuePopover.classList.remove('show');+ }+ });+ document.addEventListener('keydown', function(event) {+ if (event.key === 'Escape') {+ totalValuePopover.classList.remove('show');+ }+ });+ }// Restore saved status filter selection on loadif (statusFilter) {const savedStatus = loadStatusFilterPreference();diff --git a/frontend/style.css b/frontend/style.cssindex 178abc6..ecc9887 100644--- a/frontend/style.css+++ b/frontend/style.css@@ -1644,11 +1644,74 @@ input:checked + .toggle-slider:before {color: #9b59b6;}+.status-card[data-status="total_value"] {+ cursor: pointer;+ position: relative;+}++.status-card[data-status="total_value"]:focus-visible {+ outline: 2px solid #9b59b6;+ outline-offset: 2px;+}++.status-card[data-status="total_value"] .info-hint {+ font-size: 0.75rem;+ color: var(--dark-gray);+ margin-left: 4px;+ vertical-align: middle;+}++.status-card[data-status="total_value"] .card-content {+ min-width: 0;+}+.status-card[data-status="total_value"] .count {font-size: 1.4rem;white-space: nowrap;}+.info-popover {+ display: none;+ position: absolute;+ top: calc(100% + 10px);+ left: 0;+ min-width: 230px;+ max-width: 300px;+ background-color: var(--card-bg);+ color: var(--text-color);+ border: 1px solid var(--border-color);+ border-radius: 8px;+ padding: 12px 14px;+ font-size: 0.85rem;+ font-weight: 400;+ line-height: 1.5;+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);+ z-index: 60;+}++.info-popover.show {+ display: block;+}++.info-popover::after {+ content: '';+ position: absolute;+ bottom: 100%;+ left: 28px;+ border: 8px solid transparent;+ border-bottom-color: var(--border-color);+}++.info-popover::before {+ content: '';+ position: absolute;+ bottom: 100%;+ left: 29px;+ border: 7px solid transparent;+ border-bottom-color: var(--card-bg);+ z-index: 1;+}+.card-icon {font-size: 2.5rem;margin-right: 15px;diff --git a/locales/ar/translation.json b/locales/ar/translation.jsonindex 1ff52da..bacf07a 100644--- a/locales/ar/translation.json+++ b/locales/ar/translation.json@@ -692,7 +692,8 @@"version": "الإصدار","uptime": "وقت التشغيل","archived_warranties": "الضمانات المؤرشفة",- "total_value": "القيمة الإجمالية"+ "total_value": "القيمة الإجمالية",+ "total_value_tooltip": "مجموع أسعار الشراء لجميع الضمانات غير المؤرشفة. الضمانات بدون سعر الشراء تعتبر 0."},"about": {"title": "حول Warracker",@@ -807,4 +808,4 @@"pick_color": "اختر اللون","create_with_name": "إنشاء \"{{name}}\""}-}\ No newline at end of file+}diff --git a/locales/cs/translation.json b/locales/cs/translation.jsonindex fa2ee72..e9e6ff3 100644--- a/locales/cs/translation.json+++ b/locales/cs/translation.json@@ -689,7 +689,8 @@"version": "Verze","uptime": "Doba provozu","archived_warranties": "Archivované záruky",- "total_value": "Celková hodnota"+ "total_value": "Celková hodnota",+ "total_value_tooltip": "Součet nákupních cen všech nearchivovaných záruk. Záruky bez kupní ceny se počítají jako 0."},"about": {"title": "O aplikaci Warracker",@@ -804,4 +805,4 @@"no_selected": "Nejsou vybrány žádné štítky","pick_color": "Vyberte barvu"}-}\ No newline at end of file+}diff --git a/locales/de/translation.json b/locales/de/translation.jsonindex 13cba1c..39032ed 100644--- a/locales/de/translation.json+++ b/locales/de/translation.json@@ -682,7 +682,8 @@"version": "Version","uptime": "Betriebszeit","archived_warranties": "Archivierte Garantien",- "total_value": "Gesamtwert"+ "total_value": "Gesamtwert",+ "total_value_tooltip": "Summe der Kaufpreise aller nicht archivierten Garantien. Garantien ohne Kaufpreis zählen als 0."},"about": {"title": "Über Warracker",@@ -797,4 +798,4 @@"no_selected": "Keine Tags ausgewählt","pick_color": "Farbe auswählen"}-}\ No newline at end of file+}diff --git a/locales/en/translation.json b/locales/en/translation.jsonindex dcefde7..7cdf44a 100644--- a/locales/en/translation.json+++ b/locales/en/translation.json@@ -682,7 +682,8 @@"connected": "Connected","version": "Version","uptime": "Uptime",- "total_value": "Total Value"+ "total_value": "Total Value",+ "total_value_tooltip": "Sum of the purchase prices of all non-archived warranties. Warranties without a purchase price count as 0."},"about": {"title": "About - Warracker",diff --git a/locales/es/translation.json b/locales/es/translation.jsonindex bd471dd..e0d4bd6 100644--- a/locales/es/translation.json+++ b/locales/es/translation.json@@ -682,7 +682,8 @@"version": "Versión","uptime": "Tiempo de Actividad","archived_warranties": "Garantías archivadas",- "total_value": "Valor total"+ "total_value": "Valor total",+ "total_value_tooltip": "Suma de los precios de compra de todas las garantías no archivadas. Las garantías sin precio de compra cuentan como 0."},"about": {"title": "Acerca de Warracker",@@ -797,4 +798,4 @@"pick_color": "Elige color","create_with_name": "Crear \"{{name}}\""}-}\ No newline at end of file+}diff --git a/locales/fa/translation.json b/locales/fa/translation.jsonindex c79616a..fcf3733 100644--- a/locales/fa/translation.json+++ b/locales/fa/translation.json@@ -682,7 +682,8 @@"version": "نسخه","uptime": "مدت فعالیت","archived_warranties": "گارانتی های آرشیو شده",- "total_value": "ارزش کل"+ "total_value": "ارزش کل",+ "total_value_tooltip": "مجموع قیمت خرید کلیه ضمانت نامه های بایگانی نشده. گارانتی بدون قیمت خرید 0 محاسبه می شود."},"about": {"title": "درباره Warracker",@@ -797,4 +798,4 @@"no_selected": "هیچ برچسبی انتخاب نشده است","pick_color": "رنگ را انتخاب کنید"}-}\ No newline at end of file+}diff --git a/locales/fr/translation.json b/locales/fr/translation.jsonindex e89589e..9c79271 100644--- a/locales/fr/translation.json+++ b/locales/fr/translation.json@@ -682,7 +682,8 @@"version": "Version","uptime": "Temps de Fonctionnement","archived_warranties": "Garanties archivées",- "total_value": "Valeur totale"+ "total_value": "Valeur totale",+ "total_value_tooltip": "Somme des prix d'achat de toutes les garanties non archivées. Les garanties sans prix d’achat comptent pour 0."},"about": {"title": "À Propos de Warracker",@@ -797,4 +798,4 @@"no_selected": "Aucune balise sélectionnée","pick_color": "Choisissez la couleur"}-}\ No newline at end of file+}diff --git a/locales/he/translation.json b/locales/he/translation.jsonindex 88d3365..d4b57c4 100644--- a/locales/he/translation.json+++ b/locales/he/translation.json@@ -692,7 +692,8 @@"version": "גרסה","uptime": "זמן פעולה","archived_warranties": "אחריות בארכיון",- "total_value": "ערך כולל"+ "total_value": "ערך כולל",+ "total_value_tooltip": "סכום מחירי הרכישה של כל האחריות שאינן מאוחסנות בארכיון. אחריות ללא מחיר רכישה נחשבת כ-0."},"about": {"title": "אודות Warracker",@@ -807,4 +808,4 @@"no_selected": "לא נבחרו תגים","pick_color": "בחר צבע"}-}\ No newline at end of file+}diff --git a/locales/hi/translation.json b/locales/hi/translation.jsonindex b45ea72..b86e128 100644--- a/locales/hi/translation.json+++ b/locales/hi/translation.json@@ -682,7 +682,8 @@"version": "संस्करण","uptime": "अपटाइम","archived_warranties": "संग्रहीत वारंटी",- "total_value": "कुल मूल्य"+ "total_value": "कुल मूल्य",+ "total_value_tooltip": "सभी गैर-संग्रहीत वारंटी की खरीद कीमतों का योग। खरीद मूल्य के बिना वारंटी की गिनती 0 होती है।"},"about": {"title": "Warracker के बारे में",@@ -797,4 +798,4 @@"pick_color": "रंग चुनें","create_with_name": "\"{{name}}\" बनाएं"}-}\ No newline at end of file+}diff --git a/locales/it/translation.json b/locales/it/translation.jsonindex e63173e..c569aca 100644--- a/locales/it/translation.json+++ b/locales/it/translation.json@@ -94,7 +94,8 @@"version": "Versione","uptime": "Tempo di Attività","archived_warranties": "Garanzie archiviate",- "total_value": "Valore totale"+ "total_value": "Valore totale",+ "total_value_tooltip": "Somma dei prezzi di acquisto di tutte le garanzie non archiviate. Le garanzie senza prezzo di acquisto contano come 0."},"about": {"title": "Informazioni su Warracker",@@ -804,4 +805,4 @@"pick_color": "Scegli il colore","create_with_name": "Crea \"{{name}}\""}-}\ No newline at end of file+}diff --git a/locales/ja/translation.json b/locales/ja/translation.jsonindex 415d485..4d22239 100644--- a/locales/ja/translation.json+++ b/locales/ja/translation.json@@ -682,7 +682,8 @@"version": "バージョン","uptime": "稼働時間","archived_warranties": "アーカイブされた保証",- "total_value": "合計金額"+ "total_value": "合計金額",+ "total_value_tooltip": "アーカイブされていないすべての保証の購入価格の合計。購入価格のない保証は 0 としてカウントされます。"},"about": {"title": "Warrackerについて",@@ -797,4 +798,4 @@"pick_color": "色を選択してください","create_with_name": "「{{name}}」を作成します"}-}\ No newline at end of file+}diff --git a/locales/ko/translation.json b/locales/ko/translation.jsonindex 8c01ae4..4270953 100644--- a/locales/ko/translation.json+++ b/locales/ko/translation.json@@ -682,7 +682,8 @@"version": "버전","uptime": "가동 시간","archived_warranties": "보관된 보증",- "total_value": "총 가치"+ "total_value": "총 가치",+ "total_value_tooltip": "보관되지 않은 모든 보증의 구매 가격 합계입니다. 구매 가격이 없는 보증은 0으로 계산됩니다."},"about": {"title": "Warracker 정보",@@ -797,4 +798,4 @@"pick_color": "색상 선택","create_with_name": "\"{{name}}\" 만들기"}-}\ No newline at end of file+}diff --git a/locales/nl/translation.json b/locales/nl/translation.jsonindex f5c36bd..32fe23f 100644--- a/locales/nl/translation.json+++ b/locales/nl/translation.json@@ -682,7 +682,8 @@"version": "Versie","uptime": "Uptime","archived_warranties": "Gearchiveerde garanties",- "total_value": "Totale waarde"+ "total_value": "Totale waarde",+ "total_value_tooltip": "Som van de aankoopprijzen van alle niet-gearchiveerde garanties. Garanties zonder aankoopprijs tellen voor 0."},"about": {"title": "Over Warracker",@@ -797,4 +798,4 @@"pick_color": "Kies kleur","create_with_name": "Creëer \"{{name}}\""}-}\ No newline at end of file+}diff --git a/locales/pl/translation.json b/locales/pl/translation.jsonindex 7799f8b..d8c5c3d 100644--- a/locales/pl/translation.json+++ b/locales/pl/translation.json@@ -682,7 +682,8 @@"version": "Wersja","uptime": "Czas działania","archived_warranties": "Archiwizowane gwarancje",- "total_value": "Całkowita wartość"+ "total_value": "Całkowita wartość",+ "total_value_tooltip": "Suma cen zakupu wszystkich niezarchiwizowanych gwarancji. Gwarancje bez ceny zakupu liczą się jako 0."},"about": {"title": "O aplikacji - Warracker",@@ -797,4 +798,4 @@"no_selected": "Nie wybrano tagów","pick_color": "Wybierz kolor"}-}\ No newline at end of file+}diff --git a/locales/pt/translation.json b/locales/pt/translation.jsonindex d399f6e..67418d3 100644--- a/locales/pt/translation.json+++ b/locales/pt/translation.json@@ -726,7 +726,8 @@"version": "Versão","uptime": "Tempo de Atividade","archived_warranties": "Garantias arquivadas",- "total_value": "Valor total"+ "total_value": "Valor total",+ "total_value_tooltip": "Soma dos preços de compra de todas as garantias não arquivadas. Garantias sem preço de compra contam como 0."},"about": {"title": "Sobre o Warracker",@@ -797,4 +798,4 @@"pick_color": "Escolha a cor","create_with_name": "Crie \"{{name}}\""}-}\ No newline at end of file+}diff --git a/locales/ru/translation.json b/locales/ru/translation.jsonindex 382458a..3dc696c 100644--- a/locales/ru/translation.json+++ b/locales/ru/translation.json@@ -732,7 +732,8 @@"version": "Версия","uptime": "Время работы","archived_warranties": "Архивные гарантии",- "total_value": "Общая стоимость"+ "total_value": "Общая стоимость",+ "total_value_tooltip": "Сумма покупных цен всех неархивированных гарантий. Гарантии без покупной цены засчитываются как 0."},"about": {"title": "О Warracker",@@ -803,4 +804,4 @@"no_selected": "Теги не выбраны","pick_color": "Выберите цвет"}-}\ No newline at end of file+}diff --git a/locales/tr/translation.json b/locales/tr/translation.jsonindex b015225..6580c35 100644--- a/locales/tr/translation.json+++ b/locales/tr/translation.json@@ -682,7 +682,8 @@"version": "Sürüm","uptime": "Çalışma Süresi","archived_warranties": "Arşivlenmiş Garantiler",- "total_value": "Toplam Değer"+ "total_value": "Toplam Değer",+ "total_value_tooltip": "Arşivlenmemiş tüm garantilerin satın alma fiyatlarının toplamı. Satın alma fiyatı olmayan garantiler 0 olarak sayılır."},"about": {"title": "Warracker Hakkında",@@ -797,4 +798,4 @@"no_selected": "Hiçbir etiket seçilmedi","pick_color": "Renk seç"}-}\ No newline at end of file+}diff --git a/locales/uk/translation.json b/locales/uk/translation.jsonindex d591030..5f6ee03 100644--- a/locales/uk/translation.json+++ b/locales/uk/translation.json@@ -688,7 +688,8 @@"version": "Версія","uptime": "Час роботи","archived_warranties": "Архівні гарантії",- "total_value": "Загальна вартість"+ "total_value": "Загальна вартість",+ "total_value_tooltip": "Сума закупівельних цін усіх незаархівованих гарантій. Гарантії без закупівельної ціни зараховуються як 0."},"about": {"title": "Про Warracker",@@ -803,4 +804,4 @@"no_selected": "Теги не вибрано","pick_color": "Виберіть колір"}-}\ No newline at end of file+}diff --git a/locales/zh_CN/translation.json b/locales/zh_CN/translation.jsonindex 6e4107d..ad49ef0 100644--- a/locales/zh_CN/translation.json+++ b/locales/zh_CN/translation.json@@ -682,7 +682,8 @@"version": "版本","uptime": "正常运行时间","archived_warranties": "存档的保修",- "total_value": "总价值"+ "total_value": "总价值",+ "total_value_tooltip": "所有非存档保修的购买价格总和。没有购买价格的保修计为 0。"},"about": {"title": "关于 - Warracker",@@ -797,4 +798,4 @@"errors": {"error": "错误"}-}\ No newline at end of file+}diff --git a/locales/zh_HK/translation.json b/locales/zh_HK/translation.jsonindex 2ced1a1..9b770b9 100644--- a/locales/zh_HK/translation.json+++ b/locales/zh_HK/translation.json@@ -682,7 +682,8 @@"version": "版本","uptime": "正常執行時間","archived_warranties": "存檔的保固",- "total_value": "總價值"+ "total_value": "總價值",+ "total_value_tooltip": "所有非存檔保固的購買價格總和。沒有購買價格的保固計為 0。"},"about": {"title": "關於Warracker",@@ -797,4 +798,4 @@"no_selected": "沒有選擇標籤","pick_color": "選擇顏色"}-}\ No newline at end of file+}