feat(stores): location stores
This commit is contained in:
@ -22,12 +22,12 @@
|
||||
import Reviews from "../info/Reviews.svelte";
|
||||
import MapAi from "../info/MapAI.svelte";
|
||||
import RequiresCapability from "../RequiresCapability.svelte";
|
||||
import { saved, saveLocations } from "$lib/saved.svelte";
|
||||
import { getDeveloperToggle } from "./settings/developer.svelte";
|
||||
import InternetAccess from "../info/InternetAccess.svelte";
|
||||
import RestaurantInfo from "../info/RestaurantInfo.svelte";
|
||||
import { m } from "$lang/messages";
|
||||
import { onMount } from "svelte";
|
||||
import { updateStore } from "$lib/services/stores.svelte";
|
||||
|
||||
// let { feature }: { feature: Feature } = $props();
|
||||
|
||||
@ -185,12 +185,12 @@
|
||||
<Button
|
||||
variant="outline"
|
||||
onclick={() => {
|
||||
// localStorage.setItem(
|
||||
// "saved.home",
|
||||
// JSON.stringify({ lat, lon: lng }),
|
||||
// );
|
||||
saved.home = { lat, lon: lng };
|
||||
saveLocations();
|
||||
updateStore({ name: "home", type: "location" }, {
|
||||
lat,
|
||||
lng,
|
||||
name: "home",
|
||||
icon: "home"
|
||||
})
|
||||
}}
|
||||
>
|
||||
<HomeIcon />
|
||||
@ -199,8 +199,12 @@
|
||||
<Button
|
||||
variant="outline"
|
||||
onclick={() => {
|
||||
saved.school = { lat, lon: lng };
|
||||
saveLocations();
|
||||
updateStore({ name: "school", type: "location" }, {
|
||||
lat,
|
||||
lng,
|
||||
name: "school",
|
||||
icon: "school"
|
||||
})
|
||||
}}
|
||||
>
|
||||
<SchoolIcon />
|
||||
@ -209,12 +213,12 @@
|
||||
<Button
|
||||
variant="outline"
|
||||
onclick={() => {
|
||||
// localStorage.setItem(
|
||||
// "saved.work",
|
||||
// JSON.stringify({ lat, lon: lng }),
|
||||
// );
|
||||
saved.work = { lat, lon: lng };
|
||||
saveLocations();
|
||||
updateStore({ name: "work", type: "location" }, {
|
||||
lat,
|
||||
lng,
|
||||
name: "work",
|
||||
icon: "work"
|
||||
})
|
||||
}}
|
||||
>
|
||||
<BriefcaseIcon />
|
||||
|
||||
Reference in New Issue
Block a user