From f698096f53a30999855b93cf950bf142ae3de851 Mon Sep 17 00:00:00 2001 From: Gregory Salaun Date: Thu, 13 Aug 2026 08:41:38 +0200 Subject: [PATCH] feat(bandmap): mark LoTW users, with the badge the cluster already uses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- appearance.go | 20 +++++++++++++++++--- changelog.json | 6 ++++-- frontend/src/App.tsx | 1 + frontend/src/components/AppearancePanel.tsx | 6 ++++++ frontend/src/components/BandMap.tsx | 16 +++++++++++++++- frontend/src/lib/i18n.tsx | 4 ++-- frontend/src/lib/rowColors.ts | 1 + frontend/wailsjs/go/models.ts | 4 ++++ 8 files changed, 50 insertions(+), 8 deletions(-) diff --git a/appearance.go b/appearance.go index 9262161..62990a2 100644 --- a/appearance.go +++ b/appearance.go @@ -33,8 +33,16 @@ type RowColorSettings struct { // behind it. The stripe says the same thing and costs nothing to read. Style string `json:"style"` // Intensity is the tint strength in percent. Only used by "tint"/"both". - Intensity int `json:"intensity"` - Rules []RowColorRule `json:"rules"` + Intensity int `json:"intensity"` + // BandMapLotw marks stations that upload to LoTW on the band map, with the + // same "L" badge the cluster list uses — one visual vocabulary across the two + // views rather than a second invention. + BandMapLotw bool `json:"bandmap_lotw"` + // Configured distinguishes "saved with this off" from "saved before the + // option existed", so a new marker can default ON without silently turning + // itself back on for an operator who switched it off. + Configured bool `json:"configured"` + Rules []RowColorRule `json:"rules"` } // The rule ids, in priority order. The frontend matches on these and holds the @@ -66,7 +74,13 @@ func normRowColors(s RowColorSettings) RowColorSettings { for _, r := range s.Rules { byID[r.ID] = r } - out := RowColorSettings{Enabled: s.Enabled, Style: s.Style, Intensity: s.Intensity} + out := RowColorSettings{ + Enabled: s.Enabled, Style: s.Style, Intensity: s.Intensity, + BandMapLotw: s.BandMapLotw, Configured: true, + } + if !s.Configured { + out.BandMapLotw = true // new option, on unless the operator says otherwise + } switch out.Style { case "bar", "tint", "both": default: diff --git a/changelog.json b/changelog.json index 1458abc..6d6ad46 100644 --- a/changelog.json +++ b/changelog.json @@ -4,11 +4,13 @@ "date": "", "en": [ "Appearance: row colouring now defaults to a left stripe, with a filled row and its strength offered as choices.", - "The band map now follows the cluster filters — LoTW only, spotter continent, hide worked, status and mode chips." + "The band map now follows the cluster filters — LoTW only, spotter continent, hide worked, status and mode chips.", + "Band map: stations that upload to LoTW now carry the same L badge as the cluster list, switchable in Appearance." ], "fr": [ "Apparence : la coloration des lignes se fait par défaut sur une barre à gauche, la ligne remplie et son intensité restant proposées.", - "La band map suit désormais les filtres du cluster — LoTW seulement, continent du spotter, masquer les contactés, statuts et modes." + "La band map suit désormais les filtres du cluster — LoTW seulement, continent du spotter, masquer les contactés, statuts et modes.", + "Band map : les stations qui utilisent LoTW portent le même badge L que la liste du cluster, activable dans Apparence." ] }, { diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index eb0b23c..debbf32 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -6800,6 +6800,7 @@ export default function App() { onClose={() => toggleBandMapBand(b)} hideDigital={bandMapHideFt} fitToBand={bandMapFit} + showLotw={!!rowColors?.bandmap_lotw} /> ))} diff --git a/frontend/src/components/AppearancePanel.tsx b/frontend/src/components/AppearancePanel.tsx index 94d0735..5f03bf1 100644 --- a/frontend/src/components/AppearancePanel.tsx +++ b/frontend/src/components/AppearancePanel.tsx @@ -57,6 +57,12 @@ export function AppearancePanel() { return (
+ +