feat(cluster): quiet the worked spots, light up the empty slots
Two options that change what the eye is pulled towards, both applying to the cluster list AND the band map. Mute worked before: a spot that brings nothing new loses its colour and its badges. It stays in the list - the operator asked for less noise, not less information. "Brings nothing new" reuses the dimming rule the cluster list already had rather than inventing a second notion of done, so it keeps obeying the same-slot option and the digital-mode grouping for free. A new-band or new-slot status is NOT muted: having worked that callsign once on another band says nothing about the band in front of you. Highlight unworked in this slot: colours any callsign not yet worked on this band and this mode, whatever the entity says. For an operator filling slots a common entity on a fresh band+mode is the whole point, and the entity-level status flatly calls it worked. It reuses the existing new-slot status, so no new colour, no new legend, no new badge - both panels already knew how to draw it. WorkedSlot is computed independently of the same-slot preference: it is what this option reads, and it must not change meaning because a different option was toggled. The slot index is now built when either option needs it, and the status cache is keyed on both so a toggle invalidates it. The rules live in one module used by both panels. Marker colours already taught us what happens when the two derive the same thing separately.
This commit is contained in:
@@ -687,17 +687,17 @@ type App struct {
|
|||||||
liveFreqHz int64 // last freq/band/mode the UI reported (fallback when CAT is off)
|
liveFreqHz int64 // last freq/band/mode the UI reported (fallback when CAT is off)
|
||||||
liveBand string
|
liveBand string
|
||||||
liveMode string
|
liveMode string
|
||||||
livePublishTimer *time.Timer // debounced live-status publish on activity change
|
livePublishTimer *time.Timer // debounced live-status publish on activity change
|
||||||
liveLastQSOAt time.Time // when this operator last logged a NEW contact — drives online/offline
|
liveLastQSOAt time.Time // when this operator last logged a NEW contact — drives online/offline
|
||||||
liveTableMu sync.Mutex // guards liveTableFor
|
liveTableMu sync.Mutex // guards liveTableFor
|
||||||
liveTableFor *sql.DB // logbook whose live_status DDL has been ensured (once per connection, not per call)
|
liveTableFor *sql.DB // logbook whose live_status DDL has been ensured (once per connection, not per call)
|
||||||
awardSnapMu sync.Mutex // guards the award QSO snapshot
|
awardSnapMu sync.Mutex // guards the award QSO snapshot
|
||||||
awardSnap []qso.QSO // light-scanned + enriched logbook snapshot reused across award computations
|
awardSnap []qso.QSO // light-scanned + enriched logbook snapshot reused across award computations
|
||||||
awardSnapRev string // logbook revision the snapshot was built at ("" = none)
|
awardSnapRev string // logbook revision the snapshot was built at ("" = none)
|
||||||
awardSnapUsed time.Time // last read — the snapshot is dropped once it goes cold (see awardSnapshotJanitor)
|
awardSnapUsed time.Time // last read — the snapshot is dropped once it goes cold (see awardSnapshotJanitor)
|
||||||
webpub webPublisher // log-to-website publishing: debounce timer, periodic ticker, last result
|
webpub webPublisher // log-to-website publishing: debounce timer, periodic ticker, last result
|
||||||
bandOpen bandOpenState // sporadic-E / band-opening detector over the spot stream
|
bandOpen bandOpenState // sporadic-E / band-opening detector over the spot stream
|
||||||
dataDir string // <exeDir>/data — holds config.json, logs, cty.dat
|
dataDir string // <exeDir>/data — holds config.json, logs, cty.dat
|
||||||
|
|
||||||
// shuttingDown gates beforeClose re-entry: the first user attempt to
|
// shuttingDown gates beforeClose re-entry: the first user attempt to
|
||||||
// close fires shutdown tasks (backup, future LoTW upload, ...) while
|
// close fires shutdown tasks (backup, future LoTW upload, ...) while
|
||||||
@@ -2472,6 +2472,19 @@ func (a *App) groupDigitalSlots() bool {
|
|||||||
// Off (default) → a call worked on any band/mode reads as already worked. On →
|
// Off (default) → a call worked on any band/mode reads as already worked. On →
|
||||||
// the WORKED-call flag needs the same band and mode (digital-grouped when that
|
// the WORKED-call flag needs the same band and mode (digital-grouped when that
|
||||||
// option is also on).
|
// option is also on).
|
||||||
|
// clusterSlotHighlight reports the "colour the stations I have NOT worked on
|
||||||
|
// this band and mode" preference (Settings -> DX Cluster). It needs the same
|
||||||
|
// per-slot index as clusterWorkedSameSlot, which is why the index is built when
|
||||||
|
// EITHER is on: that map is one entry per worked call+band+mode, so on a large
|
||||||
|
// log it is not something to hold for an operator using neither.
|
||||||
|
func (a *App) clusterSlotHighlight() bool {
|
||||||
|
if a.settings == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
v, _ := a.settings.Get(a.ctx, "ui.opslog.clusterSlotHighlight")
|
||||||
|
return v == "1"
|
||||||
|
}
|
||||||
|
|
||||||
func (a *App) clusterWorkedSameSlot() bool {
|
func (a *App) clusterWorkedSameSlot() bool {
|
||||||
if a.settings == nil {
|
if a.settings == nil {
|
||||||
return false
|
return false
|
||||||
@@ -16388,6 +16401,12 @@ type SpotStatus struct {
|
|||||||
// scanning the cluster for.
|
// scanning the cluster for.
|
||||||
NewPfx bool `json:"new_pfx"`
|
NewPfx bool `json:"new_pfx"`
|
||||||
Pfx string `json:"pfx,omitempty"`
|
Pfx string `json:"pfx,omitempty"`
|
||||||
|
// WorkedSlot: this exact callsign already worked on THIS band and mode.
|
||||||
|
// Distinct from WorkedCall, which follows the "same slot" preference and so
|
||||||
|
// means different things depending on it. This one is always slot-scoped, so
|
||||||
|
// the UI can highlight what is still to be worked here without the two
|
||||||
|
// options having to agree. Only filled when the slot index is built.
|
||||||
|
WorkedSlot bool `json:"worked_slot"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// clusterStatusCache holds the whole-logbook maps ClusterSpotStatuses colours
|
// clusterStatusCache holds the whole-logbook maps ClusterSpotStatuses colours
|
||||||
@@ -16406,6 +16425,7 @@ type clusterStatusCache struct {
|
|||||||
normMode func(string) string // nil unless digital-mode grouping is on
|
normMode func(string) string // nil unless digital-mode grouping is on
|
||||||
groupDigital bool // settings the maps were built under —
|
groupDigital bool // settings the maps were built under —
|
||||||
sameSlot bool // a change rebuilds the snapshot
|
sameSlot bool // a change rebuilds the snapshot
|
||||||
|
slotHighlight bool // (same: the slot index is built for either)
|
||||||
}
|
}
|
||||||
|
|
||||||
// clusterStatusMaps returns the cached worked-index snapshot, building it once
|
// clusterStatusMaps returns the cached worked-index snapshot, building it once
|
||||||
@@ -16415,12 +16435,13 @@ type clusterStatusCache struct {
|
|||||||
func (a *App) clusterStatusMaps() *clusterStatusCache {
|
func (a *App) clusterStatusMaps() *clusterStatusCache {
|
||||||
groupDigital := a.groupDigitalSlots()
|
groupDigital := a.groupDigitalSlots()
|
||||||
sameSlot := a.clusterWorkedSameSlot()
|
sameSlot := a.clusterWorkedSameSlot()
|
||||||
|
slotHighlight := a.clusterSlotHighlight()
|
||||||
a.clusterStatusMu.Lock()
|
a.clusterStatusMu.Lock()
|
||||||
defer a.clusterStatusMu.Unlock()
|
defer a.clusterStatusMu.Unlock()
|
||||||
if c := a.clusterStatusIdx; c != nil && c.groupDigital == groupDigital && c.sameSlot == sameSlot {
|
if c := a.clusterStatusIdx; c != nil && c.groupDigital == groupDigital && c.sameSlot == sameSlot && c.slotHighlight == slotHighlight {
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
c := &clusterStatusCache{groupDigital: groupDigital, sameSlot: sameSlot}
|
c := &clusterStatusCache{groupDigital: groupDigital, sameSlot: sameSlot, slotHighlight: slotHighlight}
|
||||||
if a.qso == nil {
|
if a.qso == nil {
|
||||||
a.clusterStatusIdx = c
|
a.clusterStatusIdx = c
|
||||||
return c
|
return c
|
||||||
@@ -16460,7 +16481,7 @@ func (a *App) clusterStatusMaps() *clusterStatusCache {
|
|||||||
// "Already worked only on the same slot" option (Settings → DX Cluster): the
|
// "Already worked only on the same slot" option (Settings → DX Cluster): the
|
||||||
// WORKED-call flag then needs the SAME band and mode (digital-grouped through
|
// WORKED-call flag then needs the SAME band and mode (digital-grouped through
|
||||||
// the same normMode when that option is on) rather than the call anywhere.
|
// the same normMode when that option is on) rather than the call anywhere.
|
||||||
if sameSlot {
|
if sameSlot || slotHighlight {
|
||||||
c.workedCallSlots, _ = a.qso.WorkedCallSlotKeys(a.ctx, c.normMode)
|
c.workedCallSlots, _ = a.qso.WorkedCallSlotKeys(a.ctx, c.normMode)
|
||||||
}
|
}
|
||||||
// Orthogonal dimensions: worked US counties (for the ULS callsign→county
|
// Orthogonal dimensions: worked US counties (for the ULS callsign→county
|
||||||
@@ -16510,6 +16531,21 @@ func (a *App) ClusterSpotStatuses(spots []SpotQuery) []SpotStatus {
|
|||||||
Band: strings.ToLower(q.Band),
|
Band: strings.ToLower(q.Band),
|
||||||
Mode: strings.ToUpper(q.Mode),
|
Mode: strings.ToUpper(q.Mode),
|
||||||
}
|
}
|
||||||
|
// Slot-scoped worked flag, independent of the sameSlot preference: it is
|
||||||
|
// what "highlight what I have NOT worked here" reads, and that must not
|
||||||
|
// change meaning because a different option was toggled.
|
||||||
|
if workedCallSlots != nil {
|
||||||
|
upCall := strings.ToUpper(q.Call)
|
||||||
|
cm := out[i].Mode
|
||||||
|
if normMode != nil && cm != "" {
|
||||||
|
cm = normMode(cm)
|
||||||
|
}
|
||||||
|
if cm == "" {
|
||||||
|
_, out[i].WorkedSlot = workedCallSlots[upCall+"|"+out[i].Band]
|
||||||
|
} else {
|
||||||
|
_, out[i].WorkedSlot = workedCallSlots[upCall+"|"+out[i].Band+"|"+cm]
|
||||||
|
}
|
||||||
|
}
|
||||||
if sameSlot {
|
if sameSlot {
|
||||||
// Already worked ONLY when this exact band+mode slot was worked. With no
|
// Already worked ONLY when this exact band+mode slot was worked. With no
|
||||||
// inferable mode, fall back to same-band (better than claiming the whole
|
// inferable mode, fall back to same-band (better than claiming the whole
|
||||||
|
|||||||
+4
-2
@@ -3,10 +3,12 @@
|
|||||||
"version": "0.24.3",
|
"version": "0.24.3",
|
||||||
"date": "",
|
"date": "",
|
||||||
"en": [
|
"en": [
|
||||||
"Band openings: OpsLog now tells you when 6, 4 or 2 m opens. It watches the spots already arriving from your clusters and RBN — several different stations appearing at single-hop range (500–2400 km) in the same bearing sector within a few minutes is the signature of sporadic E, and nothing else looks like it. You get one message per band per opening, naming the sector and the typical distance. An opening outside the usual season is still announced, and flagged as unusual: those are the ones worth knowing about. Nothing to configure — but the quality depends on having a cluster or RBN feed carrying VHF spots, and 2 m openings are often worked without ever being spotted."
|
"Band openings: OpsLog now tells you when 6, 4 or 2 m opens. It watches the spots already arriving from your clusters and RBN — several different stations appearing at single-hop range (500–2400 km) in the same bearing sector within a few minutes is the signature of sporadic E, and nothing else looks like it. You get one message per band per opening, naming the sector and the typical distance. An opening outside the usual season is still announced, and flagged as unusual: those are the ones worth knowing about. Nothing to configure — but the quality depends on having a cluster or RBN feed carrying VHF spots, and 2 m openings are often worked without ever being spotted.",
|
||||||
|
"DX cluster, two display options (Settings › DX cluster). The first drops the colour and the badges on stations you have already worked: they stay in the list, they simply stop competing for your attention. The second colours every callsign you have not worked on this band and this mode, even when the entity itself is long since confirmed — the view for filling slots rather than chasing new ones. Both apply to the cluster list and to the band map, so the two panels always agree."
|
||||||
],
|
],
|
||||||
"fr": [
|
"fr": [
|
||||||
"Ouvertures de bande : OpsLog te signale désormais l ouverture du 6, du 4 ou du 2 m. Il surveille les spots qui arrivent déjà de tes clusters et du RBN — plusieurs stations différentes apparaissant à distance de saut simple (500–2400 km) dans le même secteur d azimut en quelques minutes, c est la signature de l Es, et rien d autre n y ressemble. Un message par bande et par ouverture, avec le secteur et la distance typique. Une ouverture hors saison est annoncée quand même, et signalée comme inhabituelle : ce sont celles qu il ne faut surtout pas manquer. Rien à configurer — mais la qualité dépend d avoir un flux cluster ou RBN qui porte des spots VHF, et les ouvertures 2 m sont souvent travaillées sans jamais être spottées."
|
"Ouvertures de bande : OpsLog te signale désormais l ouverture du 6, du 4 ou du 2 m. Il surveille les spots qui arrivent déjà de tes clusters et du RBN — plusieurs stations différentes apparaissant à distance de saut simple (500–2400 km) dans le même secteur d azimut en quelques minutes, c est la signature de l Es, et rien d autre n y ressemble. Un message par bande et par ouverture, avec le secteur et la distance typique. Une ouverture hors saison est annoncée quand même, et signalée comme inhabituelle : ce sont celles qu il ne faut surtout pas manquer. Rien à configurer — mais la qualité dépend d avoir un flux cluster ou RBN qui porte des spots VHF, et les ouvertures 2 m sont souvent travaillées sans jamais être spottées.",
|
||||||
|
"Cluster DX, deux options d affichage (Paramètres › Cluster DX). La première enlève la couleur et les badges sur les stations déjà contactées : elles restent dans la liste, elles cessent simplement d attirer l œil. La seconde colore tout indicatif non contacté sur cette bande et ce mode, même si l entité est confirmée depuis longtemps — la vue pour remplir des slots plutôt que pour chasser du nouveau. Les deux s appliquent à la liste cluster et au bandmap, les deux panneaux restent donc cohérents."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { cn } from '@/lib/utils';
|
|||||||
import { useI18n } from '@/lib/i18n';
|
import { useI18n } from '@/lib/i18n';
|
||||||
import { spotStatusKey, inferSpotMode, spotModeCategory } from '@/lib/spot';
|
import { spotStatusKey, inferSpotMode, spotModeCategory } from '@/lib/spot';
|
||||||
import { SPOT_MARKERS, activeMarkers } from '@/lib/spotMarkers';
|
import { SPOT_MARKERS, activeMarkers } from '@/lib/spotMarkers';
|
||||||
|
import { applySpotDisplay, readSpotDisplayOptions } from '@/lib/spotDisplay';
|
||||||
|
|
||||||
// BandMap — vertical spectrum panel inspired by Log4OM.
|
// BandMap — vertical spectrum panel inspired by Log4OM.
|
||||||
// - Full band is always visible; zoom changes pixels-per-kHz, scroll
|
// - Full band is always visible; zoom changes pixels-per-kHz, scroll
|
||||||
@@ -32,6 +33,8 @@ type SpotStatusEntry = {
|
|||||||
status?: string;
|
status?: string;
|
||||||
country?: string;
|
country?: string;
|
||||||
worked_call?: boolean;
|
worked_call?: boolean;
|
||||||
|
// worked_slot: this exact callsign already worked on THIS band and mode.
|
||||||
|
worked_slot?: boolean;
|
||||||
new_county?: boolean;
|
new_county?: boolean;
|
||||||
new_pota?: boolean;
|
new_pota?: boolean;
|
||||||
new_pfx?: boolean;
|
new_pfx?: boolean;
|
||||||
@@ -213,8 +216,21 @@ const BOT_PAD = 14; // the top-most freq label isn't clipped at y=0
|
|||||||
// last; ties broken by closeness to the rig freq).
|
// last; ties broken by closeness to the rig freq).
|
||||||
const MAX_VISIBLE_SPOTS = 30;
|
const MAX_VISIBLE_SPOTS = 30;
|
||||||
|
|
||||||
export function BandMap({ band, spots, spotStatus, 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 }: Props) {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
// The two display options are applied ONCE here, on the whole map, so the
|
||||||
|
// leader lines, the dots, the pills and the badges can never disagree — and so
|
||||||
|
// the map and the cluster list share the single rule set in lib/spotDisplay.
|
||||||
|
// Re-derived whenever the poll delivers a new status map, which is also when a
|
||||||
|
// just-changed option takes effect.
|
||||||
|
const spotStatus = useMemo(() => {
|
||||||
|
const o = readSpotDisplayOptions();
|
||||||
|
if (!o.muteWorked && !o.slotHighlight) return spotStatusRaw;
|
||||||
|
const out: Record<string, SpotStatusEntry> = {};
|
||||||
|
for (const k of Object.keys(spotStatusRaw)) out[k] = applySpotDisplay(spotStatusRaw[k], o) as SpotStatusEntry;
|
||||||
|
return out;
|
||||||
|
}, [spotStatusRaw]);
|
||||||
const range = BAND_RANGES[band];
|
const range = BAND_RANGES[band];
|
||||||
const segments = SEGMENT_COLORS[band] ?? [];
|
const segments = SEGMENT_COLORS[band] ?? [];
|
||||||
const [zoomIdx, setZoomIdx] = useState(2); // default 32 px/kHz
|
const [zoomIdx, setZoomIdx] = useState(2); // default 32 px/kHz
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { Button } from '@/components/ui/button';
|
|||||||
import { Checkbox } from '@/components/ui/checkbox';
|
import { Checkbox } from '@/components/ui/checkbox';
|
||||||
import { cleanSpotter, inferSpotMode, spotStatusKey } from '@/lib/spot';
|
import { cleanSpotter, inferSpotMode, spotStatusKey } from '@/lib/spot';
|
||||||
import { markerColour } from '@/lib/spotMarkers';
|
import { markerColour } from '@/lib/spotMarkers';
|
||||||
|
import { applySpotDisplay, readSpotDisplayOptions } from '@/lib/spotDisplay';
|
||||||
import { loadLocal, loadRemote, saveState, seedLocal, whenGridPrefsReady } from '@/lib/gridPrefs';
|
import { loadLocal, loadRemote, saveState, seedLocal, whenGridPrefsReady } from '@/lib/gridPrefs';
|
||||||
import { useI18n } from '@/lib/i18n';
|
import { useI18n } from '@/lib/i18n';
|
||||||
|
|
||||||
@@ -52,6 +53,9 @@ export type SpotStatusEntry = {
|
|||||||
country?: string;
|
country?: string;
|
||||||
continent?: string;
|
continent?: string;
|
||||||
worked_call?: boolean;
|
worked_call?: boolean;
|
||||||
|
// worked_slot: this exact callsign already worked on THIS band and mode.
|
||||||
|
// Always slot-scoped, unlike worked_call which follows the "same slot" option.
|
||||||
|
worked_slot?: boolean;
|
||||||
new_county?: boolean;
|
new_county?: boolean;
|
||||||
new_pota?: boolean;
|
new_pota?: boolean;
|
||||||
new_pfx?: boolean;
|
new_pfx?: boolean;
|
||||||
@@ -97,9 +101,13 @@ type ColEntry = ColDef<ClusterSpot> & { group: string; label: string; defaultVis
|
|||||||
// statusFor resolves the precomputed spot status (new / new-band / new-slot /
|
// statusFor resolves the precomputed spot status (new / new-band / new-slot /
|
||||||
// worked-call) for an ag-Grid cell's row.
|
// worked-call) for an ag-Grid cell's row.
|
||||||
function statusFor(p: any): SpotStatusEntry | undefined {
|
function statusFor(p: any): SpotStatusEntry | undefined {
|
||||||
return p?.context?.spotStatus?.[
|
const s = p?.context?.spotStatus?.[
|
||||||
spotStatusKey(p.data?.dx_call, p.data?.band ?? '', p.data?.comment ?? '', p.data?.freq_hz)
|
spotStatusKey(p.data?.dx_call, p.data?.band ?? '', p.data?.comment ?? '', p.data?.freq_hz)
|
||||||
];
|
];
|
||||||
|
// One chokepoint: the colour, the badges and the Status text all read through
|
||||||
|
// here, so the two display options are applied once rather than in each
|
||||||
|
// renderer — and the band map applies the very same function.
|
||||||
|
return applySpotDisplay(s, readSpotDisplayOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spot status is shown by COLOURING THE TEXT, never by a pill or a badge.
|
// Spot status is shown by COLOURING THE TEXT, never by a pill or a badge.
|
||||||
|
|||||||
@@ -1347,6 +1347,8 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
const [lookupOnBlur, setLookupOnBlur] = useState(() => localStorage.getItem('opslog.lookupOnBlur') === '1');
|
const [lookupOnBlur, setLookupOnBlur] = useState(() => localStorage.getItem('opslog.lookupOnBlur') === '1');
|
||||||
const [groupDigital, setGroupDigital] = useState(() => localStorage.getItem('opslog.groupDigitalSlots') === '1');
|
const [groupDigital, setGroupDigital] = useState(() => localStorage.getItem('opslog.groupDigitalSlots') === '1');
|
||||||
const [clusterWorkedSameSlot, setClusterWorkedSameSlot] = useState(() => localStorage.getItem('opslog.clusterWorkedSameSlot') === '1');
|
const [clusterWorkedSameSlot, setClusterWorkedSameSlot] = useState(() => localStorage.getItem('opslog.clusterWorkedSameSlot') === '1');
|
||||||
|
const [clusterMuteWorked, setClusterMuteWorked] = useState(() => localStorage.getItem('opslog.clusterMuteWorked') === '1');
|
||||||
|
const [clusterSlotHighlight, setClusterSlotHighlight] = useState(() => localStorage.getItem('opslog.clusterSlotHighlight') === '1');
|
||||||
const [showQsoRate, setShowQsoRate] = useState(() => localStorage.getItem('opslog.showQsoRate') === '1');
|
const [showQsoRate, setShowQsoRate] = useState(() => localStorage.getItem('opslog.showQsoRate') === '1');
|
||||||
const [catModeBeforeFreq, setCatModeBeforeFreq] = useState(() => localStorage.getItem('opslog.catModeBeforeFreq') === '1');
|
const [catModeBeforeFreq, setCatModeBeforeFreq] = useState(() => localStorage.getItem('opslog.catModeBeforeFreq') === '1');
|
||||||
// Password-encryption (secret vault) state.
|
// Password-encryption (secret vault) state.
|
||||||
@@ -4137,6 +4139,18 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
onCheckedChange={(c) => { const v = !!c; setClusterWorkedSameSlot(v); writeUiPref('opslog.clusterWorkedSameSlot', v ? '1' : '0'); }} />
|
onCheckedChange={(c) => { const v = !!c; setClusterWorkedSameSlot(v); writeUiPref('opslog.clusterWorkedSameSlot', v ? '1' : '0'); }} />
|
||||||
<span>{t('clu.workedSameSlot')} <span className="text-xs text-muted-foreground">{t('clu.workedSameSlotHint')}</span></span>
|
<span>{t('clu.workedSameSlot')} <span className="text-xs text-muted-foreground">{t('clu.workedSameSlotHint')}</span></span>
|
||||||
</label>
|
</label>
|
||||||
|
{/* Two ways to cut through a busy cluster, and they compose: mute what
|
||||||
|
is done, light up what is not. */}
|
||||||
|
<label className="flex items-start gap-2 text-sm cursor-pointer">
|
||||||
|
<Checkbox checked={clusterMuteWorked} className="mt-0.5"
|
||||||
|
onCheckedChange={(c) => { const v = !!c; setClusterMuteWorked(v); writeUiPref('opslog.clusterMuteWorked', v ? '1' : '0'); }} />
|
||||||
|
<span>{t('clu.muteWorked')} <span className="text-xs text-muted-foreground">{t('clu.muteWorkedHint')}</span></span>
|
||||||
|
</label>
|
||||||
|
<label className="flex items-start gap-2 text-sm cursor-pointer">
|
||||||
|
<Checkbox checked={clusterSlotHighlight} className="mt-0.5"
|
||||||
|
onCheckedChange={(c) => { const v = !!c; setClusterSlotHighlight(v); writeUiPref('opslog.clusterSlotHighlight', v ? '1' : '0'); }} />
|
||||||
|
<span>{t('clu.slotHighlight')} <span className="text-xs text-muted-foreground">{t('clu.slotHighlightHint')}</span></span>
|
||||||
|
</label>
|
||||||
|
|
||||||
{/* Self-spot. The interval only shows once it's on — an interval for
|
{/* Self-spot. The interval only shows once it's on — an interval for
|
||||||
something switched off is just a question the operator can't act on. */}
|
something switched off is just a question the operator can't act on. */}
|
||||||
|
|||||||
@@ -266,6 +266,10 @@ const en: Dict = {
|
|||||||
'clu.selfSpot': 'Self-spot while I log', 'clu.selfSpotEvery': 'at most every', 'clu.selfSpotMinutes': 'min',
|
'clu.selfSpot': 'Self-spot while I log', 'clu.selfSpotEvery': 'at most every', 'clu.selfSpotMinutes': 'min',
|
||||||
'clu.selfSpotHint': 'Announces YOU on the master cluster when you log a QSO — the spot carries your station callsign and the frequency you just worked on, so callers find you without waiting for someone else to spot you. Sent on the first QSO of a frequency, then no more often than the gap below. Five minutes is the floor: a self-spot is traffic every user of the node sees.',
|
'clu.selfSpotHint': 'Announces YOU on the master cluster when you log a QSO — the spot carries your station callsign and the frequency you just worked on, so callers find you without waiting for someone else to spot you. Sent on the first QSO of a frequency, then no more often than the gap below. Five minutes is the floor: a self-spot is traffic every user of the node sees.',
|
||||||
'clu.freeNodes': 'Free public nodes:',
|
'clu.freeNodes': 'Free public nodes:',
|
||||||
|
'clu.muteWorked': 'No colour or badge on stations already worked',
|
||||||
|
'clu.muteWorkedHint': '(they stay in the list, just quiet — leaves the colour for what is left to do)',
|
||||||
|
'clu.slotHighlight': 'Colour the stations not worked on this band and mode',
|
||||||
|
'clu.slotHighlightHint': '(by callsign, whatever the entity status says)',
|
||||||
'clu.workedSameSlot': 'Already worked only on the same slot',
|
'clu.workedSameSlot': 'Already worked only on the same slot',
|
||||||
'clu.workedSameSlotHint': '— a spot shows "worked" only if you worked that call on the SAME band and mode, not just anywhere. Combines with digital-mode grouping (Settings → General): with it on, a call worked on 20m FT8 also counts as worked for a 20m FT4 spot; with it off, FT8 and FT4 are separate slots.',
|
'clu.workedSameSlotHint': '— a spot shows "worked" only if you worked that call on the SAME band and mode, not just anywhere. Combines with digital-mode grouping (Settings → General): with it on, a call worked on 20m FT8 also counts as worked for a 20m FT4 spot; with it off, FT8 and FT4 are separate slots.',
|
||||||
// Backup panel
|
// Backup panel
|
||||||
@@ -682,6 +686,10 @@ const fr: Dict = {
|
|||||||
'clu.selfSpot': "M'auto-spotter quand j'enregistre", 'clu.selfSpotEvery': 'au plus toutes les', 'clu.selfSpotMinutes': 'min',
|
'clu.selfSpot': "M'auto-spotter quand j'enregistre", 'clu.selfSpotEvery': 'au plus toutes les', 'clu.selfSpotMinutes': 'min',
|
||||||
'clu.selfSpotHint': "Annonce TON indicatif sur le cluster maître quand tu enregistres un QSO — le spot porte l'indicatif de station et la fréquence que tu viens de travailler, pour qu'on te trouve sans attendre que quelqu'un te spotte. Envoyé au premier QSO d'une fréquence, puis pas plus souvent que l'intervalle ci-dessous. Cinq minutes est le plancher : un auto-spot est du trafic que voient tous les utilisateurs du nœud.",
|
'clu.selfSpotHint': "Annonce TON indicatif sur le cluster maître quand tu enregistres un QSO — le spot porte l'indicatif de station et la fréquence que tu viens de travailler, pour qu'on te trouve sans attendre que quelqu'un te spotte. Envoyé au premier QSO d'une fréquence, puis pas plus souvent que l'intervalle ci-dessous. Cinq minutes est le plancher : un auto-spot est du trafic que voient tous les utilisateurs du nœud.",
|
||||||
'clu.freeNodes': 'Nœuds publics gratuits :',
|
'clu.freeNodes': 'Nœuds publics gratuits :',
|
||||||
|
'clu.muteWorked': 'Aucune couleur ni badge sur les stations déjà contactées',
|
||||||
|
'clu.muteWorkedHint': '(elles restent dans la liste, simplement discrètes — la couleur reste pour ce qui est à faire)',
|
||||||
|
'clu.slotHighlight': 'Colorer les stations non contactées sur cette bande et ce mode',
|
||||||
|
'clu.slotHighlightHint': "(par indicatif, quel que soit le statut de l'entité)",
|
||||||
'clu.workedSameSlot': 'Déjà contacté seulement sur le même slot',
|
'clu.workedSameSlot': 'Déjà contacté seulement sur le même slot',
|
||||||
'clu.workedSameSlotHint': '— un spot n\'affiche « contacté » que si vous avez contacté cet indicatif sur la MÊME bande et le MÊME mode, pas juste n\'importe où. Se combine avec le groupage des modes numériques (Réglages → Général) : activé, un indicatif contacté en 20m FT8 compte aussi comme contacté pour un spot 20m FT4 ; désactivé, FT8 et FT4 sont des slots distincts.',
|
'clu.workedSameSlotHint': '— un spot n\'affiche « contacté » que si vous avez contacté cet indicatif sur la MÊME bande et le MÊME mode, pas juste n\'importe où. Se combine avec le groupage des modes numériques (Réglages → Général) : activé, un indicatif contacté en 20m FT8 compte aussi comme contacté pour un spot 20m FT4 ; désactivé, FT8 et FT4 sont des slots distincts.',
|
||||||
'bk.hintMysql': "À la fermeture (1×/jour) OpsLog sauvegarde le SQLite local (config) ET exporte le log MySQL partagé en ADIF — opslog-log-<date>.adi — pour protéger tes contacts même s'ils sont sur le serveur. La rotation garde les N derniers de chaque.",
|
'bk.hintMysql': "À la fermeture (1×/jour) OpsLog sauvegarde le SQLite local (config) ET exporte le log MySQL partagé en ADIF — opslog-log-<date>.adi — pour protéger tes contacts même s'ils sont sur le serveur. La rotation garde les N derniers de chaque.",
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
// Two operator options that change how a spot LOOKS, shared by the DX-cluster
|
||||||
|
// list and the band map so the two panels can never disagree about the same
|
||||||
|
// spot — the lesson already learnt with the marker colours.
|
||||||
|
//
|
||||||
|
// muteWorked — a station already worked gets no colour and no badge. It
|
||||||
|
// stays in the list, it simply stops competing for attention.
|
||||||
|
// slotHighlight — a callsign not yet worked on THIS band and mode is coloured,
|
||||||
|
// whatever the entity says. For an operator filling slots, a
|
||||||
|
// common entity on a new band+mode is the whole point, and the
|
||||||
|
// entity-level status calls it "worked".
|
||||||
|
//
|
||||||
|
// They compose deliberately: mute what is done, light up what is not.
|
||||||
|
|
||||||
|
export type SpotDisplayOptions = { muteWorked: boolean; slotHighlight: boolean };
|
||||||
|
|
||||||
|
export function readSpotDisplayOptions(): SpotDisplayOptions {
|
||||||
|
try {
|
||||||
|
return {
|
||||||
|
muteWorked: localStorage.getItem('opslog.clusterMuteWorked') === '1',
|
||||||
|
slotHighlight: localStorage.getItem('opslog.clusterSlotHighlight') === '1',
|
||||||
|
};
|
||||||
|
} catch {
|
||||||
|
return { muteWorked: false, slotHighlight: false };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type Entry = {
|
||||||
|
status?: string;
|
||||||
|
worked_call?: boolean;
|
||||||
|
worked_slot?: boolean;
|
||||||
|
new_county?: boolean;
|
||||||
|
new_pota?: boolean;
|
||||||
|
new_pfx?: boolean;
|
||||||
|
} | undefined;
|
||||||
|
|
||||||
|
// bringsNothingNew: the entity is resolved and worked, and no other dimension
|
||||||
|
// (county, park, prefix) is new. Same test the cluster list already used to dim
|
||||||
|
// a row — muting reuses it rather than inventing a second notion of "done".
|
||||||
|
//
|
||||||
|
// Note what is NOT muted: a status of new-band / new-slot survives, because
|
||||||
|
// having worked that callsign once on another band says nothing about the band
|
||||||
|
// in front of you.
|
||||||
|
function bringsNothingNew(s: Entry): boolean {
|
||||||
|
if (!s || !s.status) return false; // unresolved — never hide, it would flicker
|
||||||
|
if (s.status === 'new' || s.status === 'new-band' || s.status === 'new-mode' || s.status === 'new-slot') return false;
|
||||||
|
return !(s.new_pota || s.new_county || s.new_pfx);
|
||||||
|
}
|
||||||
|
|
||||||
|
// applySpotDisplay rewrites a status entry per the options, so every consumer —
|
||||||
|
// colour, badge, status text — follows from one decision instead of each panel
|
||||||
|
// re-deriving it.
|
||||||
|
export function applySpotDisplay<T extends Entry>(s: T, o: SpotDisplayOptions): T {
|
||||||
|
if (!s) return s;
|
||||||
|
if (o.muteWorked && bringsNothingNew(s)) {
|
||||||
|
// Strip everything that paints: the row keeps its data, loses its emphasis.
|
||||||
|
return { ...s, status: '', worked_call: false } as T;
|
||||||
|
}
|
||||||
|
if (o.slotHighlight && s.worked_slot === false) {
|
||||||
|
// Not worked on this band+mode. If the entity check found nothing new, say
|
||||||
|
// so with the slot status rather than leaving the spot colourless — that is
|
||||||
|
// exactly the row this option exists to surface.
|
||||||
|
if (!s.status || s.status === 'worked') return { ...s, status: 'new-slot' } as T;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
@@ -39,6 +39,8 @@ const PORTABLE_KEYS = [
|
|||||||
'opslog.clusterModeFilter', 'opslog.clusterSearch', 'opslog.clusterHideWorked',
|
'opslog.clusterModeFilter', 'opslog.clusterSearch', 'opslog.clusterHideWorked',
|
||||||
'opslog.activeTab', // last selected tab
|
'opslog.activeTab', // last selected tab
|
||||||
'opslog.mainSplit', // Main tab: width share of the left pane (percent)
|
'opslog.mainSplit', // Main tab: width share of the left pane (percent)
|
||||||
|
'opslog.clusterMuteWorked', // cluster/band map: no colour or badge on worked spots
|
||||||
|
'opslog.clusterSlotHighlight', // cluster/band map: colour calls not worked on this band+mode
|
||||||
'opslog.bandMapWidth', // docked band map: column width (px)
|
'opslog.bandMapWidth', // docked band map: column width (px)
|
||||||
'opslog.bandMapTabWidth', // Band map tab: shared card width (px)
|
'opslog.bandMapTabWidth', // Band map tab: shared card width (px)
|
||||||
// NOTE: 'hamlog.awardColsShown' and the grid column layouts are NOT listed here.
|
// NOTE: 'hamlog.awardColsShown' and the grid column layouts are NOT listed here.
|
||||||
|
|||||||
@@ -3012,6 +3012,7 @@ export namespace main {
|
|||||||
new_pota: boolean;
|
new_pota: boolean;
|
||||||
new_pfx: boolean;
|
new_pfx: boolean;
|
||||||
pfx?: string;
|
pfx?: string;
|
||||||
|
worked_slot: boolean;
|
||||||
|
|
||||||
static createFrom(source: any = {}) {
|
static createFrom(source: any = {}) {
|
||||||
return new SpotStatus(source);
|
return new SpotStatus(source);
|
||||||
@@ -3030,6 +3031,7 @@ export namespace main {
|
|||||||
this.new_pota = source["new_pota"];
|
this.new_pota = source["new_pota"];
|
||||||
this.new_pfx = source["new_pfx"];
|
this.new_pfx = source["new_pfx"];
|
||||||
this.pfx = source["pfx"];
|
this.pfx = source["pfx"];
|
||||||
|
this.worked_slot = source["worked_slot"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class StartupStatus {
|
export class StartupStatus {
|
||||||
|
|||||||
Reference in New Issue
Block a user