Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functionality to share single map plays #53

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

nealetw
Copy link

@nealetw nealetw commented Feb 21, 2025

The idea of this is to be able to share a single round play from a place you know.

Take a google maps streetview link, put it into this new modal, and then it will create a sharable link with the settings of the users choosing. Navigating to the link will take any user to a single play of that exact streeview place, with the selected settings.

I personally just wanted this feature, and figured i could just contribute it myself :)

Changes made:
created files gameSettingsOptions.js (to use the checkboxes in sharing modal), singleShareModal.js (previously said sharing modal).
New text is all in the common.js, and every different localization use the Cambridge Translator
Most logic is in home.js, in which it uses the router to interpret a new ?single-'' param in the sharable link to parse into the three selected settings and coords from the streeview link. Going back from this single-singleplayer screen clears the param and just goes back to / (Also, a lot of the diff on home.js is formatting)

Inside the share modal, the sharable URL is created just by changing each digit in the coordinate from the google maps link to its character integer, because I wanted it to not be very readable if a user knew how to find a location using the coordinate system.

@codergautam
Copy link
Owner

Thank you for your contribution! I will review this soon and push if it seems safe. This is a feature I wanted to implement as well but didn't have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants