diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cb1766..dca475e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/). +## [1.1.0] - 2026-10-04 + +### Added + +- Payment history for each subscription: past charges are calculated from the start date, frequency and price, and the total paid so far is shown. +- Confirm the amount actually paid for any charge, or mark it as not charged. +- Price history: when the price changes you choose whether it applies from the next renewal, from the last charge, or to the whole history. +- Pausing a subscription stops its charges; resuming marks the renewals in between as not charged. +- "Actual spending" section with the last 12 months and year to date, plus a monthly bar chart. +- Price history and confirmed charges are included in the JSON backup. + +### Fixed + +- The billing frequency selector overflowed the screen on narrow phones (iPhone SE/mini). + ## [1.0.2] - 2026-10-04 ### Fixed diff --git a/README.it.md b/README.it.md index 551e309..31fc013 100644 --- a/README.it.md +++ b/README.it.md @@ -26,6 +26,7 @@ - **Frequenza flessibile**: mensile, trimestrale, annuale o personalizzata ("ogni 4 mesi", "ogni 2 settimane", …). Le date di fine mese sono gestite correttamente (31 gen → 28/29 feb → 31 mar). - **Multivaluta**: ogni abbonamento ha la sua valuta. I totali sono mostrati per valuta, oppure come totale unico nella valuta principale se inserisci i tuoi tassi di cambio (i tassi non vengono mai scaricati da internet). - **Dashboard**: spesa mensile o annuale, rinnovi dei prossimi 30 giorni, ordinamento per rinnovo, costo o nome, e pausa degli abbonamenti senza eliminarli. +- **Storico pagamenti**: gli addebiti passati vengono calcolati in automatico, e puoi confermare l'importo pagato davvero o segnare un addebito come non avvenuto. Le variazioni di prezzo valgono dalla data che scegli, così lo storico resta corretto. Il grafico "Spesa effettiva" mostra gli ultimi 12 mesi. - **Promemoria**: notifiche locali più un **export nel calendario (.ics)** con avvisi, per promemoria affidabili su qualsiasi telefono. - **PWA installabile**: funziona offline e si apre a schermo intero. Una guida animata mostra come aggiungere l'app alla schermata Home su iOS e Android. - **Interfaccia bilingue**: italiano e inglese, con rilevamento automatico e selettore manuale. diff --git a/README.md b/README.md index 5ac3ece..4fa8bb4 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ - **Flexible billing**: monthly, quarterly or yearly, or any custom period ("every 4 months", "every 2 weeks", …). Month-end dates are handled correctly (31 Jan → 28/29 Feb → 31 Mar). - **Multi-currency**: each subscription has its own currency. Totals are shown per currency, or as one total in your main currency if you enter your own exchange rates (rates are never fetched online). - **Dashboard**: monthly or yearly spend, upcoming renewals for the next 30 days, sorting by renewal date, cost or name, and pausing a subscription without deleting it. +- **Payment history**: past charges are calculated automatically, and you can confirm the amount actually paid or mark a charge as not charged. Price changes apply from a date of your choice, so the history stays accurate. An "Actual spending" chart shows the last 12 months. - **Reminders**: local notifications plus a **calendar export (.ics)** with alerts for reliable reminders on any phone. - **Installable PWA**: works offline and opens full screen. An animated guide shows how to add the app to the Home Screen on iOS and Android. - **Bilingual UI**: Italian and English, detected automatically and switchable. @@ -147,6 +148,7 @@ For reminders that always arrive on time, use **Settings → Export to calendar* │ │ ├── db.js IndexedDB storage, validation, backup │ │ ├── reminders.js Local notifications │ │ ├── ics.js Calendar export +│ │ ├── history.js Payment history and actual spending │ │ └── version.js App version (also names the offline cache) │ ├── ui.js DOM helpers, bottom sheets, toasts │ ├── install.js "Add to Home Screen" guide diff --git a/css/app.css b/css/app.css index 4ab1e51..57958b3 100644 --- a/css/app.css +++ b/css/app.css @@ -542,7 +542,7 @@ dialog.sheet.open .sheet-panel { transform: translate(-50%, 0); } /* ---------- Form ---------- */ -.form { display: grid; gap: 16px; } +.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; } .form-hero { display: grid; justify-items: center; gap: 10px; padding: 6px 0 4px; } .form-hero .logo { animation: pop 0.45s var(--ease-spring) backwards; } .hero-name { font-size: 20px; font-weight: 750; text-align: center; overflow-wrap: anywhere; } @@ -639,7 +639,7 @@ input[type="date"]::-webkit-date-and-time-value { text-align: left; } /* ---------- Settings ---------- */ -.settings { display: grid; gap: 22px; } +.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; } .set-group h3 { margin: 0 4px 8px; font-size: 13px; @@ -831,3 +831,122 @@ input[type="date"]::-webkit-date-and-time-value { text-align: left; } } .fatal, .noscript { padding: 24px; text-align: center; color: var(--danger); } + +/* ---------- Payment history ---------- */ + +.history-card { + display: flex; + align-items: center; + gap: 12px; + width: 100%; + padding: 14px 16px; + border: 0; + border-radius: var(--radius-sm); + background: var(--surface); + box-shadow: inset 0 0 0 1px var(--line); + text-align: left; + transition: background 0.15s ease; +} +.history-card:active { background: var(--surface-2); } +.history-card-text { flex: 1; min-width: 0; display: grid; gap: 2px; } +.history-card-total { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; } +.history-card .chev { width: 18px; height: 18px; color: var(--muted); } + +.history { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; } +.history-head { display: flex; align-items: center; gap: 14px; padding-top: 4px; } +.history-total { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; } +.history-hint { margin-top: -6px; } +.charge-list, .price-list { list-style: none; margin: 0; padding: 0; } +.charge-row { + display: grid; + grid-template-columns: 1fr auto auto; + align-items: center; + gap: 10px; + width: 100%; + min-height: 56px; + padding: 10px 16px; + border: 0; + background: transparent; + text-align: left; + color: var(--text); + transition: background 0.15s ease; +} +.charge-row:active:not(:disabled) { background: var(--surface-2); } +.charge-row:disabled { cursor: default; opacity: 0.7; } +.charge-date { font-weight: 600; font-variant-numeric: tabular-nums; } +.charge-amount { display: grid; justify-items: end; gap: 1px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 72px; } +.charge-row.is-skipped .charge-amount > span:first-child { color: var(--muted); } +.chip-status { + padding: 2px 8px; + border-radius: 999px; + font-size: 11.5px; + font-weight: 700; + white-space: nowrap; + background: var(--surface-2); + color: var(--muted); +} +.chip-status.st-paid { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); } +.chip-status.st-skipped { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); } +.chip-status.st-upcoming { background: var(--accent-soft); color: var(--accent); } +.price-list .set-row { min-height: 48px; } +.show-all { margin-top: 10px; } +.currency-static { display: flex; align-items: center; justify-content: center; font-weight: 650; color: var(--muted); } + +/* ---------- Actual spending ---------- */ + +.spend-card { + padding: 16px; + border-radius: var(--radius); + background: var(--surface); + box-shadow: var(--shadow); +} +.spend-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } +.spend-stats .label { font-size: 13px; font-weight: 650; color: var(--muted); } +.spend-value { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; } +.spend-readout { margin-top: 14px; font-size: 13.5px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 1.4em; } +.bars { + display: grid; + grid-template-columns: repeat(12, 1fr); + gap: 4px; + height: 140px; + margin-top: 8px; + border-bottom: 1px solid var(--line); +} +.bar { + position: relative; + display: flex; + flex-direction: column; + justify-content: flex-end; + align-items: center; + height: 100%; + padding: 0 0 2px; + border: 0; + background: transparent; + cursor: pointer; +} +.bar-fill { + width: min(100%, 18px); + height: var(--h, 0%); + min-height: 3px; + border-radius: 4px 4px 0 0; + background: var(--accent); + transition: filter 0.15s ease, height 0.4s var(--ease-spring); +} +.bar-fill.is-zero { min-height: 0; } +.bar.is-active .bar-fill, .bar:hover .bar-fill { filter: brightness(1.15) saturate(1.1); } +.bar-label { + position: absolute; + bottom: -22px; + font-size: 11px; + font-weight: 600; + color: var(--muted); +} +.bar.is-current .bar-label { color: var(--text); font-weight: 750; } +.spend-card .bars { margin-bottom: 22px; } +.spend-note { margin-top: 4px; } + +/* Narrow phones (iPhone SE/mini): the four frequency options don't fit in one row. */ +@media (max-width: 420px) { + .form .seg { display: grid; grid-template-columns: 1fr 1fr; } + .seg button { min-width: 0; } +} diff --git a/index.html b/index.html index f8900a6..55deda4 100644 --- a/index.html +++ b/index.html @@ -50,6 +50,10 @@

+
+

+
+