From 60898a868c1a68dad025cc70d29e6c9f5722bc45 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 10 Sep 2024 01:11:20 +0200 Subject: [PATCH] UX: remove some unneeded UI in the favourite pane if one didn't mark favourites yes --- langs/de.json | 2 +- src/UI/Favourites/Favourites.svelte | 37 ++++++++++++++++------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/langs/de.json b/langs/de.json index 16671edcb1..9e7858bd4d 100644 --- a/langs/de.json +++ b/langs/de.json @@ -864,4 +864,4 @@ "startsWithQ": "Ein Wikidata-Identifikator beginnt mit Q und wird von einer Zahl gefolgt" } } -} +} \ No newline at end of file diff --git a/src/UI/Favourites/Favourites.svelte b/src/UI/Favourites/Favourites.svelte index c4baeb7047..580beb5d3b 100644 --- a/src/UI/Favourites/Favourites.svelte +++ b/src/UI/Favourites/Favourites.svelte @@ -22,7 +22,7 @@ JSON.stringify(contents), "mapcomplete-favourites-" + new Date().toISOString() + ".geojson", { - mimetype: "application/vnd.geo+json", + mimetype: "application/vnd.geo+json" } ) } @@ -33,7 +33,7 @@ gpx, "mapcomplete-favourites-" + new Date().toISOString() + ".gpx", { - mimetype: "{gpx=application/gpx+xml}", + mimetype: "{gpx=application/gpx+xml}" } ) } @@ -46,23 +46,28 @@ -
console.log("Got keypress", e)}> - - - +
+ {#if $favourites.length === 0} + + {:else} + + + {/if} {#each $favourites as feature (feature.properties.id)} {/each} -
- - -
+ {#if $favourites.length > 0} +
+ + +
+ {/if}