π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
play 2
Manav Rathib72f65d44cb6
diff --git a/web/apps/photos/src/styles/global.css b/web/apps/photos/src/styles/global.cssindex d880e61a2d..366e652a2c 100644--- a/web/apps/photos/src/styles/global.css+++ b/web/apps/photos/src/styles/global.css@@ -220,6 +220,15 @@ body {transform: scale(-0.8, 0.8);}+/* Toggleable live photo buttons */++.pswp-ente button.pswp-ente-off .pswp__icn {+ /* PhotoSwipe already uses the CSS opacity, so reduce the color's opacity */+ fill: rgba(255 255 255 / 0.6);+}++/* 4 line caption */+.pswp-ente .pswp__caption {position: absolute;bottom: 0px;diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.tsindex 1c892aaf2b..64f4f93eb9 100644--- a/web/packages/gallery/components/viewer/photoswipe.ts+++ b/web/packages/gallery/components/viewer/photoswipe.ts@@ -594,18 +594,39 @@ export class FileViewerPhotoSwipe {return;}+ const containerElement = pswp.currSlide.container;+ const videoElement =+ containerElement.getElementsByTagName("video")[0];+ console.log(+ containerElement,+ videoElement,+ pswp.currSlide,+ );+ if (!videoElement) {+ // Video hasn't loaded yet.+ showIf(buttonElement, false);+ return;+ }+showIf(buttonElement, true);+ buttonElement.classList.remove("pswp-ente-off");});- // buttonElement.style.display = "none";- // buttonElement.setAttribute("id", moreButtonID);- // buttonElement.setAttribute("aria-haspopup", "true");},onClick: (e) => {- // const buttonElement = e.target;- // See also: `resetMoreMenuButtonOnMenuClose`.- // buttonElement.setAttribute("aria-controls", moreMenuID);- // buttonElement.setAttribute("aria-expanded", true);- // onMore(buttonElement);+ const buttonElement = e.target;++ const containerElement = pswp.currSlide.container;+ const videoElement =+ containerElement.getElementsByTagName("video")[0];+ console.log(containerElement, videoElement, pswp.currSlide);++ if (videoElement.paused) {+ videoElement.play();+ buttonElement.classList.remove("pswp-ente-off");+ } else {+ videoElement.pause();+ buttonElement.classList.add("pswp-ente-off");+ }},});