forked from MapComplete/MapComplete
Studio: theme editing
This commit is contained in:
parent
6e7eccf9de
commit
3aa9a21dea
34 changed files with 975 additions and 350 deletions
|
@ -7,6 +7,7 @@
|
|||
import { TrashIcon } from "@babeard/svelte-heroicons/mini";
|
||||
import QuestionPreview from "./QuestionPreview.svelte";
|
||||
import { Utils } from "../../Utils";
|
||||
import SchemaBasedMultiType from "./SchemaBasedMultiType.svelte";
|
||||
|
||||
export let state: EditLayerState;
|
||||
export let schema: ConfigMeta;
|
||||
|
@ -105,6 +106,12 @@
|
|||
} while (currentIndex !== targetIndex);
|
||||
}
|
||||
|
||||
function schemaForMultitype() {
|
||||
const sch = {...schema}
|
||||
sch.hints.typehint = undefined
|
||||
return sch
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="pl-2">
|
||||
|
@ -168,6 +175,8 @@
|
|||
{/if}
|
||||
|
||||
</QuestionPreview>
|
||||
{:else if schema.hints.types}
|
||||
<SchemaBasedMultiType {state} path={fusePath(value, [])} schema={schemaForMultitype()}/>
|
||||
{:else}
|
||||
{#each subparts as subpart}
|
||||
<SchemaBasedInput {state} path={fusePath(value, subpart.path)} schema={subpart} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue