style: run prettier
All checks were successful
TrafficCue CI / check (push) Successful in 1m27s
TrafficCue CI / build (push) Successful in 1m43s

This commit is contained in:
2025-09-06 18:37:38 +02:00
parent 9d226f3387
commit d1e86ce174
6 changed files with 24 additions and 16 deletions

View File

@ -84,21 +84,25 @@
$effect(() => {
const fullHeight = window.innerHeight - 20 - 40 - 10;
if (fullscreen[view.current.type]) {
if(sidebarHeight != fullHeight) {
if(window.innerWidth < 768) {
if (sidebarHeight != fullHeight) {
if (window.innerWidth < 768) {
hideSearch = true;
map.ignorePadding = true;
}
previousHeight = sidebarHeight;
sidebarHeight = fullHeight;
requestAnimationFrame(() => { map.updateMapPadding(); } );
requestAnimationFrame(() => {
map.updateMapPadding();
});
}
} else {
hideSearch = false;
if(sidebarHeight == fullHeight) {
if (sidebarHeight == fullHeight) {
map.ignorePadding = false;
sidebarHeight = previousHeight;
requestAnimationFrame(() => { map.updateMapPadding(); } );
requestAnimationFrame(() => {
map.updateMapPadding();
});
}
}
});

View File

@ -10,7 +10,10 @@ export const map = $state({
zoom: 0,
ignorePadding: false,
updateMapPadding: () => {
if (document.querySelector<HTMLDivElement>("#sidebar") == null || map.ignorePadding) {
if (
document.querySelector<HTMLDivElement>("#sidebar") == null ||
map.ignorePadding
) {
map._setPadding({
top: 0,
right: 0,

View File

@ -1,5 +1,10 @@
<script lang="ts">
import { BriefcaseIcon, DownloadIcon, 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";
@ -108,11 +113,7 @@
{m["sidebar.main.download-app.description"]()}
</Card.Content>
<Card.Footer>
<a
href="/trafficcue.apk"
target="_blank"
rel="noopener noreferrer"
>
<a href="/trafficcue.apk" target="_blank" rel="noopener noreferrer">
<Button>
<DownloadIcon />
{m["sidebar.main.download-app.button"]()}

View File

@ -8,5 +8,5 @@ export const LNV_SERVER =
location.hostname == "localhost" && location.protocol == "http:"
? "http://localhost:3000/api"
: location.hostname.includes("staging")
? "https://staging-trafficcue-api.picoscratch.de/api"
: "https://trafficcue-api.picoscratch.de/api";
? "https://staging-trafficcue-api.picoscratch.de/api"
: "https://trafficcue-api.picoscratch.de/api";