Small refactoring, add 'last edit by'-rendering
This commit is contained in:
parent
c6b4ba43fb
commit
95f1bdd797
10 changed files with 76 additions and 29 deletions
|
@ -9,6 +9,8 @@ import State from "../../State";
|
|||
import TagRenderingConfig from "../../Customizations/JSON/TagRenderingConfig";
|
||||
import ScrollableFullScreen from "../Base/ScrollableFullScreen";
|
||||
import {Tag} from "../../Logic/Tags/Tag";
|
||||
import Constants from "../../Models/Constants";
|
||||
import SharedTagRenderings from "../../Customizations/SharedTagRenderings";
|
||||
|
||||
export default class FeatureInfoBox extends ScrollableFullScreen {
|
||||
|
||||
|
@ -49,7 +51,7 @@ export default class FeatureInfoBox extends ScrollableFullScreen {
|
|||
private static GenerateContent(tags: UIEventSource<any>,
|
||||
layerConfig: LayerConfig): UIElement {
|
||||
let questionBox: UIElement = undefined;
|
||||
|
||||
|
||||
if (State.state.featureSwitchUserbadge.data) {
|
||||
questionBox = new QuestionBox(tags, layerConfig.tagRenderings);
|
||||
}
|
||||
|
@ -67,6 +69,12 @@ export default class FeatureInfoBox extends ScrollableFullScreen {
|
|||
renderings.push(questionBox);
|
||||
}
|
||||
|
||||
if (State.state.osmConnection.userDetails.data.csCount >= Constants.userJourney.historyLinkVisible ||
|
||||
State.state.featureSwitchIsDebugging.data == true ||
|
||||
State.state.featureSwitchIsTesting.data == true) {
|
||||
renderings.push(new TagRenderingAnswer( tags, SharedTagRenderings.SharedTagRendering.get("last_edit")))
|
||||
}
|
||||
|
||||
if (State.state.featureSwitchIsDebugging.data) {
|
||||
const config: TagRenderingConfig = new TagRenderingConfig({render: "{all_tags()}"}, new Tag("id", ""), "");
|
||||
renderings.push(new TagRenderingAnswer(tags, config))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue