-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Added Web Share API to photo viewer and clipboard #1792
Conversation
Thank you for your contribution! Because we want to create the best possible product for our users, we have a set of guidelines which ensure that all source code contributions are acceptable:
Reviewing, testing and finally merging pull requests consumes significant resources on our side. Unless it's just a small fix, it may take several months. Thanks for your patience :) |
As there is no support for firefox and chrome, what other browsers can be used on Android to install the PWA? Am I right that it won't work for everyone who already installed the PWA using chrome or firefox? |
This should work on mobile browser, regardless of using it as a PWA or in the browser without installing it. The web share API works in both cases. It should also work if people installed it previously, after photoprism gets updated. |
Sounds good! If firefox and chrome are supported on mobile devices that should be fine. |
You can use a took like https://ngrok.com/ to have HTTPS on your local environment. |
@alexislefebvre thanks, I tested it with ngrok and it works fine in Chrome on Android. But, turns out Firefox never implemented the So the green checkmark on https://caniuse.com/?search=Navigator%20share for Firefox on Android is a bit misleading, when you scroll down there's more sections that are actually red. |
What's the status of this PR? It's been over a year now. |
The status is (a) we need a larger team (b) the CLA is not signed (c) there are merge conflicts and (d) there might be tests missing. |
I thought I signed the CLA when I created the PR - I guess it changed? I signed it again, in any case. Since I've personally stopped using Photoprism a while ago, I wont have time to work on this further. It's a small PR, so I hope someone else can pick it up. As for automated testcases, I'm unsure how that would work with the Web Share API. I guess it could be mocked? |
@signalkraft Since you have no motivation to keep working on it and don't seem to need it anymore, I'll close this PR. Thank you for your contribution! |
This PR adds share buttons using the Web Share API in browsers that support it. Basically, it opens the native Share menu on mobile devices and some desktop browsers, letting users share / edit / mail photos from the PWA as you would from a native photo gallery app.
I built this after watching someone struggle to share a photo from the PhotoPrism PWA on Android with a friend on WhatsApp.
File
and your model, so I broke that part of the code out intocommon/util
. Let me know if there's a better way to do that