Small fixes, add filters to shops
This commit is contained in:
parent
b119e1ac1d
commit
df706d2f97
4 changed files with 33 additions and 3 deletions
|
@ -16,6 +16,9 @@ export default interface FilterConfigJson {
|
|||
osmTags?: AndOrTagConfigJson | string,
|
||||
default?: boolean,
|
||||
fields?: {
|
||||
/**
|
||||
* If name is `search`, use "_first_comment~.*{search}.*" as osmTags
|
||||
*/
|
||||
name: string,
|
||||
type?: string | "string"
|
||||
}[]
|
||||
|
|
|
@ -62,7 +62,7 @@ export default class ExtraLinkButton extends UIElement {
|
|||
|
||||
let text: Translation
|
||||
if (c.text === undefined) {
|
||||
text = Translations.t.general.screenToSmall.Fuse(this.state.layoutToUse.title, "{theme}")
|
||||
text = Translations.t.general.screenToSmall.Subs({theme: this.state.layoutToUse.title})
|
||||
} else {
|
||||
text = c.text.Clone()
|
||||
}
|
||||
|
|
|
@ -408,5 +408,33 @@
|
|||
"render": "8"
|
||||
}
|
||||
}
|
||||
],
|
||||
"filter": [
|
||||
{
|
||||
"id": "shop-type",
|
||||
"options": [{
|
||||
"fields": [{
|
||||
"name": "search",
|
||||
"type": "string"
|
||||
}],
|
||||
"osmTags": "shop~^.*{search}.*$",
|
||||
"question": {
|
||||
"en": "Only show shops selling {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "shop-name",
|
||||
"options": [{
|
||||
"fields": [{
|
||||
"name": "search",
|
||||
"type": "string"
|
||||
}],
|
||||
"osmTags": "name~^.*{search}.*$",
|
||||
"question": {
|
||||
"en": "Only show shops with name {search}"
|
||||
}
|
||||
}]}
|
||||
]
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
"id": "mapcomplete-changes",
|
||||
"title": {
|
||||
"en": "Changes made with MapComplete",
|
||||
"nl": "Wijzigingen gemaakt met MapComplete"
|
||||
"en": "Changes made with MapComplete"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "Shows changes made by MapComplete"
|
||||
|
|
Loading…
Reference in a new issue