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 (
+ +