fix(libra): drop colored status border to remove color collision

The status border (green/yellow/red) and the type-tinted amount (green
income, red expense) both used the same palette, so cleared expenses
showed a green border with a red amount and pending income showed a
yellow border with a green amount — same colors carrying two different
meanings on the same row.

Concentrate the encoding so each meaning has one home:
- Status lives in the icon (small, single glyph at the title)
- Type lives in the amount (sign + red/green tint)
- Voided still wins via strike-through + muted amount + Voided badge

Per Wise / Mint / YNAB convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-06 22:43:48 +02:00
commit fd269f97ea

View file

@ -131,15 +131,6 @@ function getStatusInfo(transaction: Transaction) {
}
}
// Left-border color encodes status (accepted / pending / rejected).
// Entry-type is communicated separately via the signed/colored amount.
function getStatusBorderClass(t: Transaction): string {
if (isVoided(t)) return 'border-l-red-600'
if (t.flag === '*') return 'border-l-green-600'
if (t.flag === '!') return 'border-l-yellow-500'
return 'border-l-transparent'
}
// Income gets a leading '+', expense a leading '-'.
function getAmountSign(t: Transaction): string {
if (isIncome(t)) return '+'
@ -356,10 +347,7 @@ onMounted(() => {
<div
v-for="transaction in transactionsToDisplay"
:key="transaction.id"
:class="[
'border-b md:border md:rounded-lg p-4 hover:bg-muted/50 transition-colors border-l-4',
getStatusBorderClass(transaction)
]"
class="border-b md:border md:rounded-lg p-4 hover:bg-muted/50 transition-colors"
>
<!-- Transaction Header -->
<div class="flex items-start justify-between gap-3 mb-2">