fix issues

This commit is contained in:
2026-06-13 16:55:57 +02:00
parent 00cab6b204
commit d3ba7c71f4
5 changed files with 61 additions and 23 deletions
+15 -11
View File
@@ -1208,7 +1208,13 @@ export default function App() {
}
return out.replace(/\s+/g, ' ').trim();
}
function wkSend(rawText: string) { setWkSent(''); WinkeyerSend(resolveCW(rawText)).catch((e) => setError(String(e?.message ?? e))); }
function wkSend(rawText: string) {
setWkSent('');
WinkeyerSend(resolveCW(rawText)).catch((e) => setError(String(e?.message ?? e)));
// <LOGQSO> in a macro (e.g. "73 TU <LOGQSO>") logs the contact after sending.
// resolveCW already strips the token from the keyed text (unknown var → "").
if (/<LOGQSO>/i.test(rawText)) void save();
}
function wkSendMacro(i: number) { const m = wkMacros[i]; if (m) wkSend(m.text); }
wkSendMacroRef.current = wkSendMacro;
// send-on-type: key the typed chars verbatim (no variable substitution).
@@ -1298,6 +1304,7 @@ export default function App() {
const loggedDxcc = typeof payload.dxcc === 'number' ? payload.dxcc : 0;
await AddQSO(payload);
resetEntry();
callsignRef.current?.focus(); // return focus to the call field, wherever it was (e.g. Name)
await refresh();
// Refresh the Worked-before matrix so the just-logged band/mode flips to
// "worked" — resetEntry cleared it, so re-fetch for the logged call (a
@@ -1832,12 +1839,12 @@ export default function App() {
);
const rstTxBlock = (
<div className="flex flex-col w-20"><Label className="mb-1 h-3.5">RST tx</Label>
<Combobox value={rstSent} options={rstOptions(mode, rstLists)} onChange={(v) => { setRstSent(v); rstUserEditedRef.current = true; }} />
<Combobox value={rstSent} options={rstOptions(mode, rstLists)} allowFreeText commitOnType onChange={(v) => { setRstSent(v); rstUserEditedRef.current = true; }} />
</div>
);
const rstRxBlock = (
<div className="flex flex-col w-20"><Label className="mb-1 h-3.5">RST rx</Label>
<Combobox value={rstRcvd} options={rstOptions(mode, rstLists)} onChange={(v) => { setRstRcvd(v); rstUserEditedRef.current = true; }} />
<Combobox value={rstRcvd} options={rstOptions(mode, rstLists)} allowFreeText commitOnType onChange={(v) => { setRstRcvd(v); rstUserEditedRef.current = true; }} />
</div>
);
// Deferred-entry date: only shown when the start time is locked (back-entering
@@ -2372,17 +2379,14 @@ export default function App() {
{/* "You have been spotted" banner — shows when our own callsign appears
in a cluster spot (Log4OM-style). Floated as a bottom-center overlay
so it never shifts the layout (push-down / spring-back) and never
covers the entry fields; auto-hides 3s after the last self-spot. */}
in a cluster spot. Floated top-centre (with the other notifications),
never shifts the layout; auto-hides 3s after the last self-spot. */}
{!compact && selfSpot && (
<div className="fixed bottom-16 left-1/2 -translate-x-1/2 z-[100] flex items-center gap-2 rounded-lg border border-amber-300 bg-amber-100 text-amber-900 px-3.5 py-2 text-xs shadow-lg animate-in fade-in slide-in-from-bottom-2">
<div className="fixed top-12 left-1/2 -translate-x-1/2 z-[100] flex items-center gap-2 rounded-lg border border-amber-300 bg-amber-100 text-amber-900 px-3.5 py-2 text-xs shadow-lg animate-in fade-in slide-in-from-top-2">
<RadioTower className="size-3.5 shrink-0" />
<span>
You've been spotted by <strong className="font-mono">{selfSpot.spotter || '?'}</strong>
{' '}on <strong className="font-mono">{selfSpot.freqKHz?.toFixed(1)} kHz</strong>
{selfSpot.band ? ` (${selfSpot.band})` : ''}
{selfSpot.comment ? <span className="text-amber-800"> — {selfSpot.comment}</span> : null}
Spotted by <strong className="font-mono">{selfSpot.spotter || '?'}</strong>
{selfSpot.comment ? <span className="text-amber-800"> with {selfSpot.comment}</span> : null}
</span>
<div className="flex-1" />
<button className="text-amber-700 hover:text-amber-900" title="Dismiss" onClick={() => setSelfSpot(null)}>