diff --git a/Models/ThemeConfig/LayerConfig.ts b/Models/ThemeConfig/LayerConfig.ts index ee9063cfa..e4fe9cb4b 100644 --- a/Models/ThemeConfig/LayerConfig.ts +++ b/Models/ThemeConfig/LayerConfig.ts @@ -27,6 +27,7 @@ import FilterConfigJson from "./Json/FilterConfigJson"; import {And} from "../../Logic/Tags/And"; import {Overpass} from "../../Logic/Osm/Overpass"; import Constants from "../Constants"; +import {FixedUiElement} from "../../UI/Base/FixedUiElement"; export default class LayerConfig extends WithContextLoader { @@ -416,7 +417,8 @@ export default class LayerConfig extends WithContextLoader { let quickOverview: BaseUIElement = undefined; if (tableRows.length > 0) { quickOverview = new Combine([ - "**Warning** This quick overview is incomplete", + new FixedUiElement("Warning: ").SetClass("bold"), + "this quick overview is incomplete", new Table(["attribute", "type", "values which are supported by this layer"], tableRows) ]).SetClass("flex-col flex") } diff --git a/Models/ThemeConfig/LayoutConfig.ts b/Models/ThemeConfig/LayoutConfig.ts index 2d8598f6a..3cb39d9f7 100644 --- a/Models/ThemeConfig/LayoutConfig.ts +++ b/Models/ThemeConfig/LayoutConfig.ts @@ -211,5 +211,5 @@ export default class LayoutConfig { } return undefined } - + } \ No newline at end of file diff --git a/Models/ThemeConfig/TagRenderingConfig.ts b/Models/ThemeConfig/TagRenderingConfig.ts index aa9f05eb8..5547e2669 100644 --- a/Models/ThemeConfig/TagRenderingConfig.ts +++ b/Models/ThemeConfig/TagRenderingConfig.ts @@ -13,6 +13,7 @@ import Link from "../../UI/Base/Link"; import List from "../../UI/Base/List"; import {QuestionableTagRenderingConfigJson} from "./Json/QuestionableTagRenderingConfigJson"; import {FixedUiElement} from "../../UI/Base/FixedUiElement"; +import {Paragraph} from "../../UI/Base/Paragraph"; /*** * The parsed version of TagRenderingConfigJSON @@ -514,7 +515,10 @@ export default class TagRenderingConfig { withRender = [ `This rendering asks information about the property `, Link.OsmWiki(this.freeform.key), - `\nThis is rendered with \`${this.render.txt}\`` + new Paragraph(new Combine([ + "This is rendered with", + new FixedUiElement(this.render.txt).SetClass("literalcode bold") + ])) ] } @@ -522,17 +526,25 @@ export default class TagRenderingConfig { let mappings: BaseUIElement = undefined; if (this.mappings !== undefined) { mappings = new List( - this.mappings.map(m => { - let txt = "**" + m.then.txt + "** corresponds with " + m.if.asHumanString(true, false, {}); + [].concat(...this.mappings.map(m => { + const msgs: (string| BaseUIElement)[] = [ + new Combine( + [ + new FixedUiElement(m.then.txt).SetClass("bold"), + "corresponds with", + m.if.asHumanString(true, false, {}) + ] + ) + ] if (m.hideInAnswer === true) { - txt += "_This option cannot be chosen as answer_" + msgs.push(new FixedUiElement("This option cannot be chosen as answer").SetClass("italic")) } if (m.ifnot !== undefined) { - txt += "Unselecting this answer will add " + m.ifnot.asHumanString(true, false, {}) + msgs.push( "Unselecting this answer will add " + m.ifnot.asHumanString(true, false, {})) } - return txt; + return msgs; } - ) + )) ) } @@ -559,7 +571,11 @@ export default class TagRenderingConfig { } return new Combine([ new Title(this.id, 3), - this.question !== undefined ? "The question is **" + this.question.txt + "**" : "_This tagrendering has no question and is thus read-only_", + this.question !== undefined ? + new Combine([ "The question is " , new FixedUiElement( this.question.txt).SetClass("bold")]) : + new FixedUiElement( + "This tagrendering has no question and is thus read-only" + ).SetClass("italic"), new Combine(withRender), mappings, condition,