blockLoading of near to me card until stores have been read

This commit is contained in:
Fred Boniface 2024-07-12 15:26:51 +01:00
parent e3632986c2
commit 2b8d32f3c9
1 changed files with 20 additions and 14 deletions

View File

@ -15,6 +15,7 @@
let errorMessage: string;
let stations: NearestStationResponse[] = [];
let blockLoading: boolean = true;
let config: CardConfig = {
title: "Near to Me",
@ -58,10 +59,14 @@
getNearestStations();
}
}
blockLoading = false;
});
</script>
<Card {config}>
{#if blockLoading}
<InLineLoading />
{:else}
{#if !$uuid || $uuid === "null"}
<LinkButton text="Register to use this feature" link="/more/reg" />
{:else if $location}
@ -81,6 +86,7 @@
{:else}
<ScriptButton text={"Turn on Location"} fn={turnOnLocation} />
{/if}
{/if}
</Card>
<style>