forked from MapComplete/MapComplete
Themes: add validation check if a mapping does not erase another mapping completely
This commit is contained in:
parent
7d43bb5983
commit
556f6d0b93
43 changed files with 5015 additions and 4778 deletions
|
|
@ -9,17 +9,21 @@
|
|||
export let schema: ConfigMeta;
|
||||
export let state: EditLayerState;
|
||||
export let path: (string | number)[] = [];
|
||||
|
||||
let expertMode = state.expertMode;
|
||||
</script>
|
||||
{#if schema.hints?.typehint?.endsWith("[]")}
|
||||
<!-- We cheat a bit here by matching this 'magical' type... -->
|
||||
<SchemaBasedArray {path} {state} {schema} />
|
||||
{:else if schema.type === "array" && schema.hints.multianswer === "true"}
|
||||
<ArrayMultiAnswer {path} {state} {schema}/>
|
||||
{:else if schema.type === "array"}
|
||||
<SchemaBasedArray {path} {state} {schema} />
|
||||
{:else if schema.hints?.types}
|
||||
<SchemaBasedMultiType {path} {state} {schema} />
|
||||
{:else}
|
||||
<SchemaBasedField {path} {state} {schema} />
|
||||
{#if (schema.hints?.group !== "expert" || $expertMode) && schema.hints.group !== "hidden"}
|
||||
{#if schema.hints?.typehint?.endsWith("[]")}
|
||||
<!-- We cheat a bit here by matching this 'magical' type... -->
|
||||
<SchemaBasedArray {path} {state} {schema} />
|
||||
{:else if schema.type === "array" && schema.hints.multianswer === "true"}
|
||||
<ArrayMultiAnswer {path} {state} {schema} />
|
||||
{:else if schema.type === "array"}
|
||||
<SchemaBasedArray {path} {state} {schema} />
|
||||
{:else if schema.hints?.types}
|
||||
<SchemaBasedMultiType {path} {state} {schema} />
|
||||
{:else}
|
||||
<SchemaBasedField {path} {state} {schema} />
|
||||
{/if}
|
||||
{:else if window.location.hostname === "127.0.0.1"}
|
||||
<div class="subtle">Not showing SBI {schema.path.join(".")} due to group {schema.hints.group}</div>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue