UX: explicitly indicate that geolocation was refused, see #1583

This commit is contained in:
Pieter Vander Vennet 2023-09-26 01:24:26 +02:00
parent 53918f2044
commit 7852829f1b
2 changed files with 9 additions and 2 deletions

View file

@ -197,6 +197,7 @@
"example": "Example",
"examples": "Examples",
"fewChangesBefore": "Please, answer a few questions of existing features before adding a new feature.",
"geopermissionDenied": "Using the geolocation was denied",
"getStartedLogin": "Log in with OpenStreetMap to get started",
"getStartedNewAccount": " or <a href='https://www.openstreetmap.org/user/new' target='_blank'>create a new account</a>",
"goToInbox": "Open inbox",

View file

@ -74,11 +74,17 @@
<ToSvelte construct={Svg.crosshair_svg().SetClass("w-8 h-8").SetClass("animate-spin")} />
<Tr t={Translations.t.general.waitingForGeopermission} />
</button>
{:else if $geopermission !== "denied"}
{:else if $geopermission === "denied"}
<button class="flex w-full items-center gap-x-2 disabled">
<ToSvelte construct={Svg.crosshair_svg().SetClass("w-8 h-8").SetClass("motion-safe:animate-spin")} />
<ToSvelte construct={Svg.location_refused_svg().SetClass("w-8 h-8")} />
<Tr t={Translations.t.general.geopermissionDenied} />
</button>
{:else }
<button class="flex w-full items-center gap-x-2 disabled">
<ToSvelte construct={Svg.crosshair_svg().SetClass("w-8 h-8").SetClass("animate-spin")} />
<Tr t={Translations.t.general.waitingForLocation} />
</button>
{/if}
<div class=".button low-interaction m-1 flex w-full items-center gap-x-2 rounded border p-2">