From 28245dbeb153e1e9c5bea397c0154bc0f26464c7 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Mon, 2 Feb 2026 01:47:11 +1300 Subject: [PATCH] chore(prettier): formatting --- .../lib/overlays/OverlayTemplateRenderer.ts | 8 ++- .../OverlayEditor/MappedIconElement.tsx | 9 ++- .../OverlayEditor/OverlayLayerPanel.tsx | 67 ++++++++++--------- 3 files changed, 50 insertions(+), 34 deletions(-) diff --git a/server/lib/overlays/OverlayTemplateRenderer.ts b/server/lib/overlays/OverlayTemplateRenderer.ts index 6ca3732..249e3f8 100644 --- a/server/lib/overlays/OverlayTemplateRenderer.ts +++ b/server/lib/overlays/OverlayTemplateRenderer.ts @@ -1292,8 +1292,12 @@ class OverlayTemplateRendererService { // Scale icon size and spacing to poster size // Support both new spacingX/spacingY and legacy spacing field const iconSize = Math.round(props.iconSize * posterScale); - const spacingX = Math.round((props.spacingX ?? props.spacing ?? 4) * posterScale); - const spacingY = Math.round((props.spacingY ?? props.spacing ?? 4) * posterScale); + const spacingX = Math.round( + (props.spacingX ?? props.spacing ?? 4) * posterScale + ); + const spacingY = Math.round( + (props.spacingY ?? props.spacing ?? 4) * posterScale + ); // Calculate positions based on layout const positions = this.calculateIconPositions( diff --git a/src/components/OverlayEditor/MappedIconElement.tsx b/src/components/OverlayEditor/MappedIconElement.tsx index 08e3338..8051ef5 100644 --- a/src/components/OverlayEditor/MappedIconElement.tsx +++ b/src/components/OverlayEditor/MappedIconElement.tsx @@ -135,7 +135,14 @@ export const MappedIconElement: React.FC = ({ default: return { width: iconSize, height: iconSize }; } - }, [mappingsToShow.length, iconSize, spacingX, spacingY, layout, gridColumns]); + }, [ + mappingsToShow.length, + iconSize, + spacingX, + spacingY, + layout, + gridColumns, + ]); // Load icons useEffect(() => { diff --git a/src/components/OverlayEditor/OverlayLayerPanel.tsx b/src/components/OverlayEditor/OverlayLayerPanel.tsx index 76304f0..9326346 100644 --- a/src/components/OverlayEditor/OverlayLayerPanel.tsx +++ b/src/components/OverlayEditor/OverlayLayerPanel.tsx @@ -1683,9 +1683,7 @@ export const OverlayLayerPanel: React.FC = ({ }, contentRating: { label: 'Content Rating', - fields: [ - { field: 'contentRating', label: 'Content Rating' }, - ], + fields: [{ field: 'contentRating', label: 'Content Rating' }], }, // TODO: Add default icon mappings for these categories // tags: { @@ -1855,30 +1853,29 @@ export const OverlayLayerPanel: React.FC = ({ )} {/* Grid Columns (only shown when grid layout and array field) */} - {props.layout === 'grid' && - !isSingleValueField(props.field) && ( -
- - - handleUpdateElement(element.id, { - properties: { - ...props, - gridColumns: parseInt(e.target.value), - }, - }) - } - className="w-full" - /> -
- )} + {props.layout === 'grid' && !isSingleValueField(props.field) && ( +
+ + + handleUpdateElement(element.id, { + properties: { + ...props, + gridColumns: parseInt(e.target.value), + }, + }) + } + className="w-full" + /> +
+ )} {/* Icon Size */}
@@ -1905,7 +1902,8 @@ export const OverlayLayerPanel: React.FC = ({ <>
= ({ value={props.spacingX ?? props.spacing ?? 4} onChange={(e) => handleUpdateElement(element.id, { - properties: { ...props, spacingX: parseInt(e.target.value) }, + properties: { + ...props, + spacingX: parseInt(e.target.value), + }, }) } className="w-full" @@ -1922,7 +1923,8 @@ export const OverlayLayerPanel: React.FC = ({
= ({ value={props.spacingY ?? props.spacing ?? 4} onChange={(e) => handleUpdateElement(element.id, { - properties: { ...props, spacingY: parseInt(e.target.value) }, + properties: { + ...props, + spacingY: parseInt(e.target.value), + }, }) } className="w-full"