{#if !routing.currentTrip && !hideSearch}
{/if} {#if !hideSearch && !!location.speed != false}
{((location.speed * 3.6) | 0).toFixed(0)}
{/if} {#if getRoadMetadata().current} {@const meta = getRoadMetadata().current!} {#if meta.maxspeed} {@const maxspeed = getSpeed(meta.maxspeed)} {#if maxspeed && maxspeed < 100}
{meta.maxspeed}
{/if} {/if} {#if meta.overtaking} {@const overtaking = meta.overtaking} {#if overtaking && overtaking == "no"}
{/if} {/if} {/if}
{#if mobileView}
{ isDragging = true; startY = e.touches[0].clientY; startHeight = sidebarHeight.target; }} ontouchmove={(e) => { if (!isDragging) return; e.preventDefault(); const deltaY = e.touches[0].clientY - startY; let newHeight = Math.max(100, startHeight - deltaY); const snapPoint = 200; const snapThreshold = 20; if (Math.abs(newHeight - snapPoint) < snapThreshold) { newHeight = snapPoint; } sidebarHeight.target = newHeight; map.updateMapPadding(); }} ontouchend={() => { if (!isDragging) return; isDragging = false; }} >
{/if} {#if view.loading}
{/if} {#if routing.currentTrip}
{:else}
{/if}
{#if !routing.currentTrip}
view.switch("main")}>
{ view.switch("user"); }} >
{ view.switch("settings"); }} >
{ location.toggleLock(); }} > {location.locked ? m["location.unlock"]() : m["location.unlock"]()}
{#if location.code}
{m["location.code"]()}: {location.code}
{/if}
{ advertiseRemoteLocation(); }} > {m["location.start"]()}
{ remoteLocation(prompt("Code?") || ""); }} > {m["location.join"]()}
{ await postHazard( { lat: location.lat, lon: location.lng }, "bumpy-road", ); alert("Thanks for your report!"); await fetchHazards(); }} > Report Bumpy Road
{/if}