fix: increase width for edit qso window in French to avoid scroll bar

This commit is contained in:
2026-07-09 12:10:16 +02:00
parent 521f8266cf
commit 6ee31ae45d
3 changed files with 18 additions and 7 deletions
+7 -2
View File
@@ -4397,9 +4397,14 @@ export default function App() {
onClose={() => setShowSpotModal(false)}
// Callsign: the QSO-entry call, else the last logged QSO.
defaultCall={callsign.trim() || qsos[0]?.callsign || ''}
// Freq: the entry TX freq (kHz), else the last logged QSO's.
// Freq (0.1 kHz): the LIVE CAT frequency in Hz when connected — NOT the
// freqMhz display string, which the manual-edit freeze / field locks can
// leave stale (that dropped the sub-kHz: on 14134.5 the frozen "14.134"
// string spotted 14134). Fall back to the entry field, then the last QSO.
defaultFreqKHz={
parseFloat(freqMhz) > 0
catState.connected && (catState.freq_hz ?? 0) > 0
? Math.round(((catState.freq_hz ?? 0) / 1000) * 10) / 10
: parseFloat(freqMhz) > 0
? Math.round(parseFloat(freqMhz) * 1000 * 10) / 10
: (qsos[0]?.freq_hz ? Math.round((qsos[0].freq_hz / 1000) * 10) / 10 : 0)
}
+8 -2
View File
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react';
import { useEffect, useMemo, useState } from 'react';
import { Plus, Trash2, Save, FolderOpen, X } from 'lucide-react';
import { writeUiPref } from '@/lib/uiPref';
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog';
@@ -134,6 +134,12 @@ interface Props {
export function FilterBuilder({ open, initial, onApply, onClose }: Props) {
const { t } = useI18n();
// Field dropdown sorted alphabetically by translated label (the FIELDS array is
// grouped by category for maintenance; the operator wants it A→Z to find things).
const sortedFields = useMemo(
() => FIELDS.map((f) => ({ f, txt: t(f.label) })).sort((a, b) => a.txt.localeCompare(b.txt)),
[t],
);
const [conditions, setConditions] = useState<FilterCondition[]>([]);
const [match, setMatch] = useState<'AND' | 'OR'>('AND');
const [presets, setPresets] = useState<Record<string, QueryFilter>>({});
@@ -237,7 +243,7 @@ export function FilterBuilder({ open, initial, onApply, onClose }: Props) {
}}>
<SelectTrigger className="h-8 w-48 text-xs"><SelectValue /></SelectTrigger>
<SelectContent className="max-h-72">
{FIELDS.map((f) => <SelectItem key={f.value} value={f.value}>{t(f.label)}</SelectItem>)}
{sortedFields.map(({ f, txt }) => <SelectItem key={f.value} value={f.value}>{txt}</SelectItem>)}
</SelectContent>
</Select>
<Select value={c.op} onValueChange={(v) => setCond(i, { op: v as FilterOp })}>
+1 -1
View File
@@ -351,7 +351,7 @@ export function QSOEditModal({ qso, onSave, onDelete, onClose, countries = [], b
return (
<Dialog open onOpenChange={(o) => { if (!o) onClose(); }}>
<DialogContent className="max-w-4xl max-h-[92vh] grid grid-rows-[auto_1fr_auto] gap-0 p-0">
<DialogContent className="max-w-5xl max-h-[92vh] grid grid-rows-[auto_1fr_auto] gap-0 p-0">
<DialogHeader className="flex-row items-baseline gap-2">
<DialogTitle>{t('qedit.title')}</DialogTitle>
<span className="font-mono text-xs text-muted-foreground">#{draft.id} {draft.callsign}</span>