forked from MapComplete/MapComplete
		
	Fixed reviews for named elements
This commit is contained in:
		
							parent
							
								
									e7dcd350fe
								
							
						
					
					
						commit
						287470acff
					
				
					 4 changed files with 14 additions and 7 deletions
				
			
		
							
								
								
									
										2
									
								
								State.ts
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								State.ts
									
										
									
									
									
								
							|  | @ -25,7 +25,7 @@ export default class State { | |||
|     // The singleton of the global state
 | ||||
|     public static state: State; | ||||
| 
 | ||||
|     public static vNumber = "0.2.6"; | ||||
|     public static vNumber = "0.2.6a"; | ||||
| 
 | ||||
|     // The user journey states thresholds when a new feature gets unlocked
 | ||||
|     public static userJourney = { | ||||
|  |  | |||
|  | @ -163,10 +163,17 @@ export default class SpecialVisualizations { | |||
|             { | ||||
|                 funcName: "reviews", | ||||
|                 docs: "Adds an overview of the mangrove-reviews of this object. IMPORTANT: the _name_ of the object should be defined for this to work!", | ||||
|                 args: [{name:"subject", doc:"The identifier used for this value; by default the name of the reviewed object"}], | ||||
|                 args: [{ | ||||
|                     name: "subject", | ||||
|                     doc: "The identifier used for this value; by default the name of the reviewed object" | ||||
|                 }], | ||||
|                 constr: (tags, args) => { | ||||
|                     const tgs = tags.data; | ||||
|                     const subject = args[0] ?? tgs.name ?? ""; | ||||
|                     console.log("Args[0]", args[0]) | ||||
|                     const subject = tgs.name ?? ""; | ||||
|                     if (args[0] !== undefined && args[0] !== "") { | ||||
|                         subject = args[0]; | ||||
|                     } | ||||
|                     if (subject === "") { | ||||
|                         return Translations.t.reviews.name_required; | ||||
|                     } | ||||
|  |  | |||
|  | @ -20,7 +20,7 @@ | |||
|   "startZoom": 10, | ||||
|   "widenFactor": 0.05, | ||||
|   "socialImage": "", | ||||
|   "hideInoverview": true, | ||||
|   "hideFromOverview": true, | ||||
|   "layers": [ | ||||
|     { | ||||
|       "id": "playgrounds", | ||||
|  |  | |||
|  | @ -86,7 +86,7 @@ function generateWikiEntry(layout: LayoutConfig){ | |||
|         auth=`Yes, by ${layout.maintainer};` | ||||
|     } | ||||
|     return `{{service_item
 | ||||
| |name= [https://mapcomplete.osm.be/${layout.id}.html ${layout.id}]
 | ||||
| |name= [https://mapcomplete.osm.be/${layout.id} ${layout.id}]
 | ||||
| |region= Worldwide | ||||
| |lang= ${languages} | ||||
| |descr= A MapComplete theme: ${Translations.W(layout.description) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue