Bump version, add toast

This commit is contained in:
Fred Boniface 2024-07-01 16:07:08 +01:00
parent f93113ec14
commit d09b24655a
3 changed files with 10 additions and 2 deletions

View File

@ -3,6 +3,8 @@
import { apiGet } from "$lib/scripts/apiFetch"; import { apiGet } from "$lib/scripts/apiFetch";
import { getCurrentLocation } from "$lib/scripts/getLocation"; import { getCurrentLocation } from "$lib/scripts/getLocation";
import { location } from "$lib/stores/location"; import { location } from "$lib/stores/location";
import { uuid } from "$lib/stores/uuid";
import toast from "svelte-french-toast";
//import { NearestStationResponse } from "@owlboard/ts-types"; //import { NearestStationResponse } from "@owlboard/ts-types";
export let variables = { export let variables = {
title: "Near to Me", title: "Near to Me",
@ -10,6 +12,7 @@
function turnOnLocation() { function turnOnLocation() {
location.set(true); location.set(true);
toast("To disable location, go to settings")
} }
async function getNearestStations() { async function getNearestStations() {

View File

@ -1,3 +1,3 @@
export const version: string = "2024.06.5"; export const version: string = "2024.07.1";
export const versionTag: string = ""; export const versionTag: string = "";
export const showWelcome: boolean = false; export const showWelcome: boolean = false;

View File

@ -5,11 +5,16 @@
import Island from "$lib/islands/island.svelte"; import Island from "$lib/islands/island.svelte";
import { location } from "$lib/stores/location"; import { location } from "$lib/stores/location";
import { getCurrentLocation } from "$lib/scripts/getLocation"; import { getCurrentLocation } from "$lib/scripts/getLocation";
import toast from "svelte-french-toast";
const title = "Settings"; const title = "Settings";
$: if ($location) { $: if ($location) {
getCurrentLocation() getCurrentLocation()
} }
function locationToast() {
toast("Settings updated")
}
</script> </script>
<Header {title} /> <Header {title} />
@ -20,7 +25,7 @@
<p>Use your location to quickly check departure boards near you</p> <p>Use your location to quickly check departure boards near you</p>
<div class="checkbox-container"> <div class="checkbox-container">
<label for="location_enable">Enabled</label> <label for="location_enable">Enabled</label>
<input id="location_enable" type="checkbox" bind:checked={$location}> <input id="location_enable" type="checkbox" bind:checked={$location} on:click={locationToast}>
</div> </div>
</Island> </Island>