diff --git a/src/UI/Comparison/ComparisonAction.svelte b/src/UI/Comparison/ComparisonAction.svelte index b16f216d45..3b6c747e0f 100644 --- a/src/UI/Comparison/ComparisonAction.svelte +++ b/src/UI/Comparison/ComparisonAction.svelte @@ -16,6 +16,8 @@ export let feature: Feature export let layer: LayerConfig + export let readonly = false + let currentStep: "init" | "applying" | "done" = "init" /** @@ -49,17 +51,19 @@ {externalProperties[key]} {/if} - - {#if currentStep === "init"} - - {:else if currentStep === "applying"} - - {:else if currentStep === "done"} -
Done
- {:else } -
Error
- {/if} - + {#if !readonly} + + {#if currentStep === "init"} + + {:else if currentStep === "applying"} + + {:else if currentStep === "done"} +
Done
+ {:else } +
Error
+ {/if} + + {/if} diff --git a/src/UI/Comparison/ComparisonTable.svelte b/src/UI/Comparison/ComparisonTable.svelte index a749e8f838..36bfdc21dd 100644 --- a/src/UI/Comparison/ComparisonTable.svelte +++ b/src/UI/Comparison/ComparisonTable.svelte @@ -12,6 +12,7 @@ import { Tag } from "../../Logic/Tags/Tag" import { And } from "../../Logic/Tags/And" import Loading from "../Base/Loading.svelte" + import AttributedImage from "../Image/AttributedImage.svelte" export let osmProperties: Record export let externalProperties: Record @@ -21,6 +22,8 @@ export let feature: Feature export let layer: LayerConfig + export let readonly = false + let externalKeys: string[] = (Object.keys(externalProperties)) .sort() @@ -59,12 +62,23 @@ {#if different.length > 0}

Conflicting items

- {JSON.stringify(different)} + + + + + + + {#each different as key} + + + + + + {/each} +
KeyOSMExternal
{key}{osmProperties[key]}{externalProperties[key]}
{/if} {#if missing.length > 0} -

Missing items

- {#if currentStep === "init"} @@ -73,11 +87,13 @@ {#each missing as key} - + {/each}
- + {#if !readonly} + + {/if} {:else if currentStep === "applying_all"} Applying all missing values {:else if currentStep === "all_applied"} @@ -96,12 +112,22 @@ {/if} {#if unknownImages.length > 0} -

Missing pictures

- {#each unknownImages as image} - + +
+ {#each unknownImages as image} + + {/each} +
+ + {:else} + {#each unknownImages as image} + + - {/each} + {feature} + {layer} /> + {/each} + {/if} {/if} diff --git a/src/UI/Comparison/ComparisonTool.svelte b/src/UI/Comparison/ComparisonTool.svelte index 3acf386f09..9fa56915ac 100644 --- a/src/UI/Comparison/ComparisonTool.svelte +++ b/src/UI/Comparison/ComparisonTool.svelte @@ -19,6 +19,7 @@ export let state: SpecialVisualizationState export let tags: UIEventSource export let layer: LayerConfig export let feature: Feature +export let readonly = false let data: any = undefined let error: any = undefined @@ -58,5 +59,5 @@ onMount(async () => { Loading {$tags[url]}
{:else if data.properties !== undefined} - + {/if}