forked from MapComplete/MapComplete
Units: add possibility to have an "inverted" time unit, e.g. for charge; add charge units to bike_parking
This commit is contained in:
parent
4ccfe3efe4
commit
bf523848fb
8 changed files with 94 additions and 32 deletions
|
|
@ -178,7 +178,9 @@
|
|||
checkedMappings,
|
||||
tags.data
|
||||
)
|
||||
console.log("Constructing change spec from", {freeform: $freeformInput, selectedMapping, checkedMappings, currentTags: tags.data}, " --> ", selectedTags)
|
||||
if(state.featureSwitches.featureSwitchIsDebugging.data){
|
||||
console.log("Constructing change spec from", {freeform: $freeformInput, selectedMapping, checkedMappings, currentTags: tags.data}, " --> ", selectedTags)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Could not calculate changeSpecification:", e)
|
||||
selectedTags = undefined
|
||||
|
|
|
|||
|
|
@ -64,10 +64,14 @@
|
|||
)
|
||||
</script>
|
||||
|
||||
{#if unit.inverted}
|
||||
<div class="bold px-2">/</div>
|
||||
{/if}
|
||||
|
||||
<select bind:value={$selectedUnit}>
|
||||
{#each unit.denominations as denom (denom.canonical)}
|
||||
<option value={denom.canonical}>
|
||||
{#if $isSingle}
|
||||
{#if $isSingle || unit.inverted}
|
||||
<Tr t={denom.humanSingular} />
|
||||
{:else}
|
||||
<Tr t={denom.human.Subs({ quantity: "" })} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue