feat(lists): a satellite list, offered on the entry form
SAT_NAME is compared character for character by the awards and by LoTW: AO-91 and AO91 are two different satellites to everything downstream, and typing it afresh on every pass is how one of them ends up in a log. So the station keeps its own list (Preferences → Lists → Satellites) and the field offers it, alphabetically — while still accepting anything typed, because a bird worked once and never added to the list must not be impossible to log. Not seeded with a shipped list of two dozen birds: an empty list means this station does not work satellites, and filling the dropdown with names nobody here has heard makes the field harder to use, not easier. Also fixes the RDA district comparison: its conflict list was capped at about six visible rows of a list holding up to two hundred, in a panel that would not scroll to show the rest, and nothing in it could be acted on. Taller, scrolling, and a callsign opens the contact.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { ComputeQSOAwardRefs, IsNewUSCounty } from '../../wailsjs/go/main/App';
|
||||
import { ComputeQSOAwardRefs, IsNewUSCounty, GetListsSettings } from '../../wailsjs/go/main/App';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from '@/components/ui/select';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useI18n } from '@/lib/i18n';
|
||||
import { Combobox } from '@/components/ui/combobox';
|
||||
import { pathBetween, pathBetweenLatLon, gridToLatLon } from '@/lib/maidenhead';
|
||||
import { BandSlotGrid } from '@/components/BandSlotGrid';
|
||||
import { AwardRefSelector } from '@/components/AwardRefSelector';
|
||||
@@ -153,6 +154,15 @@ function Field({ label, span = 1, className, children }: { label: string; span?:
|
||||
export function DetailsPanel({ callsign, prefix, operatorGrid, remoteGrid, qth, name, country, comment, note, details, onChange, wb, wbBusy, band, mode, bands, slotCall, slotBand, slotMode, slotWb, slotWbBusy, tab, onTab, keyerActive, onEditQso }: Props) {
|
||||
const { t } = useI18n();
|
||||
const [internalOpen, setInternalOpen] = useState<TabName>('stats');
|
||||
// The station's satellites, read once. Alphabetical because that is the only
|
||||
// order a list of birds has, and an operator hunting AO-91 in a list sorted
|
||||
// by when it was added is worse off than with a plain text box.
|
||||
const [satellites, setSatellites] = useState<string[]>([]);
|
||||
useEffect(() => {
|
||||
GetListsSettings()
|
||||
.then((l: any) => setSatellites([...((l?.satellites ?? []) as string[])].filter(Boolean).sort()))
|
||||
.catch(() => {});
|
||||
}, []);
|
||||
const open = tab ?? internalOpen; // controlled when `tab` is provided
|
||||
|
||||
// Live award detection: run the SAME engine used at log time over the current
|
||||
@@ -478,7 +488,18 @@ export function DetailsPanel({ callsign, prefix, operatorGrid, remoteGrid, qth,
|
||||
{satelliteMode && (
|
||||
<>
|
||||
<Field label={t('detp.satName')} span={3}>
|
||||
<Input value={details.sat_name} onChange={(e) => onChange({ sat_name: e.target.value })} />
|
||||
{/* The station's own satellites, in alphabetical order, with the
|
||||
box still open to anything typed: SAT_NAME is compared
|
||||
character for character by the awards and by LoTW, so a
|
||||
remembered spelling beats a fresh one every pass — but a bird
|
||||
worked once and never added to the list must not be
|
||||
impossible to log. */}
|
||||
<Combobox
|
||||
value={details.sat_name}
|
||||
options={satellites}
|
||||
placeholder={t('detp.satName')}
|
||||
onChange={(v) => onChange({ sat_name: v })}
|
||||
/>
|
||||
</Field>
|
||||
<Field label={t('detp.satelliteMode')} span={3}>
|
||||
<Input value={details.sat_mode} onChange={(e) => onChange({ sat_mode: e.target.value })} />
|
||||
|
||||
Reference in New Issue
Block a user