1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 14:59:36 +02:00

Make public from creation modal

This commit is contained in:
Sean Morley 2024-08-15 16:03:06 -04:00
parent 28b68afb12
commit 132ad44c08
2 changed files with 25 additions and 0 deletions

View file

@ -125,6 +125,9 @@
let user_id = data[2];
let image_url = data[3];
let link = data[4];
if (newAdventure.is_public) {
navigator.clipboard.writeText(`${window.location.origin}/adventures/${id}`);
}
newAdventure.image = image_url;
newAdventure.id = id;
newAdventure.user_id = user_id;
@ -370,6 +373,20 @@
class="input input-bordered w-full max-w-xs mt-1"
/>
</div>
<div class="mb-2">
<label for="is_public">Public <Earth class="inline-block -mt-1 mb-1 w-6 h-6" /></label><br
/>
<input
type="checkbox"
class="toggle toggle-primary"
id="is_public"
name="is_public"
bind:checked={newAdventure.is_public}
/>
</div>
{#if newAdventure.is_public}
<p>The link to this adventure will be copied to your clipboard once it is created!</p>
{/if}
<div class="mb-2">
<input
type="text"