feat: adding choice for recent qso in main tab
This commit is contained in:
@@ -485,14 +485,16 @@ const MAIN_PANE_OPTIONS: { value: string; label: string }[] = [
|
||||
{ value: 'map2', label: 'Map — locator (street)' },
|
||||
{ value: 'cluster', label: 'Cluster spots' },
|
||||
{ value: 'worked', label: 'Worked before' },
|
||||
{ value: 'recent', label: 'Recent QSOs' },
|
||||
];
|
||||
function MainViewPanes({ onChanged, flexAvailable }: { onChanged?: (side: 'left' | 'right', value: string) => void; flexAvailable?: boolean }) {
|
||||
const [left, setLeft] = useState('map1');
|
||||
const [right, setRight] = useState('map2');
|
||||
// FlexRadio is only offered when the CAT backend is a Flex.
|
||||
const options = flexAvailable
|
||||
// FlexRadio is only offered when the CAT backend is a Flex. Sorted A→Z.
|
||||
const options = (flexAvailable
|
||||
? [...MAIN_PANE_OPTIONS, { value: 'flex', label: 'FlexRadio controls' }]
|
||||
: MAIN_PANE_OPTIONS;
|
||||
: [...MAIN_PANE_OPTIONS]
|
||||
).sort((a, b) => a.label.localeCompare(b.label));
|
||||
useEffect(() => {
|
||||
const valid = (v: string) => v === 'flex' || MAIN_PANE_OPTIONS.some((o) => o.value === v);
|
||||
Promise.all([GetUIPref('mainPaneLeft').catch(() => ''), GetUIPref('mainPaneRight').catch(() => '')])
|
||||
|
||||
Reference in New Issue
Block a user