Style: styling tweaks to plantnet flow

This commit is contained in:
Pieter Vander Vennet 2023-09-21 12:13:42 +02:00
parent 580b58e86a
commit 5da56d8fa5
5 changed files with 8 additions and 11 deletions

View file

@ -74,8 +74,7 @@
"images",
{
"id": "plantnet",
"render": "{plantnet_detection()}",
"condition": "species:wikidata="
"render": "{plantnet_detection()}"
},
{
"id": "tree-species-wikidata",

View file

@ -99,11 +99,11 @@
<WikipediaPanel wikiIds={new ImmutableStore([selectedOption])} />
</div>
<div class="flex justify-between">
<div class="flex flex-col items-stretch">
<BackButton on:click={() => {selectedOption = undefined}}>
<Tr t={t.back} />
</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} />
</NextButton>
</div>
@ -115,8 +115,8 @@
<Tr t={t.tryAgain} />
</BackButton>
{/if}
<div class="flex p-2 bg-gray-200 rounded-xl self-end">
<ToSvelte construct={Svg.plantnet_logo_svg().SetClass("w-10 h-10 pr-1 mr-1 bg-white rounded-full")} />
<div class="flex p-2 low-interaction rounded-xl self-end">
<ToSvelte construct={Svg.plantnet_logo_svg().SetClass("w-8 h-8 p-1 mr-1 bg-white rounded-full")} />
<Tr t={t.poweredByPlantnet} />
</div>

View file

@ -36,9 +36,7 @@ const wikidataId: Store<string> = UIEventSource.FromPromise(
).mapD(wd => wd[0]?.species?.value);
</script>
<NextButton on:click={() =>{
console.log("Dispatching: ", $wikidataId)
return dispatch("selected", $wikidataId); }}>
<NextButton on:click={() => dispatch("selected", $wikidataId)}>
{#if $wikidata === undefined}
<Loading>
<Tr t={ t.loadingWikidata.Subs({

View file

@ -25,7 +25,7 @@
export let layer: LayerConfig;
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 c = [lon, lat];
@ -35,6 +35,7 @@
date: new Date(image.date)
});
let distance = Math.round(GeoOperations.distanceBetween([image.coordinates.lng, image.coordinates.lat], c));
$: {
const currentTags = tags.data;
const key = Object.keys(image.osmTags)[0];

View file

@ -1,6 +1,5 @@
import { Store, UIEventSource } from "../../Logic/UIEventSource"
import { ProvidedImage } from "../../Logic/ImageProviders/ImageProvider"
import PlantNetSpeciesSearch from "../BigComponents/PlantNetSpeciesSearch"
import Wikidata from "../../Logic/Web/Wikidata"
import ChangeTagAction from "../../Logic/Osm/Actions/ChangeTagAction"
import { And } from "../../Logic/Tags/And"