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:
parent
5db2dbe8a8
commit
fd269f97ea
1 changed files with 1 additions and 13 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue