Add preferences and privacy policy

This commit is contained in:
2026-05-16 21:06:29 +01:00
parent 07579310b2
commit 631d324cba
10 changed files with 457 additions and 17 deletions

View File

@@ -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>