Closed mjaschen closed 1 year ago
I've added a check so that the button is enabled only if at least 2 route points are set.
No strong opinions, we can merge as is, but there might be use cases where it makes sense to only share the current map view or a single route point. Therefore I meant to still allow sharing, just not to open the export dialog at the receiving end by adding that check to index.js.
Don't know if my comment was misleading or if you prefer to disable the share dialog instead?
Just a misunderstanding – you're absolutely right. I'll push an update later.
Thanks!
This pull-request implements sharing a route by QRCode, external services or by using the clipboard
?export=dialog
export=dialog
query parameter, the export dialog is shown instantly (as discussed in #370)export
) and a value (dialog
) instead of only a paramater is required, becauseURLSearchParams
needs both when adding a new parameterdownload
,gpx
etc.)URLSearchParams
polyfill for ancient browsers as Husky didn't allow me to commit otherwise …[^1]: Mastodon instances respond with HTTP 502 when the submitted text (= the route URL in our case) is longer than the maximum post character limit on that instance. That will probably confuse users. I decided to keep the code here as this bug will probably be fixed in the future.