fix: callsign color in the tables while changing themes

This commit is contained in:
2026-07-07 10:27:54 +02:00
parent 7a24282aa4
commit 1184a675c2
2 changed files with 11 additions and 6 deletions
+10 -5
View File
@@ -124,11 +124,16 @@ const makeColCatalog = (t: TFn): ColEntry[] => [
headerName: t('clg2.c.call'), field: 'dx_call' as any, width: 120,
defaultVisible: true,
cellClass: 'font-mono',
// New DXCC entity → fill the whole cell (no padded pill, so calls stay
// aligned with non-new rows). Text colour also flags worked-call vs new-call.
cellStyle: (p: any): any => (statusFor(p)?.status === 'new'
? { backgroundColor: '#ffe4e6', color: '#be123c', fontWeight: 700 }
: { color: statusFor(p)?.worked_call ? '#0369a1' : '#b8410c', fontWeight: 700 }),
// Only STATUS calls get a colour: new DXCC entity → filled cell (no padded
// pill, so calls stay aligned), worked-call → blue. A plain spot inherits the
// theme's normal text colour (var(--foreground)) so callsigns blend in with
// the rest of the row across every theme instead of always shouting orange.
cellStyle: (p: any): any => {
const s = statusFor(p);
if (s?.status === 'new') return { backgroundColor: '#ffe4e6', color: '#be123c', fontWeight: 700 };
if (s?.worked_call) return { color: '#0369a1', fontWeight: 700 };
return { fontWeight: 700 };
},
tooltipValueGetter: (p: any) => {
const s = statusFor(p);
return s?.status === 'new' ? t('clg2.tipNewDxcc', { country: s?.country ?? '' }) : s?.worked_call ? t('clg2.tipWorkedCall') : undefined;