feat: add hazards
Some checks failed
TrafficCue CI / check (push) Failing after 57s
TrafficCue CI / build (push) Successful in 1m41s
TrafficCue CI / build-android (push) Successful in 14m24s

This commit is contained in:
2025-09-18 13:04:34 +02:00
parent 2aed03642d
commit 93514ae5b4
7 changed files with 102 additions and 3 deletions

View File

@ -25,6 +25,8 @@
import { Tween } from "svelte/motion";
import { quintOut } from "svelte/easing";
import Progressbar from "../Progressbar.svelte";
import { postHazard } from "$lib/services/lnv";
import { fetchHazards } from "./hazards.svelte";
const views: Record<string, string> = {
main: "MainSidebar",
@ -282,6 +284,16 @@
>
{m["location.join"]()}
</Button>
<Button
variant="outline"
onclick={async () => {
await postHazard({ lat: location.lat, lon: location.lng }, "bumpy-road");
alert("Thanks for your report!");
await fetchHazards();
}}
>
Report Bumpy Road
</Button>
</div>
</Popover.Content>
</Popover.Root>