This commit is contained in:
2026-05-30 01:56:57 +02:00
parent 806b39970b
commit 2eb77370e4
2 changed files with 21 additions and 19 deletions
+8 -14
View File
@@ -1370,12 +1370,6 @@ export default function App() {
{!lookupBusy && !lookupResult && lookupError && ( {!lookupBusy && !lookupResult && lookupError && (
<Badge variant="destructive" className="text-[9px] py-0 px-1.5 normal-case font-medium tracking-wider">{lookupError}</Badge> <Badge variant="destructive" className="text-[9px] py-0 px-1.5 normal-case font-medium tracking-wider">{lookupError}</Badge>
)} )}
{/* Contacted entity flag (from its DXCC number). */}
{flagURL(details.dxcc) && (
<img src={flagURL(details.dxcc)} alt="" title={country}
className="h-3.5 ml-auto rounded-[2px] border border-border/50 shadow-sm"
referrerPolicy="no-referrer" onError={(e) => { (e.currentTarget as HTMLImageElement).style.display = 'none'; }} />
)}
</Label> </Label>
<Input <Input
ref={callsignRef} ref={callsignRef}
@@ -1472,20 +1466,20 @@ export default function App() {
{/* DXCC # and Continent are derived from the callsign — read-only. {/* DXCC # and Continent are derived from the callsign — read-only.
CQ/ITU stay editable but as plain text (no number spinners). CQ/ITU stay editable but as plain text (no number spinners).
Kept compact (Log4OM-style) — just wide enough for their digits. */} Kept compact (Log4OM-style) — just wide enough for their digits. */}
<div className="flex flex-col w-11"><Label className="mb-1 h-3.5">DXCC</Label> <div className="flex flex-col w-9"><Label className="mb-1 h-3.5 text-[10px]">DXCC</Label>
<Input readOnly tabIndex={-1} className="font-mono bg-muted/40 cursor-default text-center px-1 text-xs" <Input readOnly tabIndex={-1} className="font-mono bg-muted/40 cursor-default text-center px-0.5 text-xs h-7"
value={details.dxcc ?? ''} placeholder="—" /> value={details.dxcc ?? ''} placeholder="—" />
</div> </div>
<div className="flex flex-col w-9"><Label className="mb-1 h-3.5">CQ</Label> <div className="flex flex-col w-7"><Label className="mb-1 h-3.5 text-[10px]">CQ</Label>
<Input inputMode="numeric" maxLength={2} className="font-mono text-center px-1 text-xs" value={details.cqz ?? ''} placeholder="—" <Input inputMode="numeric" maxLength={2} className="font-mono text-center px-0.5 text-xs h-7" value={details.cqz ?? ''} placeholder="—"
onChange={(e) => { const v = e.target.value.replace(/\D/g, ''); updateDetails({ cqz: v === '' ? undefined : parseInt(v, 10) }); }} /> onChange={(e) => { const v = e.target.value.replace(/\D/g, ''); updateDetails({ cqz: v === '' ? undefined : parseInt(v, 10) }); }} />
</div> </div>
<div className="flex flex-col w-9"><Label className="mb-1 h-3.5">ITU</Label> <div className="flex flex-col w-7"><Label className="mb-1 h-3.5 text-[10px]">ITU</Label>
<Input inputMode="numeric" maxLength={2} className="font-mono text-center px-1 text-xs" value={details.ituz ?? ''} placeholder="—" <Input inputMode="numeric" maxLength={2} className="font-mono text-center px-0.5 text-xs h-7" value={details.ituz ?? ''} placeholder="—"
onChange={(e) => { const v = e.target.value.replace(/\D/g, ''); updateDetails({ ituz: v === '' ? undefined : parseInt(v, 10) }); }} /> onChange={(e) => { const v = e.target.value.replace(/\D/g, ''); updateDetails({ ituz: v === '' ? undefined : parseInt(v, 10) }); }} />
</div> </div>
<div className="flex flex-col w-9"><Label className="mb-1 h-3.5">Cont</Label> <div className="flex flex-col w-8"><Label className="mb-1 h-3.5 text-[10px]">Cont</Label>
<Input readOnly tabIndex={-1} className="font-mono uppercase bg-muted/40 cursor-default text-center px-1 text-xs" <Input readOnly tabIndex={-1} className="font-mono uppercase bg-muted/40 cursor-default text-center px-0.5 text-xs h-7"
value={details.cont} placeholder="—" /> value={details.cont} placeholder="—" />
</div> </div>
</>} </>}
+13 -5
View File
@@ -60,6 +60,7 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode }: Props) {
const dxcc = wb?.dxcc ?? 0; const dxcc = wb?.dxcc ?? 0;
const dxccName = wb?.dxcc_name ?? ''; const dxccName = wb?.dxcc_name ?? '';
const dxccCount = wb?.dxcc_count ?? 0; const dxccCount = wb?.dxcc_count ?? 0;
const callCount = wb?.count ?? 0; // QSOs with this exact callsign
const hasDxcc = dxcc > 0; const hasDxcc = dxcc > 0;
const newOne = hasDxcc && dxccCount === 0; const newOne = hasDxcc && dxccCount === 0;
@@ -98,6 +99,13 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode }: Props) {
<span className="text-xs text-muted-foreground"> <span className="text-xs text-muted-foreground">
<strong className="text-foreground font-semibold">{dxccCount}</strong>{' '} <strong className="text-foreground font-semibold">{dxccCount}</strong>{' '}
QSO{dxccCount > 1 ? 's' : ''} with this entity QSO{dxccCount > 1 ? 's' : ''} with this entity
{callCount > 0 && (
<>
{' · '}
<strong className="text-foreground font-semibold">{callCount}</strong>{' '}
with this call
</>
)}
</span> </span>
</> </>
) : busy ? ( ) : busy ? (
@@ -112,15 +120,15 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode }: Props) {
)} )}
</div> </div>
<table className="border-separate" style={{ borderSpacing: 2 }}> <table className="border-separate" style={{ borderSpacing: 3 }}>
<thead> <thead>
<tr> <tr>
<th className="w-[22px]" /> <th className="w-[26px]" />
{BANDS.map((b) => ( {BANDS.map((b) => (
<th <th
key={b.tag} key={b.tag}
className={cn( className={cn(
'font-mono text-[10px] font-semibold px-1 text-center', 'font-mono text-[11px] font-semibold px-1 text-center',
b.tag === currentBand ? 'text-primary font-extrabold' : 'text-muted-foreground', b.tag === currentBand ? 'text-primary font-extrabold' : 'text-muted-foreground',
)} )}
> >
@@ -136,7 +144,7 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode }: Props) {
<tr key={cls}> <tr key={cls}>
<th <th
className={cn( className={cn(
'font-mono text-[10px] font-semibold pr-1.5 text-right w-[22px]', 'font-mono text-[11px] font-semibold pr-1.5 text-right w-[26px]',
classCurrent ? 'text-primary font-extrabold' : 'text-muted-foreground', classCurrent ? 'text-primary font-extrabold' : 'text-muted-foreground',
)} )}
> >
@@ -150,7 +158,7 @@ export function BandSlotGrid({ wb, busy, currentBand, currentMode }: Props) {
key={b.tag} key={b.tag}
title={cellTitle(b.tag, cls, st, isCurrent)} title={cellTitle(b.tag, cls, st, isCurrent)}
className={cn( className={cn(
'w-[22px] h-[18px] rounded transition-colors p-0', 'w-[28px] h-[24px] rounded transition-colors p-0',
st ? STATUS_CLASSES[st] : 'bg-stone-200 hover:bg-stone-300', st ? STATUS_CLASSES[st] : 'bg-stone-200 hover:bg-stone-300',
isCurrent && 'ring-2 ring-amber-500 ring-inset', isCurrent && 'ring-2 ring-amber-500 ring-inset',
)} )}