Improve layer docs generation
This commit is contained in:
parent
6e3dd6a8d5
commit
edb5b06f12
2 changed files with 14 additions and 1 deletions
|
@ -12,6 +12,7 @@ import Title from "../../UI/Base/Title";
|
|||
import Link from "../../UI/Base/Link";
|
||||
import List from "../../UI/Base/List";
|
||||
import {QuestionableTagRenderingConfigJson} from "./Json/QuestionableTagRenderingConfigJson";
|
||||
import {FixedUiElement} from "../../UI/Base/FixedUiElement";
|
||||
|
||||
/***
|
||||
* The parsed version of TagRenderingConfigJSON
|
||||
|
@ -534,11 +535,20 @@ export default class TagRenderingConfig {
|
|||
)
|
||||
}
|
||||
|
||||
let condition : BaseUIElement = undefined
|
||||
if(this.condition !== undefined && !this.condition?.matchesProperties({})){
|
||||
condition = new Combine(["Only visible if",
|
||||
new FixedUiElement( this.condition.asHumanString(false, false, {})
|
||||
).SetClass("code")
|
||||
, "is shown"])
|
||||
}
|
||||
|
||||
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_",
|
||||
new Combine(withRender),
|
||||
mappings
|
||||
mappings,
|
||||
condition
|
||||
]).SetClass("flex-col");
|
||||
}
|
||||
}
|
|
@ -13,6 +13,9 @@ export class FixedUiElement extends BaseUIElement {
|
|||
}
|
||||
|
||||
AsMarkdown(): string {
|
||||
if(this.HasClass("code")){
|
||||
return "`"+this.content+"`"
|
||||
}
|
||||
return this.content;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue