From fbdf6bc27caec207abb08056d5458e90ba5a21b6 Mon Sep 17 00:00:00 2001 From: whidix Date: Sun, 8 Mar 2026 19:44:41 +0100 Subject: [PATCH] feat: remove unused import from completion page --- src/lib/components/StepForm.svelte | 351 ++++++++++-------- .../play/[sessionCode]/complete/+page.svelte | 1 - 2 files changed, 205 insertions(+), 147 deletions(-) diff --git a/src/lib/components/StepForm.svelte b/src/lib/components/StepForm.svelte index c2929d8..ee8cb11 100644 --- a/src/lib/components/StepForm.svelte +++ b/src/lib/components/StepForm.svelte @@ -77,47 +77,6 @@ fileInput.value = ''; } } - - let fieldConfig = $derived.by(() => { - switch (selectedType) { - case 'text': - return { - contentLabel: 'Text to display', - contentPlaceholder: 'Text shown to players', - showLocation: false, - showAnswer: false, - showHint: false, - showPuzzle: false - }; - case 'location': - return { - contentLabel: 'Location instruction', - contentPlaceholder: 'Describe where players need to go', - showLocation: true, - showAnswer: true, - showHint: true, - showPuzzle: false - }; - case 'puzzle': - return { - contentLabel: 'Puzzle statement', - contentPlaceholder: 'Describe the puzzle to solve', - showLocation: false, - showAnswer: true, - showHint: true, - showPuzzle: true - }; - default: - return { - contentLabel: 'Question', - contentPlaceholder: 'Enter the question for players', - showLocation: false, - showAnswer: true, - showHint: true, - showPuzzle: false - }; - } - });
@@ -185,121 +144,120 @@ />
-
- - -
- -
- - -
- - {#if fieldConfig.showAnswer} -
- - -
- {/if} - - {#if fieldConfig.showHint} -
- - -
- {/if} - - {#if fieldConfig.showLocation} -
-

Location Coordinates

-
+ {#if selectedType === 'text'} +
+

Text Content

+
-
-
-
- - -

Distance in meters within which the step will be validated (default: 50m)

+
- {/if} - - {#if fieldConfig.showPuzzle} + {:else if selectedType === 'question'} +
+

Question Configuration

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ {:else if selectedType === 'puzzle'}

Puzzle Configuration

+
+ + +
+
+ + +
-
+
+ + +
+
+
+ {:else if selectedType === 'location'} +
+

Location Configuration

+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +

Distance in meters within which the step will be validated (default: 50m)

+
+
+
+ + +
{/if} diff --git a/src/routes/(game)/game/play/[sessionCode]/complete/+page.svelte b/src/routes/(game)/game/play/[sessionCode]/complete/+page.svelte index 2fd99c0..cf90d4b 100644 --- a/src/routes/(game)/game/play/[sessionCode]/complete/+page.svelte +++ b/src/routes/(game)/game/play/[sessionCode]/complete/+page.svelte @@ -1,5 +1,4 @@