forked from MapComplete/MapComplete
		
	Import button only shows up when logged in
This commit is contained in:
		
							parent
							
								
									dc4174047a
								
							
						
					
					
						commit
						4295f4a9be
					
				
					 1 changed files with 14 additions and 1 deletions
				
			
		|  | @ -54,6 +54,19 @@ export default class ImportButton extends Toggle { | |||
|             new Combine([button, appliedTags]).SetClass("flex flex-col"), | ||||
|             State.state.featurePipeline.runningQuery | ||||
|         ) | ||||
|         super(t.hasBeenImported, withLoadingCheck, isImported) | ||||
|         const importButton = new Toggle(t.hasBeenImported, withLoadingCheck, isImported) | ||||
| 
 | ||||
|         const pleaseLoginButton = | ||||
|             new Toggle(t.pleaseLogin.Clone() | ||||
|                     .onClick(() => State.state.osmConnection.AttemptLogin()) | ||||
|                     .SetClass("login-button-friendly"), | ||||
|                 undefined, | ||||
|                 State.state.featureSwitchUserbadge) | ||||
|              | ||||
| 
 | ||||
|         super(importButton, | ||||
|             pleaseLoginButton, | ||||
|             State.state.osmConnection.isLoggedIn | ||||
|         ) | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue