chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2025-04-15 18:18:44 +02:00
parent 79b6927b56
commit 42ded4c1b1
328 changed files with 4062 additions and 1284 deletions

View file

@ -302,9 +302,7 @@
</div>
</NextButton>
</div>
<TagHint
tags={selectedPreset.preset.tags}
/>
<TagHint tags={selectedPreset.preset.tags} />
</TitledPanel>
{:else if _globalFilter?.length > 0 && _globalFilter?.length > checkedOfGlobalFilters}
<Tr t={_globalFilter[checkedOfGlobalFilters].onNewPoint?.safetyCheck} cls="mx-12" />

View file

@ -48,7 +48,9 @@
let selectedTags: UploadableTag[]
let changedProperties = undefined
$: changedProperties = TagUtils.changeAsProperties(And.construct(selectedTags)?.asChange(tags?.data ?? {}) ?? [])
$: changedProperties = TagUtils.changeAsProperties(
And.construct(selectedTags)?.asChange(tags?.data ?? {}) ?? []
)
let isHardDelete = undefined
$: isHardDelete = changedProperties[DeleteConfig.deleteReasonKey] !== undefined
@ -58,7 +60,9 @@
}
currentState = "applying"
let actionToTake: OsmChangeAction
const changedProperties = TagUtils.changeAsProperties(And.construct(selectedTags)?.asChange(tags?.data ?? {}))
const changedProperties = TagUtils.changeAsProperties(
And.construct(selectedTags)?.asChange(tags?.data ?? {})
)
const deleteReason = changedProperties[DeleteConfig.deleteReasonKey]
if (deleteReason) {
let softDeletionTags: UploadableTag

View file

@ -37,21 +37,19 @@
{#if tagRenderings.length > 0}
<div class="mb-8">
<AccordionSingle>
<div slot="header">
{#if headerTr}
<TagRenderingAnswer {tags} {layer} config={headerTr} {state} {selectedElement} />
{:else}
{header}
{/if}
</div>
<div slot="header">
{#if headerTr}
<TagRenderingAnswer {tags} {layer} config={headerTr} {state} {selectedElement} />
{:else}
{header}
{/if}
</div>
{#each tagRenderings as config (config.id)}
{#if config.IsKnown($tags) && (config.condition === undefined || config.condition.matchesProperties($tags))}
<TagRenderingEditableDynamic {tags} {config} {state} {selectedElement} {layer} />
{/if}
{/each}
</AccordionSingle>
{#if config.IsKnown($tags) && (config.condition === undefined || config.condition.matchesProperties($tags))}
<TagRenderingEditableDynamic {tags} {config} {state} {selectedElement} {layer} />
{/if}
{/each}
</AccordionSingle>
</div>
{/if}

View file

@ -119,6 +119,7 @@
}, 50)
}
</script>
{#if $loginEnabled}
<div
bind:this={questionboxElem}

View file

@ -23,7 +23,7 @@
if (config === undefined) {
console.error("TagRenderingAnswer: Config is undefined")
throw ("Config is undefined in tagRenderingAnswer")
throw "Config is undefined in tagRenderingAnswer"
}
let trs: Store<{ then: Translation; icon?: string; iconClass?: string }[]> = tags.mapD((tags) =>
Utils.NoNull(config?.GetRenderValues(tags))

View file

@ -23,11 +23,21 @@
export let getCountry = () => "?"
onMount(() => {
console.log("Setting selected unit based on country", getCountry(), "and upstream value:", upstreamValue.data)
console.log(
"Setting selected unit based on country",
getCountry(),
"and upstream value:",
upstreamValue.data
)
if (upstreamValue.data === undefined || upstreamValue.data === "") {
// Init the selected unit
let denomination: Denomination = unit.getDefaultDenomination(getCountry)
console.log("Found denom", denomination.canonical, "available denominations are:", unit.denominations.map(denom => denom.canonical))
console.log(
"Found denom",
denomination.canonical,
"available denominations are:",
unit.denominations.map((denom) => denom.canonical)
)
selectedUnit.setData(denomination.canonical)
}
})