fix(decodes): new-band-mode had no badge, so its rows looked unfiltered
A station new on this band AND in this mode is one status, 'new-band-mode', and the badge table has an entry for neither half. The lookup returned nothing, so those rows showed only their grid or prefix badge — and with NEW/BAND/MODE selected, a row whose visible badges were LOC and PFX read as the filter letting through things nobody asked for. It was not: the row belonged there and the panel failed to say why. catsOf has always split that status into its two categories for filtering. The badges now do the same on screen.
This commit is contained in:
+4
-2
@@ -5,12 +5,14 @@
|
|||||||
"en": [
|
"en": [
|
||||||
"Elecraft console: MOX unkeys again, and the power and SWR bars move while transmitting. The poll stops while the carrier is up — the rig refuses most questions then — and the panel was left believing the radio was still receiving, so pressing MOX a second time sent another transmit command instead of stopping.",
|
"Elecraft console: MOX unkeys again, and the power and SWR bars move while transmitting. The poll stops while the carrier is up — the rig refuses most questions then — and the panel was left believing the radio was still receiving, so pressing MOX a second time sent another transmit command instead of stopping.",
|
||||||
"Elecraft console: RIT and XIT can be moved — ±10 and ±100 Hz buttons with the offset shown beside them. A lit RIT button says the feature is on and nothing about where it has put the receiver.",
|
"Elecraft console: RIT and XIT can be moved — ±10 and ±100 Hz buttons with the offset shown beside them. A lit RIT button says the feature is on and nothing about where it has put the receiver.",
|
||||||
"Elecraft console: a 4.0 kHz filter button, the K3 maximum and the one FT8 wants."
|
"Elecraft console: a 4.0 kHz filter button, the K3 maximum and the one FT8 wants.",
|
||||||
|
"FT decodes: a station that is new on both the band and the mode now shows both badges. That status had no badge of its own, so those rows passed the BAND and MODE filters and then displayed no reason for being in the list — only their grid or prefix badge, which looked like the filter leaking."
|
||||||
],
|
],
|
||||||
"fr": [
|
"fr": [
|
||||||
"Console Elecraft : MOX repasse bien en réception, et les barres de puissance et de ROS bougent pendant l'émission. L'interrogation s'arrête quand la porteuse est levée — la radio refuse alors la plupart des questions — et le panneau croyait donc la radio toujours en réception : un second appui sur MOX envoyait une nouvelle commande d'émission au lieu d'arrêter.",
|
"Console Elecraft : MOX repasse bien en réception, et les barres de puissance et de ROS bougent pendant l'émission. L'interrogation s'arrête quand la porteuse est levée — la radio refuse alors la plupart des questions — et le panneau croyait donc la radio toujours en réception : un second appui sur MOX envoyait une nouvelle commande d'émission au lieu d'arrêter.",
|
||||||
"Console Elecraft : le RIT et le XIT se règlent — boutons ±10 et ±100 Hz avec le décalage affiché à côté. Un bouton RIT allumé dit que la fonction est active et rien sur l'endroit où elle a mis le récepteur.",
|
"Console Elecraft : le RIT et le XIT se règlent — boutons ±10 et ±100 Hz avec le décalage affiché à côté. Un bouton RIT allumé dit que la fonction est active et rien sur l'endroit où elle a mis le récepteur.",
|
||||||
"Console Elecraft : un bouton de filtre à 4,0 kHz, le maximum du K3 et celui qu'il faut pour le FT8."
|
"Console Elecraft : un bouton de filtre à 4,0 kHz, le maximum du K3 et celui qu'il faut pour le FT8.",
|
||||||
|
"Décodes FT : une station nouvelle à la fois sur la bande et dans le mode affiche maintenant les deux badges. Ce statut n'avait pas de badge à lui : ces lignes passaient les filtres BANDE et MODE puis n'affichaient aucune raison d'être là — seulement leur badge de locator ou de préfixe, ce qui donnait l'impression d'un filtre qui fuyait."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -316,6 +316,22 @@ const ENTITY_BADGE: Record<string, { label: string; cls: string }> = {
|
|||||||
'new-call': { label: 'dec.stCall', cls: 'bg-muted text-muted-foreground' },
|
'new-call': { label: 'dec.stCall', cls: 'bg-muted text-muted-foreground' },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// entityBadgesFor turns a status into the badges that describe it.
|
||||||
|
//
|
||||||
|
// A LIST, because "new-band-mode" is two facts at once — new on this band and
|
||||||
|
// new in this mode — and the map above has an entry for neither. It was read
|
||||||
|
// with a single lookup, which returned nothing for that status: those rows
|
||||||
|
// passed the BAND and MODE filters and then showed no reason for being there,
|
||||||
|
// which is precisely what was reported. catsOf has always split the status into
|
||||||
|
// its two categories; this is the same split, on the screen.
|
||||||
|
function entityBadgesFor(status: string): { label: string; cls: string }[] {
|
||||||
|
if (status === 'new-band-mode') {
|
||||||
|
return [ENTITY_BADGE['new-band'], ENTITY_BADGE['new-mode']];
|
||||||
|
}
|
||||||
|
const one = ENTITY_BADGE[status];
|
||||||
|
return one ? [one] : [];
|
||||||
|
}
|
||||||
|
|
||||||
// The orthogonal ones: a station already worked for its entity can still be a
|
// The orthogonal ones: a station already worked for its entity can still be a
|
||||||
// new grid, a new prefix or a park never logged.
|
// new grid, a new prefix or a park never logged.
|
||||||
//
|
//
|
||||||
@@ -1004,10 +1020,10 @@ export function DecodesPanel({ decodes, txMsgs, txState, txStates, spotStatus, o
|
|||||||
{g.decodes.map((d, i) => {
|
{g.decodes.map((d, i) => {
|
||||||
const e = statusOf(d);
|
const e = statusOf(d);
|
||||||
const st = e?.status && e.status !== 'worked' ? e.status : '';
|
const st = e?.status && e.status !== 'worked' ? e.status : '';
|
||||||
const entity = st ? ENTITY_BADGE[st] : undefined;
|
const entities = st ? entityBadgesFor(st) : [];
|
||||||
const extras = EXTRA_BADGES.filter((b) => !!e?.[b.key]);
|
const extras = EXTRA_BADGES.filter((b) => !!e?.[b.key]);
|
||||||
const mine = !!me && d.call === me;
|
const mine = !!me && d.call === me;
|
||||||
const hot = !!entity || extras.length > 0;
|
const hot = entities.length > 0 || extras.length > 0;
|
||||||
// Someone answering us outranks everything else on the screen.
|
// Someone answering us outranks everything else on the screen.
|
||||||
const replying = answersMe(d.msg);
|
const replying = answersMe(d.msg);
|
||||||
// The station we are calling, so it can be picked out of a slot
|
// The station we are calling, so it can be picked out of a slot
|
||||||
@@ -1096,11 +1112,11 @@ export function DecodesPanel({ decodes, txMsgs, txState, txStates, spotStatus, o
|
|||||||
{t('dec.wkd')}
|
{t('dec.wkd')}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{entity && (
|
{entities.map((b) => (
|
||||||
<span className={cn('rounded px-1 py-px text-[10px] font-bold uppercase tracking-wide shrink-0', entity.cls)}>
|
<span key={b.label} className={cn('rounded px-1 py-px text-[10px] font-bold uppercase tracking-wide shrink-0', b.cls)}>
|
||||||
{t(entity.label)}
|
{t(b.label)}
|
||||||
</span>
|
</span>
|
||||||
)}
|
))}
|
||||||
{extras.map((b) => {
|
{extras.map((b) => {
|
||||||
// A square WORKED but not yet confirmed is a different job
|
// A square WORKED but not yet confirmed is a different job
|
||||||
// from one never worked: a QSL to chase, not a QSO to make.
|
// from one never worked: a QSL to chase, not a QSO to make.
|
||||||
|
|||||||
Reference in New Issue
Block a user