UX: remove some unneeded UI in the favourite pane if one didn't mark favourites yes

This commit is contained in:
Pieter Vander Vennet 2024-09-10 01:11:20 +02:00
parent 003d1167ae
commit 60898a868c
2 changed files with 22 additions and 17 deletions

View file

@ -864,4 +864,4 @@
"startsWithQ": "Ein Wikidata-Identifikator beginnt mit Q und wird von einer Zahl gefolgt"
}
}
}
}

View file

@ -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 @@
</LoginButton>
</div>
<div class="flex flex-col" on:keypress={(e) => console.log("Got keypress", e)}>
<Tr t={Translations.t.favouritePoi.intro.Subs({ length: $favourites?.length ?? 0 })} />
<Tr t={Translations.t.favouritePoi.introPrivacy} />
<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.introPrivacy} />
{/if}
{#each $favourites as feature (feature.properties.id)}
<FavouriteSummary {feature} {state} />
{/each}
<div class="mt-8 flex">
<button on:click={() => downloadGeojson()}>
<ArrowDownTray class="h-6 w-6" />
<Tr t={Translations.t.favouritePoi.downloadGeojson} />
</button>
<button on:click={() => downloadGPX()}>
<ArrowDownTray class="h-6 w-6" />
<Tr t={Translations.t.favouritePoi.downloadGpx} />
</button>
</div>
{#if $favourites.length > 0}
<div class="mt-8 flex">
<button on:click={() => downloadGeojson()}>
<ArrowDownTray class="h-6 w-6" />
<Tr t={Translations.t.favouritePoi.downloadGeojson} />
</button>
<button on:click={() => downloadGPX()}>
<ArrowDownTray class="h-6 w-6" />
<Tr t={Translations.t.favouritePoi.downloadGpx} />
</button>
</div>
{/if}
</div>
</LoginToggle>