Closed AndreaPro closed 1 year ago
Generally speaking I'd say yes, it would be somehow possible to fix this. But only with a certain amount of effort. Here are some thoughts:
So yes I believe there is a way to fix it but I don't have the capacity to dig deeper at the moment. Any PR or research would be welcome.
I would very much love to see this implemented.
- The Photo Sphere Viewer component does not allow to hide the download button (AFAIK, see https://photo-sphere-viewer.js.org/guide/config.html#standard-options). So there we'd need to fiddle with CSS rules and stuff to hide it
Photosphere viewer has the option to select each button in navbar from JS configuration, and so it possible to exclude the download button, without CSS fiddling or any hacky stuff. Here is an example https://jsfiddle.net/2qhumyfg/1/
- We'd need further investigation regarding the NC frontend integration and how we can determine, if the download should be hidden or not (not sure if it's possible at all).
I might have an easier suggestion to implement this. From what I understand, this app renders the photosphere viewer over the regular shared/public link page. So, using JS, the app can check if the Download button is present and visible on the shared link page, if yes, then enable the download button in Photosphere viewer. By this, you might not need to dig deep into NC frontend integration.
These are just suggestions, I don't have any experience with NC app integrations so I am afraid I can not help with that.
Photosphere viewer has the option to select each button in navbar from JS configuration, and so it possible to exclude the download button, without CSS fiddling or any hacky stuff. Here is an example https://jsfiddle.net/2qhumyfg/1/
Thanks for the hint. I think this should solve our problem of hiding the download button :+1:
Regarding your second suggestion: the general idea is correct. I digged a bit deeper and found that other NC frontend code is checking the download capability via $('#hideDownload').val() === 'true'
. So I think we have everything in place now.
Hello, I have installed v1.26.0 of your app inside Nextcloud 26.0.1 I have uploaded and shared a picture that is regularly viewed in 360° but in the sharing options I have checked "Hide Download" option but the image is still downloadable. Is it possible to fix it?