Skip to content

Add a button to send edit link by email in anonymous mode #1102

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

Merged
merged 15 commits into from
Jun 2, 2023

Conversation

yohanboniface
Copy link
Member

@yohanboniface yohanboniface commented May 23, 2023

This is a work I started last year, and not yet finished.

The goal is to add a button "Send me the link" when creating a map in anonymous mode.

@yohanboniface
Copy link
Member Author

We should have a working version, now let's make it clean :p

image

@yohanboniface
Copy link
Member Author

Changed wording:

image

@davidbgk
Copy link
Contributor

Is that possible to make the link clickable? Last time I tried I failed (because it was not on the top layer?)

@yohanboniface
Copy link
Member Author

If you click it, you'll lose it :p

It will open a page that will add a cookie (which is already present in this case, given the map has just been created), then redirect to the map with the normal URL.

@davidbgk
Copy link
Contributor

Maybe a Copy link button close to it then?

@yohanboniface
Copy link
Member Author

In an ideal world, that would help a lot. But that message comes from the backend, so that would need more refactorisation, let's keep that for a further step ?

@yohanboniface
Copy link
Member Author

image

Simpler than expected!

But it will work only in https, right ?

@davidbgk
Copy link
Contributor

But it will work only in https, right ?

I don't think so, did you use the Navigator.clipboard API? (e.g. https://code.larlet.fr/javascript/#copier-dans-le-presse-papier)

@yohanboniface
Copy link
Member Author

I don't think so, did you use the Navigator.clipboard API

Yep, see last commit :)

@yohanboniface yohanboniface requested a review from davidbgk June 1, 2023 08:20
@yohanboniface yohanboniface changed the title (WIP) Add a button to send edit link by email in anonymous mode Add a button to send edit link by email in anonymous mode Jun 1, 2023
@@ -114,6 +114,9 @@
)
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
FROM_EMAIL = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still wonder if we should add FROM_EMAIL = "test@example.com" to local.py.sample to see the feature in action when developing or if that's really an on-demand one 🤔

Co-authored-by: David Larlet <3556+davidbgk@users.noreply.github.com>
@yohanboniface yohanboniface merged commit 6e0c472 into master Jun 2, 2023
@yohanboniface yohanboniface deleted the mail-link branch June 2, 2023 21:32
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