From 73ed5b2420c417400a066ee5e59dd628e750224a Mon Sep 17 00:00:00 2001 From: Pandipipas <62224708+Pandipipas@users.noreply.github.com> Date: Sat, 14 Feb 2026 18:25:58 +0100 Subject: [PATCH] Update Graphics view with static overlay previews --- src/dashboard/scoreko-dev/views/Graphics.vue | 197 ++++++++++++++++++- 1 file changed, 190 insertions(+), 7 deletions(-) diff --git a/src/dashboard/scoreko-dev/views/Graphics.vue b/src/dashboard/scoreko-dev/views/Graphics.vue index 52f7cf8..3d2973a 100644 --- a/src/dashboard/scoreko-dev/views/Graphics.vue +++ b/src/dashboard/scoreko-dev/views/Graphics.vue @@ -12,6 +12,8 @@ type GraphicConfig = { height?: number; }; +type PreviewKind = 'scoreboard' | 'commentary' | null; + useHead({ title: 'Graphics' }); const graphics = computed( @@ -47,6 +49,20 @@ const copyUrl = async (graphic: GraphicConfig) => { document.body.removeChild(input); }; +const getPreviewKind = (graphic: GraphicConfig): PreviewKind => { + const name = buildGraphicName(graphic).toLowerCase(); + + if (name.includes('scoreboard')) { + return 'scoreboard'; + } + + if (name.includes('commentary')) { + return 'commentary'; + } + + return null; +}; + const onDragStart = (event: DragEvent, graphic: GraphicConfig) => { const url = buildGraphicUrl(graphic); const name = buildGraphicName(graphic); @@ -111,13 +127,6 @@ const onDragStart = (event: DragEvent, graphic: GraphicConfig) => { -
- URL -
-
- {{ buildGraphicUrl(graphic) }} -
-
{ @dragstart="onDragStart($event, graphic)" />
+ +
+
+ Overlay preview (estática) +
+ +
+
+
+ TEAM LEFT +
+
+ PLAYER 1 +
+
+ +
+ 2 + - + 1 +
+ +
+
+ TEAM RIGHT +
+
+ PLAYER 2 +
+
+
+ +
+
+
+ COMMENTARY +
+
+ COMMENTATOR 1 +
+
+ +
+ VS +
+ +
+
+ COMMENTARY +
+
+ COMMENTATOR 2 +
+
+
+
+ +