forked from MapComplete/MapComplete
		
	UX: remove some unneeded UI in the favourite pane if one didn't mark favourites yes
This commit is contained in:
		
							parent
							
								
									003d1167ae
								
							
						
					
					
						commit
						60898a868c
					
				
					 2 changed files with 22 additions and 17 deletions
				
			
		|  | @ -22,7 +22,7 @@ | ||||||
|       JSON.stringify(contents), |       JSON.stringify(contents), | ||||||
|       "mapcomplete-favourites-" + new Date().toISOString() + ".geojson", |       "mapcomplete-favourites-" + new Date().toISOString() + ".geojson", | ||||||
|       { |       { | ||||||
|         mimetype: "application/vnd.geo+json", |         mimetype: "application/vnd.geo+json" | ||||||
|       } |       } | ||||||
|     ) |     ) | ||||||
|   } |   } | ||||||
|  | @ -33,7 +33,7 @@ | ||||||
|       gpx, |       gpx, | ||||||
|       "mapcomplete-favourites-" + new Date().toISOString() + ".gpx", |       "mapcomplete-favourites-" + new Date().toISOString() + ".gpx", | ||||||
|       { |       { | ||||||
|         mimetype: "{gpx=application/gpx+xml}", |         mimetype: "{gpx=application/gpx+xml}" | ||||||
|       } |       } | ||||||
|     ) |     ) | ||||||
|   } |   } | ||||||
|  | @ -46,14 +46,18 @@ | ||||||
|     </LoginButton> |     </LoginButton> | ||||||
|   </div> |   </div> | ||||||
| 
 | 
 | ||||||
|   <div class="flex flex-col" on:keypress={(e) => console.log("Got keypress", e)}> |   <div class="flex flex-col"> | ||||||
|  |     {#if $favourites.length === 0} | ||||||
|  |       <Tr t={Translations.t.favouritePoi.noneYet} /> | ||||||
|  |     {:else} | ||||||
|       <Tr t={Translations.t.favouritePoi.intro.Subs({ length: $favourites?.length ?? 0 })} /> |       <Tr t={Translations.t.favouritePoi.intro.Subs({ length: $favourites?.length ?? 0 })} /> | ||||||
|       <Tr t={Translations.t.favouritePoi.introPrivacy} /> |       <Tr t={Translations.t.favouritePoi.introPrivacy} /> | ||||||
| 
 |     {/if} | ||||||
|     {#each $favourites as feature (feature.properties.id)} |     {#each $favourites as feature (feature.properties.id)} | ||||||
|       <FavouriteSummary {feature} {state} /> |       <FavouriteSummary {feature} {state} /> | ||||||
|     {/each} |     {/each} | ||||||
| 
 | 
 | ||||||
|  |     {#if $favourites.length > 0} | ||||||
|       <div class="mt-8 flex"> |       <div class="mt-8 flex"> | ||||||
|         <button on:click={() => downloadGeojson()}> |         <button on:click={() => downloadGeojson()}> | ||||||
|           <ArrowDownTray class="h-6 w-6" /> |           <ArrowDownTray class="h-6 w-6" /> | ||||||
|  | @ -64,5 +68,6 @@ | ||||||
|           <Tr t={Translations.t.favouritePoi.downloadGpx} /> |           <Tr t={Translations.t.favouritePoi.downloadGpx} /> | ||||||
|         </button> |         </button> | ||||||
|       </div> |       </div> | ||||||
|  |     {/if} | ||||||
|   </div> |   </div> | ||||||
| </LoginToggle> | </LoginToggle> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue