Changed from color inversion to brightness lowered for ko-fi pop up in dark mode, as inversion breaks QR codes

This commit is contained in:
Deven Thiel 2026-03-05 19:00:56 -05:00
parent a9c8d16f05
commit 409d2560bc
6 changed files with 24 additions and 13 deletions

View file

@ -9,7 +9,12 @@ describe('appStore — CRUD', () => {
payments: [],
expenses: [],
taxInputs: {},
dashboard: { charts: [], widgets: [] },
recurringExpenses: [],
dashboard: {
charts: [], widgets: [],
workCharts: [], paymentsCharts: [], expensesCharts: [], taxCharts: [],
workTiles: [], paymentsTiles: [], expensesTiles: [], taxTiles: [],
},
settings: { theme: 'standard', mode: 'dark', defaultRate: 50 },
version: 1,
},

View file

@ -57,8 +57,13 @@ describe('Vault', () => {
payments: [],
expenses: [],
taxInputs: {},
dashboard: { charts: [], widgets: [] },
settings: { theme: 'standard', mode: 'dark', storageMode: 'cookie', defaultRate: 50 },
recurringExpenses: [],
dashboard: {
charts: [], widgets: [],
workCharts: [], paymentsCharts: [], expensesCharts: [], taxCharts: [],
workTiles: [], paymentsTiles: [], expensesTiles: [], taxTiles: [],
},
settings: { theme: 'standard', mode: 'dark', defaultRate: 50 },
version: 1,
});

View file

@ -276,7 +276,7 @@ export function buildHierarchyForRange(
}));
return {
key: d,
level: 'day',
level: 'day' as const,
label: format(new Date(d + 'T00:00:00'), 'EEE, MMM d'),
value: itemNodes.reduce((s, n) => s + n.value, 0),
children: itemNodes,
@ -284,7 +284,7 @@ export function buildHierarchyForRange(
});
return {
key: month,
level: 'month',
level: 'month' as const,
label: format(new Date(month + '-01T00:00:00'), 'MMMM yyyy'),
value: dayNodes.reduce((s, n) => s + n.value, 0),
children: dayNodes,
@ -292,7 +292,7 @@ export function buildHierarchyForRange(
});
return {
key: year,
level: 'year',
level: 'year' as const,
label: year,
value: monthNodes.reduce((s, n) => s + n.value, 0),
children: monthNodes,

View file

@ -169,7 +169,7 @@ export function TaxPage() {
step="0.01"
className="input"
placeholder={isAutoFilled ? String(autoValue) : 'Enter value...'}
value={inputs[p.field] ?? ''}
value={(inputs[p.field] as number | undefined) ?? ''}
onChange={(e) =>
updateInput({ [p.field]: e.target.value ? Number(e.target.value) : undefined })
}

View file

@ -781,14 +781,14 @@ select.ss-input { cursor: pointer; }
min-height: 0;
display: block;
width: 100%;
background: #fff;
}
/* In dark mode, invert the iframe content then rotate hue back so colours
stay natural while the bright white background becomes dark.
Background is set to #fff so it inverts to near-black, matching the theme. */
/* In dark mode, dim the iframe to reduce glare without inverting colours.
Full inversion would break QR codes inside the widget, so we use a gentle
brightness reduction instead enough to soften the bright white background
without flipping black/white and making QR codes unreadable. */
[data-mode='dark'] .kofi-modal iframe {
filter: invert(1) hue-rotate(180deg);
filter: brightness(0.65);
}
/* ─── Hamburger / mobile nav ─────────────────────────────────────────────── */

View file

@ -20,5 +20,6 @@
"@/*": ["src/*"]
}
},
"include": ["src"]
"include": ["src"],
"exclude": ["src/__tests__"]
}