forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
612e71a4b6
commit
511d20eb34
245 changed files with 43884 additions and 8661 deletions
|
|
@ -16,7 +16,6 @@
|
|||
import LoginToggle from "../Base/LoginToggle.svelte"
|
||||
import AccordionSingle from "../Flowbite/AccordionSingle.svelte"
|
||||
|
||||
|
||||
import ChevronLeft from "@babeard/svelte-heroicons/solid/ChevronLeft"
|
||||
import ThemeViewState from "../../Models/ThemeViewState"
|
||||
import Icon from "../Map/Icon.svelte"
|
||||
|
|
@ -62,15 +61,15 @@
|
|||
reason.setData(moveWizardState.reasons[0])
|
||||
}
|
||||
let notAllowed = moveWizardState.moveDisallowedReason
|
||||
let currentMapProperties: Store<Partial<MapProperties> & { location }> = reason.mapD(r => initMapProperties(r))
|
||||
let currentMapProperties: Store<Partial<MapProperties> & { location }> = reason.mapD((r) =>
|
||||
initMapProperties(r)
|
||||
)
|
||||
let map: UIEventSource<MlMap> = new UIEventSource<MlMap>(undefined)
|
||||
|
||||
|
||||
let searchValue = new UIEventSource<string>("")
|
||||
let isSearching = new UIEventSource<boolean>(false)
|
||||
const searcher = new NominatimGeocoding(1)
|
||||
|
||||
|
||||
async function searchPressed() {
|
||||
const v = searchValue.data
|
||||
console.log("Search is pressed", v)
|
||||
|
|
@ -85,7 +84,6 @@
|
|||
console.log("Found", result, "flying")
|
||||
map.data.flyTo({ zoom: 18, center: [loc.lon, loc.lat] })
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{#if moveWizardState.reasons.length > 0}
|
||||
|
|
@ -124,19 +122,23 @@
|
|||
</button>
|
||||
{/each}
|
||||
{:else if currentStep === "pick_location" || currentStep === "reason"}
|
||||
{#if $reason.includeSearch}
|
||||
<Searchbar value={searchValue} on:search={() => searchPressed()}>
|
||||
<svelte:fragment slot="button-right">
|
||||
{#if $reason.includeSearch}
|
||||
<Searchbar value={searchValue} on:search={() => searchPressed()}>
|
||||
<svelte:fragment slot="button-right">
|
||||
{#if $isSearching}
|
||||
<Loading />
|
||||
<Loading />
|
||||
{:else}
|
||||
<button class="primary" class:disabled={$searchValue.length === 0} on:click={() => searchPressed()}>
|
||||
<button
|
||||
class="primary"
|
||||
class:disabled={$searchValue.length === 0}
|
||||
on:click={() => searchPressed()}
|
||||
>
|
||||
<Tr t={Translations.t.general.search.searchShort} />
|
||||
</button>
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
</Searchbar>
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
</Searchbar>
|
||||
{/if}
|
||||
<div class="relative h-64 w-full">
|
||||
<NewPointLocationInput
|
||||
{map}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue