From 5da56d8fa565cf96ed6aaa6e7ee21c6b809eb169 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 21 Sep 2023 12:13:42 +0200 Subject: [PATCH] Style: styling tweaks to plantnet flow --- assets/layers/tree_node/tree_node.json | 3 +-- src/UI/PlantNet/PlantNet.svelte | 8 ++++---- src/UI/PlantNet/SpeciesButton.svelte | 4 +--- src/UI/Popup/LinkableImage.svelte | 3 ++- src/UI/Popup/PlantNetDetectionViz.ts | 1 - 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/assets/layers/tree_node/tree_node.json b/assets/layers/tree_node/tree_node.json index 744cdc62d..67593332e 100644 --- a/assets/layers/tree_node/tree_node.json +++ b/assets/layers/tree_node/tree_node.json @@ -74,8 +74,7 @@ "images", { "id": "plantnet", - "render": "{plantnet_detection()}", - "condition": "species:wikidata=" + "render": "{plantnet_detection()}" }, { "id": "tree-species-wikidata", diff --git a/src/UI/PlantNet/PlantNet.svelte b/src/UI/PlantNet/PlantNet.svelte index 170c7fc18..b828de04b 100644 --- a/src/UI/PlantNet/PlantNet.svelte +++ b/src/UI/PlantNet/PlantNet.svelte @@ -99,11 +99,11 @@ -
+
{selectedOption = undefined}}> - { done = true; onConfirm(selectedOption); }} > + { done = true; onConfirm(selectedOption); }} >
@@ -115,8 +115,8 @@ {/if} -
- +
+
diff --git a/src/UI/PlantNet/SpeciesButton.svelte b/src/UI/PlantNet/SpeciesButton.svelte index de7f87333..9e3a44b91 100644 --- a/src/UI/PlantNet/SpeciesButton.svelte +++ b/src/UI/PlantNet/SpeciesButton.svelte @@ -36,9 +36,7 @@ const wikidataId: Store = UIEventSource.FromPromise( ).mapD(wd => wd[0]?.species?.value); -{ - console.log("Dispatching: ", $wikidataId) - return dispatch("selected", $wikidataId); }}> + dispatch("selected", $wikidataId)}> {#if $wikidata === undefined} 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]; diff --git a/src/UI/Popup/PlantNetDetectionViz.ts b/src/UI/Popup/PlantNetDetectionViz.ts index 69397cabd..ed5a7acc4 100644 --- a/src/UI/Popup/PlantNetDetectionViz.ts +++ b/src/UI/Popup/PlantNetDetectionViz.ts @@ -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"