+
+
Use PNG or SVG with a transparent background.
+
Minimum 200×200px; recommended 600×200px (wide) or 400×400px (square).
+
Max 5MB; we'll auto-trim, downscale, and convert to PNG.
+
Avoid JPEGs unless the background is solid white.
+
+
+ {loading ? (
+
+ Loading current logo…
+
+ ) : current ? (
+
+
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+

+
+
+
Current logo
+
+ {current.sizeBytes
+ ? `${(Number(current.sizeBytes) / 1024).toFixed(1)} KB`
+ : 'size unknown'}{' '}
+ · {current.mimeType ?? 'image'}
+
+
+
+
+
+
+
+ ) : (
+
+ No PDF logo configured yet. Reports use the port name as a text header.
+
+ )}
+
+
+
+ pick(e.target.files?.[0] ?? null)}
+ className="block w-full text-sm file:mr-3 file:rounded file:border-0 file:bg-primary file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-primary-foreground"
+ />
+
+
+ {objectUrl ? (
+
+
+ Crop:
+ {(['wide', 'square', 'freeform'] as const).map((m) => (
+
+ ))}
+
+
setCrop(percent)}
+ onComplete={(c) => setCompletedCrop(c)}
+ aspect={ASPECT_RATIOS[aspectMode]}
+ className="max-h-[400px]"
+ >
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+
+
+
+
+
+
+
+
+ ) : null}
+
+ {uploadInfo ? (
+
+
Processed
+
+ From {uploadInfo.originalFormat.toUpperCase()} {uploadInfo.originalDimensions.width}×
+ {uploadInfo.originalDimensions.height}
+ {' → '}
+ PNG {uploadInfo.finalDimensions.width}×{uploadInfo.finalDimensions.height} (
+ {(uploadInfo.finalBytes / 1024).toFixed(1)} KB)
+
+ {warnings.length > 0 ? (
+
+ {warnings.map((w) => (
+ - {WARNING_LABELS[w] ?? w}
+ ))}
+
+ ) : null}
+
+ ) : null}
+
+