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

Share button #57

Open
retog opened this issue Feb 15, 2023 · 3 comments
Open

Share button #57

retog opened this issue Feb 15, 2023 · 3 comments
Labels
good first issue Good for newcomers

Comments

@retog
Copy link
Contributor

retog commented Feb 15, 2023

On the document page there should be a share-button next to the existing download and delete buttons. This button should allow sharing the PDF with other apps such as email clients.

@nleanba nleanba changed the title State button Share button Feb 16, 2023
@nleanba
Copy link
Member

nleanba commented Feb 16, 2023

I like the Idea, and I‘d suggest that you try implementing this, as you have already used the (incoming) share API recently.

It feels important to only show this button on devices that support it.

I wonder if on browsers (i.e. on phones) with sharing, it might be sensible to replace the download button with it—I know iOS has a "save to files" option in the share sheet, so it depends on if Android can be (reliably) coreced into showing one too.

@retog retog added the good first issue Good for newcomers label Feb 16, 2023
@retog
Copy link
Contributor Author

retog commented Feb 16, 2023

It feels important to only show this button on devices that support it.

if (navigator.share) {
//share as per https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share
}

@retog
Copy link
Contributor Author

retog commented Feb 16, 2023

I wonder if on browsers (i.e. on phones) with sharing, it might be sensible to replace the download button with it—I know iOS has a "save to files" option in the share sheet, so it depends on if Android can be (reliably) coreced into showing one too.

I've never seen this on android. Saving to media and sharing seem to be different things.

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

No branches or pull requests

2 participants