UX: translate 'creating point', indicate that a new background layer is loading in the selectBackgroundButton
This commit is contained in:
parent
dcc4a98344
commit
7210b3ff5d
8 changed files with 41 additions and 10 deletions
|
@ -123,6 +123,7 @@
|
||||||
"confirmLocation": "Confirm this location",
|
"confirmLocation": "Confirm this location",
|
||||||
"confirmTitle": "Add a {title}?",
|
"confirmTitle": "Add a {title}?",
|
||||||
"confirmWarning": "The feature you create here will be <b>visible for everyone</b>. Please, only add things on to the map if they truly exist. A lot of applications use this data.",
|
"confirmWarning": "The feature you create here will be <b>visible for everyone</b>. Please, only add things on to the map if they truly exist. A lot of applications use this data.",
|
||||||
|
"creating": "Creating a new point...",
|
||||||
"disableFilters": "Disable all filters",
|
"disableFilters": "Disable all filters",
|
||||||
"disableFiltersExplanation": "Some features might be hidden by a filter",
|
"disableFiltersExplanation": "Some features might be hidden by a filter",
|
||||||
"enableLayer": "Enable layer {name}",
|
"enableLayer": "Enable layer {name}",
|
||||||
|
|
|
@ -1412,6 +1412,7 @@
|
||||||
},
|
},
|
||||||
"Capacity": {
|
"Capacity": {
|
||||||
"question": "How many bicycles fit in this bicycle parking (including possible cargo bicycles)?",
|
"question": "How many bicycles fit in this bicycle parking (including possible cargo bicycles)?",
|
||||||
|
"questionHint": "This includes regular bicycles, cargo bikes, ebikes, ...",
|
||||||
"render": "Place for {capacity} bikes"
|
"render": "Place for {capacity} bikes"
|
||||||
},
|
},
|
||||||
"Cargo bike capacity?": {
|
"Cargo bike capacity?": {
|
||||||
|
|
|
@ -1151,6 +1151,7 @@
|
||||||
},
|
},
|
||||||
"Capacity": {
|
"Capacity": {
|
||||||
"question": "Hoeveel fietsen kunnen in deze fietsparking (inclusief potentiëel bakfietsen)?",
|
"question": "Hoeveel fietsen kunnen in deze fietsparking (inclusief potentiëel bakfietsen)?",
|
||||||
|
"questionHint": "Dit is het totaal aantal gewone fietsen, bakfietsen, elektrische fietsen, ...",
|
||||||
"render": "Plaats voor {capacity} fietsen"
|
"render": "Plaats voor {capacity} fietsen"
|
||||||
},
|
},
|
||||||
"Cargo bike capacity?": {
|
"Cargo bike capacity?": {
|
||||||
|
@ -6545,6 +6546,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"opening_hours": {
|
"opening_hours": {
|
||||||
|
"mappings": {
|
||||||
|
"0": {
|
||||||
|
"then": "Gesloten voor onbepaalde duur"
|
||||||
|
}
|
||||||
|
},
|
||||||
"question": "Wat zijn de openingstijden van {title()}?",
|
"question": "Wat zijn de openingstijden van {title()}?",
|
||||||
"render": "<h3>Openingstijden</h3>{opening_hours_table(opening_hours)}"
|
"render": "<h3>Openingstijden</h3>{opening_hours_table(opening_hours)}"
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
import { twMerge } from "tailwind-merge"
|
import { twMerge } from "tailwind-merge"
|
||||||
import Loading from "../../assets/svg/Loading.svelte"
|
import Loading from "../../assets/svg/Loading.svelte"
|
||||||
|
|
||||||
export let cls: string = undefined
|
export let cls: string = "flex p-1 pl-2"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={twMerge("flex p-1 pl-2", cls)}>
|
<div class={cls}>
|
||||||
<div class="min-w-6 h-6 w-6 shrink-0 animate-spin self-center">
|
<div class="min-w-6 h-6 w-6 shrink-0 animate-spin self-center">
|
||||||
<Loading />
|
<Loading />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
/**
|
/**
|
||||||
* A mapcontrol button which allows the user to select a different background.
|
* A mapcontrol button which allows the user to select a different background.
|
||||||
* Even though the component is very small, it gets it's own class as it is often reused
|
* Even though the component is very small, it gets its own class as it is often reused
|
||||||
*/
|
*/
|
||||||
import { Square3Stack3dIcon } from "@babeard/svelte-heroicons/solid"
|
import { Square3Stack3dIcon } from "@babeard/svelte-heroicons/solid"
|
||||||
import type { SpecialVisualizationState } from "../SpecialVisualization"
|
import type { SpecialVisualizationState } from "../SpecialVisualization"
|
||||||
import Translations from "../i18n/Translations"
|
import Translations from "../i18n/Translations"
|
||||||
import MapControlButton from "../Base/MapControlButton.svelte"
|
import MapControlButton from "../Base/MapControlButton.svelte"
|
||||||
import Tr from "../Base/Tr.svelte"
|
import Tr from "../Base/Tr.svelte"
|
||||||
|
import StyleLoadingIndicator from "../Map/StyleLoadingIndicator.svelte"
|
||||||
|
import { UIEventSource } from "../../Logic/UIEventSource"
|
||||||
|
import { Map as MlMap } from "maplibre-gl"
|
||||||
|
import ThemeViewState from "../../Models/ThemeViewState"
|
||||||
|
|
||||||
export let state: SpecialVisualizationState
|
export let state: ThemeViewState
|
||||||
export let hideTooltip = false
|
export let hideTooltip = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -17,7 +21,10 @@
|
||||||
arialabel={Translations.t.general.labels.background}
|
arialabel={Translations.t.general.labels.background}
|
||||||
on:click={() => state.guistate.backgroundLayerSelectionIsOpened.setData(true)}
|
on:click={() => state.guistate.backgroundLayerSelectionIsOpened.setData(true)}
|
||||||
>
|
>
|
||||||
<Square3Stack3dIcon class="h-6 w-6" />
|
|
||||||
|
<StyleLoadingIndicator map={state.map} rasterLayer={state.mapProperties.rasterLayer} >
|
||||||
|
<Square3Stack3dIcon class="h-6 w-6" />
|
||||||
|
</StyleLoadingIndicator>
|
||||||
{#if !hideTooltip}
|
{#if !hideTooltip}
|
||||||
<Tr cls="mx-2" t={Translations.t.general.backgroundSwitch} />
|
<Tr cls="mx-2" t={Translations.t.general.backgroundSwitch} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -36,13 +36,17 @@
|
||||||
<Tr t={t.upload.failReasonsAdvanced} />
|
<Tr t={t.upload.failReasonsAdvanced} />
|
||||||
</div>
|
</div>
|
||||||
{:else if $retried === 1}
|
{:else if $retried === 1}
|
||||||
<Loading cls="alert">
|
<div class="alert">
|
||||||
|
<Loading>
|
||||||
<Tr t={t.upload.one.retrying} />
|
<Tr t={t.upload.one.retrying} />
|
||||||
</Loading>
|
</Loading>
|
||||||
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<Loading cls="alert">
|
<div class="alert">
|
||||||
|
<Loading>
|
||||||
<Tr t={t.upload.one.uploading} />
|
<Tr t={t.upload.one.uploading} />
|
||||||
</Loading>
|
</Loading>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{:else if $uploadStarted > 1}
|
{:else if $uploadStarted > 1}
|
||||||
{#if $uploadFinished + $failed === $uploadStarted && $uploadFinished > 0}
|
{#if $uploadFinished + $failed === $uploadStarted && $uploadFinished > 0}
|
||||||
|
|
|
@ -6,14 +6,26 @@
|
||||||
|
|
||||||
let isLoading = false
|
let isLoading = false
|
||||||
export let map: UIEventSource<MlMap>
|
export let map: UIEventSource<MlMap>
|
||||||
|
export let rasterLayer: UIEventSource<any> = undefined
|
||||||
|
|
||||||
|
let didChange = undefined
|
||||||
|
onDestroy(rasterLayer?.addCallback(() => {
|
||||||
|
didChange = true
|
||||||
|
}) ??( () => {}))
|
||||||
|
|
||||||
onDestroy(Stores.Chronic(250).addCallback(
|
onDestroy(Stores.Chronic(250).addCallback(
|
||||||
() => {
|
() => {
|
||||||
isLoading = !map.data?.isStyleLoaded()
|
isLoading = !map.data?.isStyleLoaded() && (didChange === undefined || didChange)
|
||||||
|
if(didChange){
|
||||||
|
didChange = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
{#if isLoading}
|
{#if isLoading}
|
||||||
<Loading />
|
<Loading cls="h-6 w-6" />
|
||||||
|
{:else}
|
||||||
|
<slot />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -364,7 +364,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<Loading>Creating point...</Loading>
|
<Loading><Tr t={Translations.t.general.add.creating}/> </Loading>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</LoginToggle>
|
</LoginToggle>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue