forked from MapComplete/MapComplete
		
	UX: disable uploading images for now
This commit is contained in:
		
							parent
							
								
									6e3120664a
								
							
						
					
					
						commit
						b1591fc527
					
				
					 1 changed files with 41 additions and 33 deletions
				
			
		|  | @ -57,7 +57,7 @@ | ||||||
|             file, |             file, | ||||||
|             "image", |             "image", | ||||||
|             noBlur, |             noBlur, | ||||||
|             feature |             feature, | ||||||
|           ) |           ) | ||||||
|           if (!uploadResult) { |           if (!uploadResult) { | ||||||
|             return |             return | ||||||
|  | @ -78,47 +78,55 @@ | ||||||
|     } |     } | ||||||
|     errors.setData(errs) |     errors.setData(errs) | ||||||
|   } |   } | ||||||
|  | 
 | ||||||
|  |   let maintenanceBusy = true | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <LoginToggle {state}> | <LoginToggle {state}> | ||||||
|   <LoginButton clss="small w-full" osmConnection={state.osmConnection} slot="not-logged-in"> |   <LoginButton clss="small w-full" osmConnection={state.osmConnection} slot="not-logged-in"> | ||||||
|     <Tr t={Translations.t.image.pleaseLogin} /> |     <Tr t={Translations.t.image.pleaseLogin} /> | ||||||
|   </LoginButton> |   </LoginButton> | ||||||
|   <div class="my-4 flex flex-col"> |   {#if maintenanceBusy} | ||||||
|     <UploadingImageCounter {state} {tags} /> |     <div class="alert"> | ||||||
|     {#each $errors as error} |       Due to maintenance, uploading images is currently not possible. Sorry about this! | ||||||
|       <Tr t={error} cls="alert" /> |     </div> | ||||||
|     {/each} |   {:else} | ||||||
|     <FileSelector |     <div class="my-4 flex flex-col"> | ||||||
|       accept="image/*" |       <UploadingImageCounter {state} {tags} /> | ||||||
|       cls="button border-2 flex flex-col" |       {#each $errors as error} | ||||||
|       multiple={true} |         <Tr t={error} cls="alert" /> | ||||||
|       on:submit={(e) => handleFiles(e.detail)} |       {/each} | ||||||
|     > |       <FileSelector | ||||||
|       <div class="flex w-full items-center justify-center text-2xl"> |         accept="image/*" | ||||||
|         {#if image !== undefined} |         cls="button border-2 flex flex-col" | ||||||
|           <img src={image} aria-hidden="true" /> |         multiple={true} | ||||||
|         {:else} |         on:submit={(e) => handleFiles(e.detail)} | ||||||
|           <Camera class="h-12 w-12 p-1" aria-hidden="true" /> |       > | ||||||
|         {/if} |         <div class="flex w-full items-center justify-center text-2xl"> | ||||||
|         {#if labelText} |           {#if image !== undefined} | ||||||
|           {labelText} |             <img src={image} aria-hidden="true" /> | ||||||
|         {:else} |           {:else} | ||||||
|           <div class="flex flex-col"> |             <Camera class="h-12 w-12 p-1" aria-hidden="true" /> | ||||||
|             <Tr t={t.addPicture} /> |           {/if} | ||||||
|             {#if noBlur} |           {#if labelText} | ||||||
|  |             {labelText} | ||||||
|  |           {:else} | ||||||
|  |             <div class="flex flex-col"> | ||||||
|  |               <Tr t={t.addPicture} /> | ||||||
|  |               {#if noBlur} | ||||||
|               <span class="subtle text-sm"> |               <span class="subtle text-sm"> | ||||||
|                 <Tr t={t.upload.noBlur} /> |                 <Tr t={t.upload.noBlur} /> | ||||||
|               </span> |               </span> | ||||||
|             {/if} |               {/if} | ||||||
|           </div> |             </div> | ||||||
|         {/if} |           {/if} | ||||||
|  |         </div> | ||||||
|  |       </FileSelector> | ||||||
|  |       <div class="subtle text-xs italic"> | ||||||
|  |         <Tr t={Translations.t.general.attribution.panoramaxLicenseCCBYSA} /> | ||||||
|  |         <span class="mx-1">—</span> | ||||||
|  |         <Tr t={t.respectPrivacy} /> | ||||||
|       </div> |       </div> | ||||||
|     </FileSelector> |  | ||||||
|     <div class="subtle text-xs italic"> |  | ||||||
|       <Tr t={Translations.t.general.attribution.panoramaxLicenseCCBYSA} /> |  | ||||||
|       <span class="mx-1">—</span> |  | ||||||
|       <Tr t={t.respectPrivacy} /> |  | ||||||
|     </div> |     </div> | ||||||
|   </div> |   {/if} | ||||||
| </LoginToggle> | </LoginToggle> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue