cryptag / leapchat

Ephemeral, encrypted, in-browser chat rooms
https://www.leapchat.org/
Other
184 stars 32 forks source link

Sharing modal #295

Closed jimmcgaw closed 1 year ago

jimmcgaw commented 1 year ago

What's in this PR:

  1. Create a single helper method for showing / hiding modals by their name so we reduce the number of functions we drill down as props.
  2. Create a separate sharing, invite users modal that contains a means of sharing via the Web Share API, when supported, and allows for copying a link to share, as previously allowed.
  3. Add a trigger to open the invite users modal to the Message toolbar and as a button under the users list.

Inviting users should be as easy and discoverable as possible. I felt it needed to be pulled out of the Settings modal where it was buried.

Demo, in desktop Chrome (does not support Web Share API) and desktop Safari (which does support Web Share API):

invite-users