From d5311bb71e4e1f052322ce218f8612b23571c94a Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Sat, 22 Feb 2025 20:36:25 -0500 Subject: [PATCH] feat: Add "Open in Maps" button for adventures with location coordinates --- frontend/src/locales/en.json | 1 + .../src/routes/adventures/[id]/+page.svelte | 6 ++++++ frontend/src/routes/map/+page.svelte | 19 +++++++++++++++---- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 7b1eb46..3971d1b 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -113,6 +113,7 @@ "copy_link": "Copy Link", "image": "Image", "upload_image": "Upload Image", + "open_in_maps": "Open in Maps", "url": "URL", "fetch_image": "Fetch Image", "wikipedia": "Wikipedia", diff --git a/frontend/src/routes/adventures/[id]/+page.svelte b/frontend/src/routes/adventures/[id]/+page.svelte index d282083..800f662 100644 --- a/frontend/src/routes/adventures/[id]/+page.svelte +++ b/frontend/src/routes/adventures/[id]/+page.svelte @@ -436,6 +436,12 @@ {/if} + {$t('adventures.open_in_maps')} {/if} - +
+ {#if adventure.longitude && adventure.latitude} + {$t('adventures.open_in_maps')} + {/if} + +
{/if}