forked from MapComplete/MapComplete
Studio: more work on the base properties
This commit is contained in:
parent
c229b92221
commit
84dee10201
46 changed files with 11462 additions and 37927 deletions
|
|
@ -1,7 +1,6 @@
|
|||
<script lang="ts">
|
||||
|
||||
import {UIEventSource} from "../../Logic/UIEventSource";
|
||||
import {Translation} from "../i18n/Translation";
|
||||
import type {ConfigMeta} from "./configMeta";
|
||||
import TagRenderingEditable from "../Popup/TagRendering/TagRenderingEditable.svelte";
|
||||
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
|
||||
|
|
@ -15,8 +14,8 @@
|
|||
export let path: (string | number)[] = []
|
||||
export let schema: ConfigMeta
|
||||
let value = new UIEventSource<string>(undefined)
|
||||
let feedback = new UIEventSource<Translation>(undefined)
|
||||
|
||||
|
||||
|
||||
const configJson: QuestionableTagRenderingConfigJson = {
|
||||
id: path.join("_"),
|
||||
render: schema.hints.inline ?? schema.path.at(-1) + ": <b>{value}</b>",
|
||||
|
|
@ -29,7 +28,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (!schema.required) {
|
||||
if (schema.hints.default) {
|
||||
configJson.mappings = [{
|
||||
if: "value=", // +schema.hints.default,
|
||||
then: schema.path.at(-1) + " is not set. The default value <b>" + schema.hints.default + "</b> will be used. " + (schema.hints.ifunset ?? ""),
|
||||
}]
|
||||
} else if (!schema.required) {
|
||||
configJson.mappings = [{
|
||||
if: "value=",
|
||||
then: schema.path.at(-1) + " is not set. " + (schema.hints.ifunset ?? ""),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue