forked from MapComplete/MapComplete
		
	Style: styling tweaks to plantnet flow
This commit is contained in:
		
							parent
							
								
									580b58e86a
								
							
						
					
					
						commit
						5da56d8fa5
					
				
					 5 changed files with 8 additions and 11 deletions
				
			
		|  | @ -74,8 +74,7 @@ | ||||||
|     "images", |     "images", | ||||||
|     { |     { | ||||||
|       "id": "plantnet", |       "id": "plantnet", | ||||||
|       "render": "{plantnet_detection()}", |       "render": "{plantnet_detection()}" | ||||||
|       "condition": "species:wikidata=" |  | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       "id": "tree-species-wikidata", |       "id": "tree-species-wikidata", | ||||||
|  |  | ||||||
|  | @ -99,11 +99,11 @@ | ||||||
| 
 | 
 | ||||||
|         <WikipediaPanel wikiIds={new ImmutableStore([selectedOption])} /> |         <WikipediaPanel wikiIds={new ImmutableStore([selectedOption])} /> | ||||||
|       </div> |       </div> | ||||||
|       <div class="flex justify-between"> |       <div class="flex flex-col items-stretch"> | ||||||
|         <BackButton on:click={() => {selectedOption = undefined}}> |         <BackButton on:click={() => {selectedOption = undefined}}> | ||||||
|           <Tr t={t.back} /> |           <Tr t={t.back} /> | ||||||
|         </BackButton> |         </BackButton> | ||||||
|         <NextButton clss="primary shrink-0" on:click={() => { done = true; onConfirm(selectedOption); }} > |         <NextButton clss="primary" on:click={() => { done = true; onConfirm(selectedOption); }} > | ||||||
|           <Tr t={t.confirm} /> |           <Tr t={t.confirm} /> | ||||||
|         </NextButton> |         </NextButton> | ||||||
|       </div> |       </div> | ||||||
|  | @ -115,8 +115,8 @@ | ||||||
|       <Tr t={t.tryAgain} /> |       <Tr t={t.tryAgain} /> | ||||||
|     </BackButton> |     </BackButton> | ||||||
|   {/if} |   {/if} | ||||||
|   <div class="flex p-2 bg-gray-200 rounded-xl self-end"> |   <div class="flex p-2 low-interaction rounded-xl self-end"> | ||||||
|     <ToSvelte construct={Svg.plantnet_logo_svg().SetClass("w-10 h-10 pr-1 mr-1 bg-white rounded-full")} /> |     <ToSvelte construct={Svg.plantnet_logo_svg().SetClass("w-8 h-8 p-1 mr-1 bg-white rounded-full")} /> | ||||||
|     <Tr t={t.poweredByPlantnet} /> |     <Tr t={t.poweredByPlantnet} /> | ||||||
|   </div> |   </div> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -36,9 +36,7 @@ const wikidataId: Store<string> = UIEventSource.FromPromise( | ||||||
| ).mapD(wd => wd[0]?.species?.value); | ).mapD(wd => wd[0]?.species?.value); | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <NextButton on:click={() =>{  | <NextButton on:click={() => dispatch("selected", $wikidataId)}> | ||||||
|   console.log("Dispatching: ", $wikidataId) |  | ||||||
|   return dispatch("selected", $wikidataId); }}> |  | ||||||
|   {#if $wikidata === undefined} |   {#if $wikidata === undefined} | ||||||
|     <Loading> |     <Loading> | ||||||
|       <Tr t={ t.loadingWikidata.Subs({ |       <Tr t={ t.loadingWikidata.Subs({ | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ | ||||||
|   export let layer: LayerConfig; |   export let layer: LayerConfig; | ||||||
| 
 | 
 | ||||||
|   export let linkable = true; |   export let linkable = true; | ||||||
|   let isLinked = false; |   let isLinked = Object.values(tags.data).some(v => image.pictureUrl === v); | ||||||
| 
 | 
 | ||||||
|   const t = Translations.t.image.nearby; |   const t = Translations.t.image.nearby; | ||||||
|   const c = [lon, lat]; |   const c = [lon, lat]; | ||||||
|  | @ -35,6 +35,7 @@ | ||||||
|     date: new Date(image.date) |     date: new Date(image.date) | ||||||
|   }); |   }); | ||||||
|   let distance = Math.round(GeoOperations.distanceBetween([image.coordinates.lng, image.coordinates.lat], c)); |   let distance = Math.round(GeoOperations.distanceBetween([image.coordinates.lng, image.coordinates.lat], c)); | ||||||
|  |    | ||||||
|   $: { |   $: { | ||||||
|     const currentTags = tags.data; |     const currentTags = tags.data; | ||||||
|     const key = Object.keys(image.osmTags)[0]; |     const key = Object.keys(image.osmTags)[0]; | ||||||
|  |  | ||||||
|  | @ -1,6 +1,5 @@ | ||||||
| import { Store, UIEventSource } from "../../Logic/UIEventSource" | import { Store, UIEventSource } from "../../Logic/UIEventSource" | ||||||
| import { ProvidedImage } from "../../Logic/ImageProviders/ImageProvider" | import { ProvidedImage } from "../../Logic/ImageProviders/ImageProvider" | ||||||
| import PlantNetSpeciesSearch from "../BigComponents/PlantNetSpeciesSearch" |  | ||||||
| import Wikidata from "../../Logic/Web/Wikidata" | import Wikidata from "../../Logic/Web/Wikidata" | ||||||
| import ChangeTagAction from "../../Logic/Osm/Actions/ChangeTagAction" | import ChangeTagAction from "../../Logic/Osm/Actions/ChangeTagAction" | ||||||
| import { And } from "../../Logic/Tags/And" | import { And } from "../../Logic/Tags/And" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue