mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 14:59:36 +02:00
feat: Add latitude and longitude to NewAdventure component
This commit is contained in:
parent
31063c92cb
commit
3e328f408a
2 changed files with 64 additions and 0 deletions
|
@ -9,6 +9,9 @@
|
|||
|
||||
export let type: string = 'visited';
|
||||
|
||||
export let longitude: number | undefined = undefined;
|
||||
export let latitude: number | undefined = undefined;
|
||||
|
||||
import Wikipedia from '~icons/mdi/wikipedia';
|
||||
import ClipboardList from '~icons/mdi/clipboard-list';
|
||||
import ActivityComplete from './ActivityComplete.svelte';
|
||||
|
@ -31,6 +34,11 @@
|
|||
collection: null
|
||||
};
|
||||
|
||||
if (longitude && latitude) {
|
||||
newAdventure.latitude = latitude;
|
||||
newAdventure.longitude = longitude;
|
||||
}
|
||||
|
||||
let image: File;
|
||||
let fileInput: HTMLInputElement;
|
||||
|
||||
|
@ -164,6 +172,28 @@
|
|||
on:submit={handleSubmit}
|
||||
action="/adventures?/create"
|
||||
>
|
||||
<div class="join">
|
||||
<input
|
||||
class="join-item btn btn-neutral"
|
||||
type="radio"
|
||||
name="type"
|
||||
id="visited"
|
||||
value="visited"
|
||||
aria-label="Visited"
|
||||
checked
|
||||
on:click={() => (type = 'visited')}
|
||||
/>
|
||||
<input
|
||||
class="join-item btn btn-neutral"
|
||||
type="radio"
|
||||
name="type"
|
||||
id="planned"
|
||||
value="planned"
|
||||
aria-label="Planned"
|
||||
on:click={() => (type = 'planned')}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
name="type"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue