diff --git a/frontend/src/lib/components/EditAdventure.svelte b/frontend/src/lib/components/EditAdventure.svelte index 9774a78..806cdc7 100644 --- a/frontend/src/lib/components/EditAdventure.svelte +++ b/frontend/src/lib/components/EditAdventure.svelte @@ -279,73 +279,126 @@ type="number" min="0" max="5" - name="rating" - id="rating" + hidden bind:value={adventureToEdit.rating} + id="rating" + name="rating" class="input input-bordered w-full max-w-xs mt-1" /> - - - - {#if adventureToEdit.collection === null} -
-
+
-
- {/if} - - {#if adventureToEdit.is_public} -
-

Share this Adventure!

-
-

- {window.location.origin}/adventures/{adventureToEdit.id} -

+ (adventureToEdit.rating = 1)} + /> + (adventureToEdit.rating = 2)} + checked={adventureToEdit.rating === 2} + /> + (adventureToEdit.rating = 3)} + checked={adventureToEdit.rating === 3} + /> + (adventureToEdit.rating = 4)} + checked={adventureToEdit.rating === 4} + /> + (adventureToEdit.rating = 5)} + checked={adventureToEdit.rating === 5} + /> + {#if adventureToEdit.rating} -
+ {/if}
- {/if} + + + {#if adventureToEdit.collection === null} +
+
+ +
+ {/if} - - - + {#if adventureToEdit.is_public} +
+

Share this Adventure!

+
+

+ {window.location.origin}/adventures/{adventureToEdit.id} +

+ +
+
+ {/if} + + + + +
diff --git a/frontend/src/lib/components/NewAdventure.svelte b/frontend/src/lib/components/NewAdventure.svelte index 48268a4..c4bbe73 100644 --- a/frontend/src/lib/components/NewAdventure.svelte +++ b/frontend/src/lib/components/NewAdventure.svelte @@ -326,11 +326,59 @@ type="number" min="0" max="5" + hidden bind:value={newAdventure.rating} id="rating" name="rating" class="input input-bordered w-full max-w-xs mt-1" /> +
+ + (newAdventure.rating = 1)} + /> + (newAdventure.rating = 2)} + /> + (newAdventure.rating = 3)} + /> + (newAdventure.rating = 4)} + /> + (newAdventure.rating = 5)} + /> + {#if newAdventure.rating} + + {/if} +