Move 'asChanges' into tagsFilter; add 'survey:date' option with automatic date to benches

This commit is contained in:
Pieter Vander Vennet 2021-03-29 02:31:08 +02:00
parent fa5b92e6e1
commit 15a6794e59
10 changed files with 71 additions and 47 deletions

View file

@ -158,7 +158,7 @@ export default class SimpleAddUI extends UIElement {
let tagInfo = "";
const csCount = State.state.osmConnection.userDetails.data.csCount;
if (csCount > Constants.userJourney.tagsVisibleAt) {
tagInfo = this._confirmPreset.data.tags.map(t => t.asHumanString(csCount > Constants.userJourney.tagsVisibleAndWikiLinked, true)).join("&");
tagInfo = this._confirmPreset.data.tags.map(t => t.asHumanString(csCount > Constants.userJourney.tagsVisibleAndWikiLinked, true, {})).join("&");
tagInfo = `<br/>More information about the preset: ${tagInfo}`
}
@ -186,7 +186,7 @@ export default class SimpleAddUI extends UIElement {
const csCount = State.state.osmConnection.userDetails.data.csCount;
let tagInfo = undefined;
if (csCount > Constants.userJourney.tagsVisibleAt) {
const presets = preset.tags.map(t => new Combine ([t.asHumanString(false, true), " "]).SetClass("subtle break-words") )
const presets = preset.tags.map(t => new Combine ([t.asHumanString(false, true, {}), " "]).SetClass("subtle break-words") )
tagInfo = new Combine(presets)
}
const button: UIElement =

View file

@ -86,10 +86,10 @@ export default class TagRenderingQuestion extends UIElement {
return Translations.t.general.noTagsSelected.SetClass("subtle").Render();
}
if (csCount < Constants.userJourney.tagsVisibleAndWikiLinked) {
const tagsStr = tags.asHumanString(false, true);
const tagsStr = tags.asHumanString(false, true, self._tags.data);
return new FixedUiElement(tagsStr).SetClass("subtle").Render();
}
return tags.asHumanString(true, true);
return tags.asHumanString(true, true, self._tags.data);
}
)
).SetClass("block")