chore: release v0.26.1
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
} from '@/components/ui/select';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { QSO_BOX_FIELDS, QSO_FIELD_LABELS } from './qslTypes';
|
||||
import type { CardTemplate, CardElement, QSOBox, QSLPresetInfo, StyleParams } from './qslTypes';
|
||||
import type { CardSelection } from './CardPreview';
|
||||
import { StylePresetPicker, NumberField } from './StylePresetPicker';
|
||||
@@ -199,6 +200,26 @@ export function EditorPanel({ template, sel, presets, fontFamilies, onPatchEleme
|
||||
<Input className="h-7 w-44 font-mono text-xs" value={box.title ?? ''}
|
||||
onChange={(ev) => onPatchBox({ title: ev.target.value })} />
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<Label className="text-xs text-muted-foreground">Columns</Label>
|
||||
{/* Rebuilt from the canonical order every time rather than
|
||||
appended to: a box whose columns come out in the order they
|
||||
were ticked reads as a bug, and the widths are tuned for this
|
||||
order. */}
|
||||
<div className="grid grid-cols-2 gap-x-2">
|
||||
{QSO_BOX_FIELDS.map((f) => (
|
||||
<label key={f} className="flex items-center gap-1.5 text-xs">
|
||||
<Checkbox
|
||||
checked={box.fields.includes(f)}
|
||||
onCheckedChange={(v) => onPatchBox({
|
||||
fields: QSO_BOX_FIELDS.filter((k) => (k === f ? v === true : box.fields.includes(k))),
|
||||
})}
|
||||
/>
|
||||
{QSO_FIELD_LABELS[f] ?? f}
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<Label className="text-xs text-muted-foreground">Footer</Label>
|
||||
<Input className="h-7 w-44 font-mono text-xs" value={box.footer}
|
||||
|
||||
@@ -165,6 +165,12 @@ export interface QSLPresetInfo {
|
||||
}
|
||||
|
||||
// Human labels for the QSO box fields the renderer knows.
|
||||
// QSO_BOX_FIELDS is the canonical COLUMN ORDER of the confirmation box, and
|
||||
// the whole list the designer offers. The renderer's column widths are tuned
|
||||
// for it, so a box is always rebuilt from this order rather than from the
|
||||
// order the operator happened to tick the boxes in.
|
||||
export const QSO_BOX_FIELDS = ['qso_date', 'time_on', 'band', 'freq', 'mode', 'submode', 'rst_sent'] as const;
|
||||
|
||||
export const QSO_FIELD_LABELS: Record<string, string> = {
|
||||
qso_date: 'Date',
|
||||
time_on: 'UTC',
|
||||
|
||||
Reference in New Issue
Block a user