forked from MapComplete/MapComplete
		
	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, |         osmTags?: AndOrTagConfigJson | string, | ||||||
|         default?: boolean, |         default?: boolean, | ||||||
|         fields?: { |         fields?: { | ||||||
|  |             /** | ||||||
|  |              * If name is `search`, use  "_first_comment~.*{search}.*" as osmTags | ||||||
|  |              */ | ||||||
|             name: string, |             name: string, | ||||||
|             type?: string | "string" |             type?: string | "string" | ||||||
|         }[] |         }[] | ||||||
|  |  | ||||||
|  | @ -62,7 +62,7 @@ export default class ExtraLinkButton extends UIElement { | ||||||
| 
 | 
 | ||||||
|         let text: Translation |         let text: Translation | ||||||
|         if (c.text === undefined) { |         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 { |         } else { | ||||||
|             text = c.text.Clone() |             text = c.text.Clone() | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -408,5 +408,33 @@ | ||||||
|         "render": "8" |         "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", |   "id": "mapcomplete-changes", | ||||||
|   "title": { |   "title": { | ||||||
|     "en": "Changes made with MapComplete", |     "en": "Changes made with MapComplete" | ||||||
|     "nl": "Wijzigingen gemaakt met MapComplete" |  | ||||||
|   }, |   }, | ||||||
|   "shortDescription": { |   "shortDescription": { | ||||||
|     "en": "Shows changes made by MapComplete" |     "en": "Shows changes made by MapComplete" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue