From a9070df40e8f9487089195dc03c63c43e71fa243 Mon Sep 17 00:00:00 2001 From: Saku Laesvuori Date: Fri, 16 Jan 2026 19:42:37 +0200 Subject: [PATCH] Display transaction status in hledger-web --- hledger-web/static/hledger.css | 39 ++++++++++++++++++++++++++++ hledger-web/templates/journal.hamlet | 8 ++++++ 2 files changed, 47 insertions(+) diff --git a/hledger-web/static/hledger.css b/hledger-web/static/hledger.css index b6553dde0..72eee7fe0 100644 --- a/hledger-web/static/hledger.css +++ b/hledger-web/static/hledger.css @@ -227,6 +227,45 @@ ul { whitespace: nowrap; } +.status { + width: 1.2em; + text-align: center; +} + +.status-cleared { + width: 0.8em; + height: 0.8em; + vertical-align: baseline; + border-radius: 50%; + background-color: #5cb85c; + display: inline-block; +} + +.transaction:has(.status-pending) { + background-color: #f2dede; +} + +.transaction:has(.status-unmarked) { + background-color: #fcf8e3; +} + +.status-pending::before { + color: #d9534f; + font-weight: 900; + content: "!"; +} + +.status-unmarked { + width: 0.8em; + height: 0.8em; + vertical-align: baseline; + border-radius: 50%; + border-color: #f0ad4e; + border-width: 2px; + border-style: solid; + display: inline-block; +} + .transaction-code { font-family: monospace; color: #888; diff --git a/hledger-web/templates/journal.hamlet b/hledger-web/templates/journal.hamlet index 9d3a3308f..d5bbcfe23 100644 --- a/hledger-web/templates/journal.hamlet +++ b/hledger-web/templates/journal.hamlet @@ -13,6 +13,14 @@ $if elem AddPermission perms $with (payee, note) <- payeeAndNoteFromDescription' $ tdescription torig