Add preferences and privacy policy
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
import BaseCard from '$lib/components/ui/cards/BaseCard.svelte';
|
||||
import Button from '$lib/components/ui/form-elements/Button.svelte';
|
||||
|
||||
import { prefs } from '$lib/preferences.svelte';
|
||||
|
||||
import { fade } from 'svelte/transition';
|
||||
import { flip } from 'svelte/animate';
|
||||
|
||||
@@ -12,7 +14,9 @@
|
||||
|
||||
<BaseCard header={'Nearby Stations'}>
|
||||
<div class="card-content">
|
||||
{#if nearestStationsState.error && nearestStationsState.list.length === 0}
|
||||
{#if !prefs.current.NearToMe}
|
||||
<Button onclick={() => prefs.toggleLocation(true)}>Enable Location</Button>
|
||||
{:else if nearestStationsState.error && nearestStationsState.list.length === 0}
|
||||
<p class="msg">{nearestStationsState.error}</p>
|
||||
{:else if nearestStationsState.loading && nearestStationsState.list.length === 0}
|
||||
<p class="msg">Locating stations...</p>
|
||||
|
||||
Reference in New Issue
Block a user