forked from MapComplete/MapComplete
		
	Refactoring: make needed URLs explicit
This commit is contained in:
		
							parent
							
								
									7852829f1b
								
							
						
					
					
						commit
						4852888b41
					
				
					 51 changed files with 978 additions and 871 deletions
				
			
		|  | @ -24,6 +24,7 @@ export interface ConflateFlowArguments extends ImportFlowArguments { | |||
| 
 | ||||
| export default class ConflateImportButtonViz implements SpecialVisualization, AutoAction { | ||||
|     supportsAutoAction: boolean = true | ||||
|     needsUrls = [] | ||||
|     public readonly funcName: string = "conflate_button" | ||||
|     public readonly args: { | ||||
|         name: string | ||||
|  |  | |||
|  | @ -194,10 +194,7 @@ export default abstract class ImportFlow<ArgT extends ImportFlowArguments> { | |||
|                     return { error: t.hasBeenImported } | ||||
|                 } | ||||
| 
 | ||||
|                 const usesTestUrl = | ||||
|                     this.state.osmConnection._oauth_config.url === | ||||
|                     OsmConnection.oauth_configs["osm-test"].url | ||||
|                 if (!state.layout.official && !(isTesting || usesTestUrl)) { | ||||
|                 if (!state.layout.official && !isTesting) { | ||||
|                     // Unofficial theme - imports not allowed
 | ||||
|                     return { | ||||
|                         error: t.officialThemesOnly, | ||||
|  |  | |||
|  | @ -18,6 +18,7 @@ export class PointImportButtonViz implements SpecialVisualization { | |||
|     public readonly docs: string | BaseUIElement | ||||
|     public readonly example?: string | ||||
|     public readonly args: { name: string; defaultValue?: string; doc: string }[] | ||||
|     public needsUrls = [] | ||||
| 
 | ||||
|     constructor() { | ||||
|         this.funcName = "import_button" | ||||
|  |  | |||
|  | @ -20,6 +20,7 @@ import FullNodeDatabaseSource from "../../../Logic/FeatureSource/TiledFeatureSou | |||
|  */ | ||||
| export default class WayImportButtonViz implements AutoAction, SpecialVisualization { | ||||
|     public readonly funcName: string = "import_way_button" | ||||
|     needsUrls = [] | ||||
|     public readonly docs: string = | ||||
|         "This button will copy the data from an external dataset into OpenStreetMap, copying the geometry and adding it as a 'line'" + | ||||
|         ImportFlowUtils.documentationGeneral | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue