feat: add download app card on web
Some checks failed
TrafficCue CI / check (push) Failing after 1m0s
TrafficCue CI / build (push) Successful in 46s

This commit is contained in:
2025-08-30 16:36:07 +02:00
parent a976dd779c
commit 89c9e01b43
3 changed files with 39 additions and 1 deletions

View File

@ -129,6 +129,13 @@
"skip": "Onboarding überspringen",
"choose-lang": "Wählen Sie Ihre Sprache",
"first-vehicle": "Erstellen wir Ihr erstes Fahrzeug."
},
"main": {
"download-app": {
"title": "App herunterladen!",
"description": "TrafficCue ist auf Android verfügbar. Holen Sie es sich für das beste Erlebnis!",
"button": "Runterladen"
}
}
},
"location-selector": {

View File

@ -130,6 +130,13 @@
"skip": "Skip Onboarding",
"choose-lang": "Choose your language",
"first-vehicle": "Let's create your first vehicle."
},
"main": {
"download-app": {
"title": "Download the app!",
"description": "TrafficCue is available on Android. Get it for the best experience!",
"button": "Get it"
}
}
},
"unsave": "Unsave",

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { BriefcaseIcon, HomeIcon, SchoolIcon } from "@lucide/svelte";
import { BriefcaseIcon, DownloadIcon, HomeIcon, SchoolIcon } from "@lucide/svelte";
import { Button } from "../../ui/button";
import { fly } from "svelte/transition";
import { circInOut } from "svelte/easing";
@ -11,6 +11,7 @@
import { m } from "$lang/messages";
import { getSaved } from "$lib/services/lnv";
import { view } from "../view.svelte";
import * as Card from "$lib/components/ui/card";
</script>
<div
@ -98,6 +99,29 @@
<VehicleSelector />
{#if !window.__TAURI__}
<Card.Root style="margin-top: 1rem;">
<Card.Header>
<Card.Title>{m["sidebar.main.download-app.title"]()}</Card.Title>
</Card.Header>
<Card.Content>
{m["sidebar.main.download-app.description"]()}
</Card.Content>
<Card.Footer>
<a
href="/trafficcue.apk"
target="_blank"
rel="noopener noreferrer"
>
<Button>
<DownloadIcon />
{m["sidebar.main.download-app.button"]()}
</Button>
</a>
</Card.Footer>
</Card.Root>
{/if}
<RequiresCapability capability="saved-routes">
{#await getSaved() then saved}
{#if saved.length != 0}