forked from MapComplete/MapComplete
		
	Merge master
This commit is contained in:
		
						commit
						ef70c17393
					
				
					 11 changed files with 32 additions and 12 deletions
				
			
		| 
						 | 
					@ -44,7 +44,7 @@ export default class AllTranslationAssets {
 | 
				
			||||||
      zoomInFurther: new Translation( {"en":"Zoom in further to add a point.","ca":"Apropa per afegir un punt.","es":"Acerca para añadir un punto.","nl":"Gelieve verder in te zoomen om een punt toe te voegen.","fr":"Rapprochez vous pour ajouter un point.","gl":"Achégate para engadir un punto.","de":"Weiter einzoomen, um einen Punkt hinzuzufügen."} ),
 | 
					      zoomInFurther: new Translation( {"en":"Zoom in further to add a point.","ca":"Apropa per afegir un punt.","es":"Acerca para añadir un punto.","nl":"Gelieve verder in te zoomen om een punt toe te voegen.","fr":"Rapprochez vous pour ajouter un point.","gl":"Achégate para engadir un punto.","de":"Weiter einzoomen, um einen Punkt hinzuzufügen."} ),
 | 
				
			||||||
      stillLoading: new Translation( {"en":"The data is still loading. Please wait a bit before you add a new point.","ca":"Les dades es segueixen carregant. Espera una mica abans d'afegir cap punt.","es":"Los datos se siguen cargando. Espera un poco antes de añadir ningún punto.","nl":"De data wordt nog geladen. Nog even geduld en dan kan je een punt toevoegen.","fr":"Chargement des donnés. Patientez un instant avant d'ajouter un nouveau point.","gl":"Os datos seguen a cargarse. Agarda un intre antes de engadir ningún punto.","de":"Die Daten werden noch geladen. Bitte warten Sie etwas, bevor Sie einen neuen Punkt hinzufügen."} ),
 | 
					      stillLoading: new Translation( {"en":"The data is still loading. Please wait a bit before you add a new point.","ca":"Les dades es segueixen carregant. Espera una mica abans d'afegir cap punt.","es":"Los datos se siguen cargando. Espera un poco antes de añadir ningún punto.","nl":"De data wordt nog geladen. Nog even geduld en dan kan je een punt toevoegen.","fr":"Chargement des donnés. Patientez un instant avant d'ajouter un nouveau point.","gl":"Os datos seguen a cargarse. Agarda un intre antes de engadir ningún punto.","de":"Die Daten werden noch geladen. Bitte warten Sie etwas, bevor Sie einen neuen Punkt hinzufügen."} ),
 | 
				
			||||||
      confirmIntro: new Translation( {"en":"<h3>Add a {title} here?</h3>The point you create here will be <b>visible for everyone</b>. Please, only add things on to the map if they truly exist. A lot of applications use this data.","ca":"<h3>Afegir {title} aquí?</h3>El punt que estàs creant <b>el veurà tothom</b>. Només afegeix coses que realment existeixin. Moltes aplicacions fan servir aquestes dades.","es":"<h3>Añadir {title} aquí?</h3>El punto que estás creando <b>lo verá todo el mundo</b>. Sólo añade cosas que realmente existan. Muchas aplicaciones usan estos datos.","nl":"<h3>Voeg hier een {title} toe?</h3>Het punt dat je hier toevoegt, is <b>zichtbaar voor iedereen</b>. Veel applicaties gebruiken deze data, voeg dus enkel punten toe die echt bestaan.","fr":"<h3>Ajouter un/une {title} ici?</h3>Le point que vous ajouter sera visible par tout le monde. Merci d'etre sûr que ce point existe réellement. Beaucoup d'autres applications reposent sur ces données.","gl":"<h3>Engadir {title} aquí?</h3>O punto que estás a crear <b>será ollado por todo o mundo</b>. Só engade cousas que realmente existan. Moitas aplicacións empregan estes datos.","de":"<h3>Hier einen {title} hinzufügen?</h3>Der Punkt, den Sie hier anlegen, wird <b>für alle sichtbar sein</b>. Bitte fügen Sie der Karte nur dann Dinge hinzu, wenn sie wirklich existieren. Viele Anwendungen verwenden diese Daten."} ),
 | 
					      confirmIntro: new Translation( {"en":"<h3>Add a {title} here?</h3>The point you create here will be <b>visible for everyone</b>. Please, only add things on to the map if they truly exist. A lot of applications use this data.","ca":"<h3>Afegir {title} aquí?</h3>El punt que estàs creant <b>el veurà tothom</b>. Només afegeix coses que realment existeixin. Moltes aplicacions fan servir aquestes dades.","es":"<h3>Añadir {title} aquí?</h3>El punto que estás creando <b>lo verá todo el mundo</b>. Sólo añade cosas que realmente existan. Muchas aplicaciones usan estos datos.","nl":"<h3>Voeg hier een {title} toe?</h3>Het punt dat je hier toevoegt, is <b>zichtbaar voor iedereen</b>. Veel applicaties gebruiken deze data, voeg dus enkel punten toe die echt bestaan.","fr":"<h3>Ajouter un/une {title} ici?</h3>Le point que vous ajouter sera visible par tout le monde. Merci d'etre sûr que ce point existe réellement. Beaucoup d'autres applications reposent sur ces données.","gl":"<h3>Engadir {title} aquí?</h3>O punto que estás a crear <b>será ollado por todo o mundo</b>. Só engade cousas que realmente existan. Moitas aplicacións empregan estes datos.","de":"<h3>Hier einen {title} hinzufügen?</h3>Der Punkt, den Sie hier anlegen, wird <b>für alle sichtbar sein</b>. Bitte fügen Sie der Karte nur dann Dinge hinzu, wenn sie wirklich existieren. Viele Anwendungen verwenden diese Daten."} ),
 | 
				
			||||||
      confirmButton: new Translation( {"en":"Add a {category} here","ca":"Afegir {category} aquí","es":"Añadir {category} aquí","nl":"Voeg hier een {category} toe","fr":"Ajouter un/une {category} ici","gl":"Engadir {category} aquí","de":"Hier eine {category} hinzufügen"} ),
 | 
					      confirmButton: new Translation( {"en":"Add a {category} here.<br/><div class='alert'>Your addition is visble for everyone</div>","ca":"Afegir {category} aquí","es":"Añadir {category} aquí","nl":"Voeg hier een {category} toe<br/><div class='alert'>Je toevoeging is voor iedereen zichtbaar</div>","fr":"Ajouter un/une {category} ici","gl":"Engadir {category} aquí","de":"Hier eine {category} hinzufügen"} ),
 | 
				
			||||||
      openLayerControl: new Translation( {"en":"Open the layer control box","ca":"Obrir el control de capes","es":"Abrir el control de capas","nl":"Open de laag-instellingen","de":"Das Ebenen-Kontrollkästchen öffnen"} ),
 | 
					      openLayerControl: new Translation( {"en":"Open the layer control box","ca":"Obrir el control de capes","es":"Abrir el control de capas","nl":"Open de laag-instellingen","de":"Das Ebenen-Kontrollkästchen öffnen"} ),
 | 
				
			||||||
      layerNotEnabled: new Translation( {"en":"The layer {layer} is not enabled. Enable this layer to add a point","ca":"La capa {layer} no està habilitada. Fes-ho per poder afegir un punt a aquesta capa","es":"La capa {layer} no está habilitada. Hazlo para poder añadir un punto en esta capa","nl":"De laag {layer} is gedeactiveerd. Activeer deze om een punt toe te voegn","de":"Die Ebene {layer} ist nicht aktiviert. Aktivieren Sie diese Ebene, um einen Punkt hinzuzufügen"} ),
 | 
					      layerNotEnabled: new Translation( {"en":"The layer {layer} is not enabled. Enable this layer to add a point","ca":"La capa {layer} no està habilitada. Fes-ho per poder afegir un punt a aquesta capa","es":"La capa {layer} no está habilitada. Hazlo para poder añadir un punto en esta capa","nl":"De laag {layer} is gedeactiveerd. Activeer deze om een punt toe te voegn","de":"Die Ebene {layer} ist nicht aktiviert. Aktivieren Sie diese Ebene, um einen Punkt hinzuzufügen"} ),
 | 
				
			||||||
},
 | 
					},
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -126,7 +126,17 @@ export interface LayerConfigJson {
 | 
				
			||||||
    passAllFeatures?:boolean
 | 
					    passAllFeatures?:boolean
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Presets for this layer
 | 
					     * Presets for this layer.
 | 
				
			||||||
 | 
					     * A preset shows up when clicking the map on a without data (or when right-clicking/long-pressing);
 | 
				
			||||||
 | 
					     * it will prompt the user to add a new point.
 | 
				
			||||||
 | 
					     * 
 | 
				
			||||||
 | 
					     * The most important aspect are the tags, which define which tags the new point will have;
 | 
				
			||||||
 | 
					     * The title is shown in the dialog, along with the first sentence of the description.
 | 
				
			||||||
 | 
					     * 
 | 
				
			||||||
 | 
					     * Upon confirmation, the full description is shown beneath the buttons - perfect to add pictures and examples.
 | 
				
			||||||
 | 
					     * 
 | 
				
			||||||
 | 
					     * Note: the icon of the preset is determined automatically based on the tags and the icon above. Don't worry about that!
 | 
				
			||||||
 | 
					     * NB: if no presets are defined, the popup to add new points doesn't show up at all
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    presets?: {
 | 
					    presets?: {
 | 
				
			||||||
        title: string | any,
 | 
					        title: string | any,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								State.ts
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								State.ts
									
										
									
									
									
								
							| 
						 | 
					@ -24,7 +24,7 @@ export default class State {
 | 
				
			||||||
    // The singleton of the global state
 | 
					    // The singleton of the global state
 | 
				
			||||||
    public static state: State;
 | 
					    public static state: State;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static vNumber = "0.2.5-rc2";
 | 
					    public static vNumber = "0.2.5";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // The user journey states thresholds when a new feature gets unlocked
 | 
					    // The user journey states thresholds when a new feature gets unlocked
 | 
				
			||||||
    public static userJourney = {
 | 
					    public static userJourney = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,6 +28,7 @@ export class SimpleAddUI extends UIElement {
 | 
				
			||||||
    }>
 | 
					    }>
 | 
				
			||||||
        = new UIEventSource(undefined);
 | 
					        = new UIEventSource(undefined);
 | 
				
			||||||
    private confirmButton: UIElement = undefined;
 | 
					    private confirmButton: UIElement = undefined;
 | 
				
			||||||
 | 
					    private _confirmDescription: UIElement = undefined;
 | 
				
			||||||
    private openLayerControl: UIElement;
 | 
					    private openLayerControl: UIElement;
 | 
				
			||||||
    private cancelButton: UIElement;
 | 
					    private cancelButton: UIElement;
 | 
				
			||||||
    private goToInboxButton: UIElement = new SubtleButton(Svg.envelope_ui(), 
 | 
					    private goToInboxButton: UIElement = new SubtleButton(Svg.envelope_ui(), 
 | 
				
			||||||
| 
						 | 
					@ -69,7 +70,7 @@ export class SimpleAddUI extends UIElement {
 | 
				
			||||||
                            "<b>",
 | 
					                            "<b>",
 | 
				
			||||||
                            preset.title,
 | 
					                            preset.title,
 | 
				
			||||||
                            "</b>",
 | 
					                            "</b>",
 | 
				
			||||||
                            preset.description !== undefined ? new Combine(["<br/>", preset.description]) : "",
 | 
					                            preset.description !== undefined ? new Combine(["<br/>", preset.description.FirstSentence()]) : "",
 | 
				
			||||||
                            tagInfo
 | 
					                            tagInfo
 | 
				
			||||||
                        ])
 | 
					                        ])
 | 
				
			||||||
                    ).onClick(
 | 
					                    ).onClick(
 | 
				
			||||||
| 
						 | 
					@ -78,9 +79,9 @@ export class SimpleAddUI extends UIElement {
 | 
				
			||||||
                                new Combine([
 | 
					                                new Combine([
 | 
				
			||||||
                                    "<b>",
 | 
					                                    "<b>",
 | 
				
			||||||
                                    Translations.t.general.add.confirmButton.Subs({category: preset.title}),
 | 
					                                    Translations.t.general.add.confirmButton.Subs({category: preset.title}),
 | 
				
			||||||
                                    "</b><br/>",
 | 
					                                    "</b>"]));
 | 
				
			||||||
                                    preset.description !== undefined ? preset.description : ""]));
 | 
					 | 
				
			||||||
                            self.confirmButton.onClick(self.CreatePoint(preset.tags, layer));
 | 
					                            self.confirmButton.onClick(self.CreatePoint(preset.tags, layer));
 | 
				
			||||||
 | 
					                            self._confirmDescription = preset.description;
 | 
				
			||||||
                            self._confirmPreset.setData({
 | 
					                            self._confirmPreset.setData({
 | 
				
			||||||
                                tags: preset.tags,
 | 
					                                tags: preset.tags,
 | 
				
			||||||
                                layerToAddTo: layer,
 | 
					                                layerToAddTo: layer,
 | 
				
			||||||
| 
						 | 
					@ -148,6 +149,7 @@ export class SimpleAddUI extends UIElement {
 | 
				
			||||||
                userDetails.data.dryRun ? "<span class='alert'>TESTING - changes won't be saved</span>" : "",
 | 
					                userDetails.data.dryRun ? "<span class='alert'>TESTING - changes won't be saved</span>" : "",
 | 
				
			||||||
                this.confirmButton,
 | 
					                this.confirmButton,
 | 
				
			||||||
                this.cancelButton,
 | 
					                this.cancelButton,
 | 
				
			||||||
 | 
					                this._confirmDescription,
 | 
				
			||||||
                tagInfo
 | 
					                tagInfo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ]).Render();
 | 
					            ]).Render();
 | 
				
			||||||
| 
						 | 
					@ -190,7 +192,7 @@ export class SimpleAddUI extends UIElement {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (State.state.locationControl.data.zoom < State.userJourney.minZoomLevelToAddNewPoints) {
 | 
					        if (State.state.locationControl.data.zoom < State.userJourney.minZoomLevelToAddNewPoints) {
 | 
				
			||||||
            return new Combine([header, Translations.t.general.add.zoomInFurther]).Render()
 | 
					            return new Combine([header, Translations.t.general.add.zoomInFurther.SetClass("alert")]).Render()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (State.state.layerUpdater.runningQuery.data) {
 | 
					        if (State.state.layerUpdater.runningQuery.data) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -526,7 +526,11 @@
 | 
				
			||||||
        "amenity=bicycle_repair_station",
 | 
					        "amenity=bicycle_repair_station",
 | 
				
			||||||
        "service:bicycle:tools=no",
 | 
					        "service:bicycle:tools=no",
 | 
				
			||||||
        "service:bicycle:pump=yes"
 | 
					        "service:bicycle:pump=yes"
 | 
				
			||||||
      ]
 | 
					      ],
 | 
				
			||||||
 | 
					      "description": {
 | 
				
			||||||
 | 
					        "en": "A device to inflate your tires on a fixed location in the public space.<h3>Examples of bicycle pumps</h3><img src='./assets/layers/bike_repair_station/pump_example_manual.jpg' height='200'/><img src='./assets/layers/bike_repair_station/pump_example.png' height='200'/><img src='./assets/layers/bike_repair_station/pump_example_round.jpg' height='200'/>",
 | 
				
			||||||
 | 
					        "nl": "Een apparaat waar je je fietsbanden kan oppompen, beschikbaar in de publieke ruimte. De fietspomp in je kelder telt dus niet.<h3>Voorbeelden</h3><img src='./assets/layers/bike_repair_station/pump_example_manual.jpg' height='200'/><img src='./assets/layers/bike_repair_station/pump_example.png' height='200'/><img src='./assets/layers/bike_repair_station/pump_example_round.jpg' height='200'/>"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "title": {
 | 
					      "title": {
 | 
				
			||||||
| 
						 | 
					@ -540,7 +544,11 @@
 | 
				
			||||||
        "amenity=bicycle_repair_station",
 | 
					        "amenity=bicycle_repair_station",
 | 
				
			||||||
        "service:bicycle:tools=yes",
 | 
					        "service:bicycle:tools=yes",
 | 
				
			||||||
        "service:bicycle:pump=yes"
 | 
					        "service:bicycle:pump=yes"
 | 
				
			||||||
      ]
 | 
					      ],
 | 
				
			||||||
 | 
					      "description": {
 | 
				
			||||||
 | 
					        "en": "A device with tools to repair your bike combined with a pump at a fixed location. The tools are often secured with chains against theft.<h3>Example</h3><img src='./assets/layers/bike_repair_station/repair_station_example.jpg' height='200'/>",
 | 
				
			||||||
 | 
					        "nl": "Een apparaat met zowel gereedschap om je fiets te herstellen, met een pomp. Deze zijn op een vastgemaakt op een plaats in de publieke ruimte, bv. aan een paal.<h3>Voorbeeld</h3><img src='./assets/layers/bike_repair_station/repair_station_example.jpg' height='200'/>"
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "title": {
 | 
					      "title": {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								assets/layers/bike_repair_station/pump_example.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/layers/bike_repair_station/pump_example.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 247 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								assets/layers/bike_repair_station/pump_example_manual.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/layers/bike_repair_station/pump_example_manual.jpg
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 942 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								assets/layers/bike_repair_station/pump_example_round.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/layers/bike_repair_station/pump_example_round.jpg
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 67 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								assets/layers/bike_repair_station/repair_station_example.jpg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/layers/bike_repair_station/repair_station_example.jpg
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 760 KiB  | 
| 
						 | 
					@ -341,7 +341,7 @@
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "hideUnderlayingFeaturesMinPercentage": 10,
 | 
					  "hideUnderlayingFeaturesMinPercentage": 10,
 | 
				
			||||||
  "wayHandling": 1,
 | 
					  "wayHandling": 2,
 | 
				
			||||||
  "icon": {
 | 
					  "icon": {
 | 
				
			||||||
    "render": "./assets/themes/buurtnatuur/nature_reserve.svg"
 | 
					    "render": "./assets/themes/buurtnatuur/nature_reserve.svg"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -351,10 +351,10 @@
 | 
				
			||||||
        "de": "<h3>Hier einen {title} hinzufügen?</h3>Der Punkt, den Sie hier anlegen, wird <b>für alle sichtbar sein</b>. Bitte fügen Sie der Karte nur dann Dinge hinzu, wenn sie wirklich existieren. Viele Anwendungen verwenden diese Daten."
 | 
					        "de": "<h3>Hier einen {title} hinzufügen?</h3>Der Punkt, den Sie hier anlegen, wird <b>für alle sichtbar sein</b>. Bitte fügen Sie der Karte nur dann Dinge hinzu, wenn sie wirklich existieren. Viele Anwendungen verwenden diese Daten."
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "confirmButton": {
 | 
					      "confirmButton": {
 | 
				
			||||||
        "en": "Add a {category} here",
 | 
					        "en": "Add a {category} here.<br/><div class='alert'>Your addition is visble for everyone</div>",
 | 
				
			||||||
        "ca": "Afegir {category} aquí",
 | 
					        "ca": "Afegir {category} aquí",
 | 
				
			||||||
        "es": "Añadir {category} aquí",
 | 
					        "es": "Añadir {category} aquí",
 | 
				
			||||||
        "nl": "Voeg hier een {category} toe",
 | 
					        "nl": "Voeg hier een {category} toe<br/><div class='alert'>Je toevoeging is voor iedereen zichtbaar</div>",
 | 
				
			||||||
        "fr": "Ajouter un/une {category} ici",
 | 
					        "fr": "Ajouter un/une {category} ici",
 | 
				
			||||||
        "gl": "Engadir {category} aquí",
 | 
					        "gl": "Engadir {category} aquí",
 | 
				
			||||||
        "de": "Hier eine {category} hinzufügen"
 | 
					        "de": "Hier eine {category} hinzufügen"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue