From 76587cb3c5610842b5e9a006490ca743dd959277 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 5 May 2024 21:44:49 +0200 Subject: [PATCH 1/3] Location details: Add buttons to Maps/OSM --- frontend/src/routes/locations/+page.svelte | 4 ++-- .../src/routes/locations/[id]/+page.svelte | 22 ++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/frontend/src/routes/locations/+page.svelte b/frontend/src/routes/locations/+page.svelte index 422f847a..471d9de8 100644 --- a/frontend/src/routes/locations/+page.svelte +++ b/frontend/src/routes/locations/+page.svelte @@ -166,7 +166,7 @@ @@ -174,7 +174,7 @@ diff --git a/frontend/src/routes/locations/[id]/+page.svelte b/frontend/src/routes/locations/[id]/+page.svelte index 5a1e9132..118ac7fa 100644 --- a/frontend/src/routes/locations/[id]/+page.svelte +++ b/frontend/src/routes/locations/[id]/+page.svelte @@ -22,8 +22,28 @@

Location: {location.name}

-

+

Edit this location + {#if location.coordinates !== undefined} + {@const lon = location.coordinates.lon} + {@const lat = location.coordinates.lat} + + View on Google Maps + + + View on OpenStreetMap + + {/if}

From 980e117d8295156cdb16efb96497defc8a3852f8 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 5 May 2024 22:00:39 +0200 Subject: [PATCH 2/3] Show "View on SwissTopo" button to location details if applicable --- .../src/routes/locations/[id]/+page.svelte | 60 ++++++++++++------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/frontend/src/routes/locations/[id]/+page.svelte b/frontend/src/routes/locations/[id]/+page.svelte index 118ac7fa..84959559 100644 --- a/frontend/src/routes/locations/[id]/+page.svelte +++ b/frontend/src/routes/locations/[id]/+page.svelte @@ -22,29 +22,43 @@

Location: {location.name}

-

- Edit this location - {#if location.coordinates !== undefined} - {@const lon = location.coordinates.lon} - {@const lat = location.coordinates.lat} - - View on Google Maps - - - View on OpenStreetMap - - {/if} -

+
+ +
+ {#if location.coordinates !== undefined} + {@const lon = location.coordinates.lon} + {@const lat = location.coordinates.lat} + +  View on Google Maps + + +  View on OpenStreetMap + + {#if lat > 45.8 && lat < 48 && lon > 5.9 && lon < 11.4} + +  View on SwissTopo + + {/if} + {/if} +
+
From ba250a0dfc570bf6ed07650386d8d49876e800bf Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 5 May 2024 22:06:01 +0200 Subject: [PATCH 3/3] Flight details: Right align IGC button This matches the new layout of the location details. --- frontend/src/routes/flights/[id]/+page.svelte | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/frontend/src/routes/flights/[id]/+page.svelte b/frontend/src/routes/flights/[id]/+page.svelte index 96836eb1..8a44552a 100644 --- a/frontend/src/routes/flights/[id]/+page.svelte +++ b/frontend/src/routes/flights/[id]/+page.svelte @@ -34,15 +34,19 @@ {#if landingAt}to {landingAt.name}{/if} -

- Edit this flight - {#if flight.hasIgc} - -   Download - IGC - - {/if} -

+
+ +
+ {#if flight.hasIgc} + +   Download + IGC + + {/if} +
+