forked from MapComplete/MapComplete
		
	Core: Don't throw away changes if uploading failed, report errors
This commit is contained in:
		
							parent
							
								
									13ea16317f
								
							
						
					
					
						commit
						12fec3f312
					
				
					 10 changed files with 170 additions and 96 deletions
				
			
		|  | @ -7,6 +7,7 @@ | |||
|   import Tr from "./Tr.svelte" | ||||
|   import { ImmutableStore, UIEventSource } from "../../Logic/UIEventSource" | ||||
|   import Invalid from "../../assets/svg/Invalid.svelte" | ||||
|   import ArrowPath from "@babeard/svelte-heroicons/mini/ArrowPath" | ||||
| 
 | ||||
|   export let state: { | ||||
|     osmConnection: OsmConnection | ||||
|  | @ -40,9 +41,13 @@ | |||
|     </slot> | ||||
|   {:else if !silentFail && $loadingStatus === "error"} | ||||
|     <slot name="error"> | ||||
|       <div class="alert max-w-64 flex items-center"> | ||||
|       <div class="alert max-w-64 flex items-center "> | ||||
|         <Invalid class="m-2 h-8 w-8 shrink-0" /> | ||||
|         <Tr t={offlineModes[$apiState]} /> | ||||
|         <Tr t={offlineModes[$apiState] ?? t.loginFailedOfflineOther} /> | ||||
|         <button class="justify-self-end" on:click={() => state.osmConnection.AttemptLogin()}> | ||||
|           <ArrowPath class="w-6 h-6"/> | ||||
|           Retry | ||||
|         </button> | ||||
|       </div> | ||||
|     </slot> | ||||
|   {:else if $loadingStatus === "logged-in"} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue