diff --git a/src/lib/components/CreateFindModal.svelte b/src/lib/components/CreateFindModal.svelte index 69b6585..d4a1560 100644 --- a/src/lib/components/CreateFindModal.svelte +++ b/src/lib/components/CreateFindModal.svelte @@ -1,7 +1,8 @@ {#if isOpen} - - {#snippet header()} - Create Find - {/snippet} + (showModal = open)}> + + + Create Find + - { e.preventDefault(); handleSubmit(); }} + class="form" > - - Title * - - {title.length}/100 - - - - Description - - {description.length}/500 - - - - Location Name - - - - - - Latitude * - + + + What did you find? + - - Longitude * - + + + Tell us about it + - - - Category - - {#each categories as cat (cat.value)} - {cat.label} - {/each} - - + + Location name + + - - Photos/Videos (max 5) - - {#if selectedFiles && selectedFiles.length > 0} - - {#each Array.from(selectedFiles) as file (file.name)} - {file.name} - {/each} + + + Category + + {#each categories as cat (cat.value)} + {cat.label} + {/each} + - {/if} + + Privacy + + + {isPublic ? 'Public' : 'Private'} + + + + + + Add photo or video + + + + + + + + Click to upload + + + {#if selectedFiles && selectedFiles.length > 0} + + + + + + {selectedFiles[0].name} + + {/if} + + + + + Latitude + + + + Longitude + + + - - - - - Make this find public - - - {isPublic ? 'Everyone can see this find' : 'Only your friends can see this find'} - - - - - + + Cancel - + {isSubmitting ? 'Creating...' : 'Create Find'} - - + + {/if} diff --git a/src/lib/components/FindsList.svelte b/src/lib/components/FindsList.svelte index ff0ae80..564ca0e 100644 --- a/src/lib/components/FindsList.svelte +++ b/src/lib/components/FindsList.svelte @@ -26,6 +26,7 @@ title?: string; showEmpty?: boolean; emptyMessage?: string; + hideTitle?: boolean; } let { @@ -33,7 +34,8 @@ onFindExplore, title = 'Finds', showEmpty = true, - emptyMessage = 'No finds to display' + emptyMessage = 'No finds to display', + hideTitle = false }: FindsListProps = $props(); function handleFindExplore(id: string) { @@ -42,9 +44,11 @@ - - {title} - + {#if !hideTitle} + + {title} + + {/if} {#if finds.length > 0} @@ -98,6 +102,7 @@
- {isPublic ? 'Everyone can see this find' : 'Only your friends can see this find'} -