forked from MapComplete/MapComplete
		
	Change 'cancel'-text in simpleUI with 'Select a different category'
This commit is contained in:
		
							parent
							
								
									5d1496ad5b
								
							
						
					
					
						commit
						3baaff1324
					
				
					 2 changed files with 12 additions and 3 deletions
				
			
		| 
						 | 
					@ -157,6 +157,10 @@ export default class SimpleAddUI extends Toggle {
 | 
				
			||||||
                    cancel,
 | 
					                    cancel,
 | 
				
			||||||
                    () => {
 | 
					                    () => {
 | 
				
			||||||
                        isShown.setData(false)
 | 
					                        isShown.setData(false)
 | 
				
			||||||
 | 
					                    },
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        cancelIcon: Svg.back_svg(),
 | 
				
			||||||
 | 
					                        cancelText: Translations.t.general.add.backToSelect
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,7 @@ import { GlobalFilter } from "../../Logic/State/MapState"
 | 
				
			||||||
import { VariableUiElement } from "../Base/VariableUIElement"
 | 
					import { VariableUiElement } from "../Base/VariableUIElement"
 | 
				
			||||||
import { Tag } from "../../Logic/Tags/Tag"
 | 
					import { Tag } from "../../Logic/Tags/Tag"
 | 
				
			||||||
import { WayId } from "../../Models/OsmFeature"
 | 
					import { WayId } from "../../Models/OsmFeature"
 | 
				
			||||||
 | 
					import {Translation} from "../i18n/Translation";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default class ConfirmLocationOfPoint extends Combine {
 | 
					export default class ConfirmLocationOfPoint extends Combine {
 | 
				
			||||||
    constructor(
 | 
					    constructor(
 | 
				
			||||||
| 
						 | 
					@ -39,7 +40,11 @@ export default class ConfirmLocationOfPoint extends Combine {
 | 
				
			||||||
            snapOntoWayId: WayId | undefined
 | 
					            snapOntoWayId: WayId | undefined
 | 
				
			||||||
        ) => void,
 | 
					        ) => void,
 | 
				
			||||||
        cancel: () => void,
 | 
					        cancel: () => void,
 | 
				
			||||||
        closePopup: () => void
 | 
					        closePopup: () => void,
 | 
				
			||||||
 | 
					        options?: {
 | 
				
			||||||
 | 
					            cancelIcon: BaseUIElement,
 | 
				
			||||||
 | 
					            cancelText?: string | Translation
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    ) {
 | 
					    ) {
 | 
				
			||||||
        let preciseInput: LocationInput = undefined
 | 
					        let preciseInput: LocationInput = undefined
 | 
				
			||||||
        if (preset.preciseInput !== undefined) {
 | 
					        if (preset.preciseInput !== undefined) {
 | 
				
			||||||
| 
						 | 
					@ -222,8 +227,8 @@ export default class ConfirmLocationOfPoint extends Combine {
 | 
				
			||||||
        const tagInfo = SimpleAddUI.CreateTagInfoFor(preset, state.osmConnection)
 | 
					        const tagInfo = SimpleAddUI.CreateTagInfoFor(preset, state.osmConnection)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const cancelButton = new SubtleButton(
 | 
					        const cancelButton = new SubtleButton(
 | 
				
			||||||
            Svg.close_ui(),
 | 
					            options?.cancelIcon ?? Svg.close_ui(),
 | 
				
			||||||
            Translations.t.general.cancel
 | 
					            options?.cancelText ?? Translations.t.general.cancel
 | 
				
			||||||
        ).onClick(cancel)
 | 
					        ).onClick(cancel)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let examples: BaseUIElement = undefined
 | 
					        let examples: BaseUIElement = undefined
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue