forked from MapComplete/MapComplete
		
	UX: indicate loading state when rechecking on the status page
This commit is contained in:
		
							parent
							
								
									2af6448156
								
							
						
					
					
						commit
						1f9b849bd3
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -19,6 +19,7 @@ | ||||||
|     const src = new UIEventSource(undefined) |     const src = new UIEventSource(undefined) | ||||||
| 
 | 
 | ||||||
|     function check() { |     function check() { | ||||||
|  |       src.setData(undefined) | ||||||
|       const promise = raw ? Utils.download(url) : Utils.downloadJson(url) |       const promise = raw ? Utils.download(url) : Utils.downloadJson(url) | ||||||
|       promise?.then((d) => src.setData({ success: d }))?.catch((err) => src.setData({ error: err })) |       promise?.then((d) => src.setData({ success: d }))?.catch((err) => src.setData({ error: err })) | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue