diff --git a/messages/de.json b/messages/de.json index ec795e4..149d9e9 100644 --- a/messages/de.json +++ b/messages/de.json @@ -5,7 +5,8 @@ "home": "Heim", "school": "Schule", "work": "Arbeit", - "no-location": "Kein {name} Speicherort gespeichert." + "no-location": "Kein {name} Speicherort gespeichert.", + "saved-routes": "Gespeicherte Routen" }, "location": { "unlock": "Standort entsperren", @@ -136,6 +137,11 @@ "description": "TrafficCue ist auf Android verfügbar. Holen Sie es sich für das beste Erlebnis!", "button": "Runterladen" } + }, + "nearby-poi": { + "header": "POIs in der Nähe", + "no-poi": "Keine POIs in der Nähe gefunden.", + "loading": "POIs in der Nähe werden geladen …" } }, "location-selector": { @@ -143,5 +149,10 @@ "searching": "Suchen...", "no-results": "Keine Orte gefunden." }, - "unsave": "Löschen" + "unsave": "Löschen", + "unnamed": "Unbenannt", + "poi": { + "fuel": "Tankstelle", + "parking": "Parken" + } } diff --git a/messages/en.json b/messages/en.json index 003c904..aaf46ac 100644 --- a/messages/en.json +++ b/messages/en.json @@ -137,6 +137,11 @@ "description": "TrafficCue is available on Android. Get it for the best experience!", "button": "Get it" } + }, + "nearby-poi": { + "header": "Nearby Points of Interest", + "no-poi": "No points of interest found nearby.", + "loading": "Loading nearby points of interest..." } }, "unsave": "Unsave", @@ -144,5 +149,10 @@ "current": "Current Location", "searching": "Searching...", "no-results": "No locations found." + }, + "unnamed": "Unnamed", + "poi": { + "fuel": "Fuel Station", + "parking": "Parking" } } diff --git a/src/lib/components/lnv/Sidebar.svelte b/src/lib/components/lnv/Sidebar.svelte index e394b6b..0d0817c 100644 --- a/src/lib/components/lnv/Sidebar.svelte +++ b/src/lib/components/lnv/Sidebar.svelte @@ -39,6 +39,7 @@ language: "settings/LanguageSidebar", onboarding: "onboarding/OnboardingSidebar", "onboarding-vehicles": "onboarding/OnboardingVehiclesSidebar", + "nearby-poi": "NearbyPOISidebar", }; const fullscreen: Record = { @@ -55,6 +56,7 @@ language: true, onboarding: true, "onboarding-vehicles": true, + "nearby-poi": false, }; let isDragging = false; @@ -62,7 +64,7 @@ let startHeight = 0; let sidebarHeight = new Tween(200, { duration: 500, - easing: quintOut + easing: quintOut, }); let lastSidebarHeight = 0; $effect(() => { diff --git a/src/lib/components/lnv/sidebar/MainSidebar.svelte b/src/lib/components/lnv/sidebar/MainSidebar.svelte index 43f5f71..99ce5ee 100644 --- a/src/lib/components/lnv/sidebar/MainSidebar.svelte +++ b/src/lib/components/lnv/sidebar/MainSidebar.svelte @@ -2,7 +2,9 @@ import { BriefcaseIcon, DownloadIcon, + FuelIcon, HomeIcon, + ParkingSquareIcon, SchoolIcon, } from "@lucide/svelte"; import { Button } from "../../ui/button"; @@ -104,6 +106,40 @@ +
+ + +
+ {#if !window.__TAURI__} diff --git a/src/lib/components/lnv/sidebar/NearbyPOISidebar.svelte b/src/lib/components/lnv/sidebar/NearbyPOISidebar.svelte new file mode 100644 index 0000000..25a7bf7 --- /dev/null +++ b/src/lib/components/lnv/sidebar/NearbyPOISidebar.svelte @@ -0,0 +1,110 @@ + + + + {#if tags} + {tags.split(",")[0].split("=")[1]?.replace(/_/g, " ") ?? "POIs"} + {:else} + {m["sidebar.nearby-poi.header"]()} + {/if} + + +{#if loading} +
{m.loading()}
+{:else} +
+ {#if pois.length === 0} +
+ {m["sidebar.nearby-poi.no-poi"]()} +
+ {/if} + {#each pois as poi (poi.id)} + + {/each} +
+{/if}