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 @@