feat(chase): the switches follow the operator, not the panel
Chase POTA, US counties, prefixes and grids were written for the cluster and stayed there, so an operator who does not chase parks still met NEW POTA in the FT decode list and in Chase new: the same badge withdrawn on one screen and shouting on the next. The setting is about what is hunted. One helper answers the question for every panel, keyed by both the status field names and the shorter category names so a single call serves badges and filter chips alike. Chase new also stops CATEGORISING a row by a marker that is switched off, which had left rows listed with no visible reason for being there. A new US state has no switch of its own, so it is always allowed.
This commit is contained in:
@@ -16,6 +16,7 @@ import { useEffect, useMemo, useState } from 'react';
|
||||
import { Radio, Search, X, Signal, ArrowUpRight, Timer, Trash2, Ban, Columns2, Bot } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useI18n } from '@/lib/i18n';
|
||||
import { chaseAllows } from '@/lib/spotDisplay';
|
||||
import { markerColour, type SpotMarkerKey } from '@/lib/spotMarkers';
|
||||
import { writeUiPref } from '@/lib/uiPref';
|
||||
|
||||
@@ -743,7 +744,7 @@ export function DecodesPanel({ decodes, txMsgs, txState, txStates, spotStatus, o
|
||||
{/* Per-category badges, in the colours of the flags they select — the
|
||||
same vocabulary as the Chase New panel. */}
|
||||
<span className="flex items-center gap-1 pl-1 border-l border-border/60 ml-1" title={t('dec.catsHint')}>
|
||||
{NEW_CATS.map((c) => {
|
||||
{NEW_CATS.filter((c) => chaseAllows(c.key)).map((c) => {
|
||||
const on = cats.has(c.key);
|
||||
return (
|
||||
<button
|
||||
@@ -1051,7 +1052,7 @@ export function DecodesPanel({ decodes, txMsgs, txState, txStates, spotStatus, o
|
||||
const e = statusOf(d);
|
||||
const st = e?.status && e.status !== 'worked' ? e.status : '';
|
||||
const entities = st ? entityBadgesFor(st) : [];
|
||||
const extras = EXTRA_BADGES.filter((b) => !!e?.[b.key]);
|
||||
const extras = EXTRA_BADGES.filter((b) => !!e?.[b.key] && chaseAllows(b.key as string));
|
||||
const mine = !!me && d.call === me;
|
||||
const hot = entities.length > 0 || extras.length > 0;
|
||||
// Someone answering us outranks everything else on the screen.
|
||||
|
||||
Reference in New Issue
Block a user