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:
parent
a9c8d16f05
commit
409d2560bc
6 changed files with 24 additions and 13 deletions
|
|
@ -9,7 +9,12 @@ describe('appStore — CRUD', () => {
|
||||||
payments: [],
|
payments: [],
|
||||||
expenses: [],
|
expenses: [],
|
||||||
taxInputs: {},
|
taxInputs: {},
|
||||||
dashboard: { charts: [], widgets: [] },
|
recurringExpenses: [],
|
||||||
|
dashboard: {
|
||||||
|
charts: [], widgets: [],
|
||||||
|
workCharts: [], paymentsCharts: [], expensesCharts: [], taxCharts: [],
|
||||||
|
workTiles: [], paymentsTiles: [], expensesTiles: [], taxTiles: [],
|
||||||
|
},
|
||||||
settings: { theme: 'standard', mode: 'dark', defaultRate: 50 },
|
settings: { theme: 'standard', mode: 'dark', defaultRate: 50 },
|
||||||
version: 1,
|
version: 1,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,13 @@ describe('Vault', () => {
|
||||||
payments: [],
|
payments: [],
|
||||||
expenses: [],
|
expenses: [],
|
||||||
taxInputs: {},
|
taxInputs: {},
|
||||||
dashboard: { charts: [], widgets: [] },
|
recurringExpenses: [],
|
||||||
settings: { theme: 'standard', mode: 'dark', storageMode: 'cookie', defaultRate: 50 },
|
dashboard: {
|
||||||
|
charts: [], widgets: [],
|
||||||
|
workCharts: [], paymentsCharts: [], expensesCharts: [], taxCharts: [],
|
||||||
|
workTiles: [], paymentsTiles: [], expensesTiles: [], taxTiles: [],
|
||||||
|
},
|
||||||
|
settings: { theme: 'standard', mode: 'dark', defaultRate: 50 },
|
||||||
version: 1,
|
version: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,7 @@ export function buildHierarchyForRange(
|
||||||
}));
|
}));
|
||||||
return {
|
return {
|
||||||
key: d,
|
key: d,
|
||||||
level: 'day',
|
level: 'day' as const,
|
||||||
label: format(new Date(d + 'T00:00:00'), 'EEE, MMM d'),
|
label: format(new Date(d + 'T00:00:00'), 'EEE, MMM d'),
|
||||||
value: itemNodes.reduce((s, n) => s + n.value, 0),
|
value: itemNodes.reduce((s, n) => s + n.value, 0),
|
||||||
children: itemNodes,
|
children: itemNodes,
|
||||||
|
|
@ -284,7 +284,7 @@ export function buildHierarchyForRange(
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
key: month,
|
key: month,
|
||||||
level: 'month',
|
level: 'month' as const,
|
||||||
label: format(new Date(month + '-01T00:00:00'), 'MMMM yyyy'),
|
label: format(new Date(month + '-01T00:00:00'), 'MMMM yyyy'),
|
||||||
value: dayNodes.reduce((s, n) => s + n.value, 0),
|
value: dayNodes.reduce((s, n) => s + n.value, 0),
|
||||||
children: dayNodes,
|
children: dayNodes,
|
||||||
|
|
@ -292,7 +292,7 @@ export function buildHierarchyForRange(
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
key: year,
|
key: year,
|
||||||
level: 'year',
|
level: 'year' as const,
|
||||||
label: year,
|
label: year,
|
||||||
value: monthNodes.reduce((s, n) => s + n.value, 0),
|
value: monthNodes.reduce((s, n) => s + n.value, 0),
|
||||||
children: monthNodes,
|
children: monthNodes,
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ export function TaxPage() {
|
||||||
step="0.01"
|
step="0.01"
|
||||||
className="input"
|
className="input"
|
||||||
placeholder={isAutoFilled ? String(autoValue) : 'Enter value...'}
|
placeholder={isAutoFilled ? String(autoValue) : 'Enter value...'}
|
||||||
value={inputs[p.field] ?? ''}
|
value={(inputs[p.field] as number | undefined) ?? ''}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
updateInput({ [p.field]: e.target.value ? Number(e.target.value) : undefined })
|
updateInput({ [p.field]: e.target.value ? Number(e.target.value) : undefined })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -781,14 +781,14 @@ select.ss-input { cursor: pointer; }
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In dark mode, invert the iframe content then rotate hue back so colours
|
/* In dark mode, dim the iframe to reduce glare without inverting colours.
|
||||||
stay natural while the bright white background becomes dark.
|
Full inversion would break QR codes inside the widget, so we use a gentle
|
||||||
Background is set to #fff so it inverts to near-black, matching the theme. */
|
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 {
|
[data-mode='dark'] .kofi-modal iframe {
|
||||||
filter: invert(1) hue-rotate(180deg);
|
filter: brightness(0.65);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ─── Hamburger / mobile nav ─────────────────────────────────────────────── */
|
/* ─── Hamburger / mobile nav ─────────────────────────────────────────────── */
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,6 @@
|
||||||
"@/*": ["src/*"]
|
"@/*": ["src/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"],
|
||||||
|
"exclude": ["src/__tests__"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue