feat(bandmap): mark LoTW users, with the badge the cluster already uses

Logger32 draws a green square for a LoTW user and an X for a worked one. The
square is the part worth copying; the way it is drawn is not.

Colour on this map is already spoken for — it carries the entity status, and
the left edge of each pill stacks the new-park / new-county markers. Adding a
green fill for LoTW would put two unrelated meanings on one channel, and an
operator would have to work out which green meant what. So it is the same "L"
badge the cluster list draws, in the same muted blue, for the reason written
there: whether a station uploads to LoTW says nothing about whether the spot is
worth chasing.

Worked stations already read as worked here — the pill goes grey and the
status markers speak — so no X is needed.

Switchable in Settings → Appearance, and on by default: a `configured` flag
distinguishes "saved with this off" from "saved before the option existed", so
turning it off sticks instead of being undone by the next default.
This commit is contained in:
2026-08-13 08:41:38 +02:00
parent ef628e066a
commit f698096f53
8 changed files with 50 additions and 8 deletions
@@ -57,6 +57,12 @@ export function AppearancePanel() {
return (
<div className="space-y-4">
<label className="flex items-start gap-2 text-sm cursor-pointer">
<Checkbox checked={!!cfg.bandmap_lotw} className="mt-0.5"
onCheckedChange={(c) => save({ ...cfg, bandmap_lotw: !!c } as any)} />
<span>{t('appr.bandmapLotw')} <span className="text-xs text-muted-foreground">{t('appr.bandmapLotwHint')}</span></span>
</label>
<label className="flex items-start gap-2 text-sm cursor-pointer">
<Checkbox checked={cfg.enabled} className="mt-0.5"
onCheckedChange={(c) => save({ ...cfg, enabled: !!c })} />
+15 -1
View File
@@ -38,6 +38,9 @@ type SpotStatusEntry = {
new_county?: boolean;
new_pota?: boolean;
new_pfx?: boolean;
// Whether the station uploads to LoTW. Not a status — it says nothing about
// whether the spot is worth chasing — so it is drawn as a badge, never a colour.
lotw?: boolean;
};
// The extra markers are ORTHOGONAL to the entity status: a spot can be a worked
@@ -79,6 +82,8 @@ interface Props {
// globally from the band-map tab toolbar.
hideDigital?: boolean;
fitToBand?: boolean;
// Mark stations that upload to LoTW (Settings → Appearance).
showLotw?: boolean;
// keyNav enables Ctrl+↑ / Ctrl+↓ to hop to the next spot above / below the rig
// frequency (and tune to it). Only the docked Main-view band map sets this, so
// the multi-band Band Map tab (several maps) doesn't fight over the shortcut.
@@ -227,7 +232,7 @@ const BOT_PAD = 14; // the top-most freq label isn't clipped at y=0
// last; ties broken by closeness to the rig freq).
const MAX_VISIBLE_SPOTS = 30;
export function BandMap({ band, spots, spotStatus: spotStatusRaw, currentFreqHz, onSpotClick, onClose, side = 'right', onToggleSide, hideDigital = false, fitToBand = false, keyNav = false }: Props) {
export function BandMap({ band, spots, spotStatus: spotStatusRaw, currentFreqHz, onSpotClick, onClose, side = 'right', onToggleSide, hideDigital = false, fitToBand = false, keyNav = false, showLotw = false }: Props) {
const { t } = useI18n();
// The two display options are applied ONCE here, on the whole map, so the
@@ -649,6 +654,15 @@ export function BandMap({ band, spots, spotStatus: spotStatusRaw, currentFreqHz,
})()}
<span className="flex items-center gap-1.5 px-2 font-mono text-[11px] font-bold leading-none">
<span>{p.spot.dx_call}</span>
{/* Same badge the cluster list draws, for the same reason: the
muted-blue of a confirmation, never a status colour —
whether a station uploads to LoTW says nothing about
whether the spot is worth chasing. A glyph rather than a
colour also keeps it off the channel the statuses use. */}
{showLotw && entry?.lotw && (
<span title={t('clu.lotwBadge')} className="text-[9px] font-normal rounded px-1 py-px"
style={{ background: 'color-mix(in srgb, var(--info) 22%, transparent)', color: 'var(--info)' }}>L</span>
)}
{mode && (
<span className="text-[9px] font-normal text-current/70 bg-current/10 rounded px-1 py-px">
{mode}