π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
only show zoom option for image
Abhinavb59fa1fd771a
diff --git a/apps/photos/src/components/PhotoViewer/index.tsx b/apps/photos/src/components/PhotoViewer/index.tsxindex b0756d3f3a..214fa052cb 100644--- a/apps/photos/src/components/PhotoViewer/index.tsx+++ b/apps/photos/src/components/PhotoViewer/index.tsx@@ -137,6 +137,8 @@ function PhotoViewer(props: Iprops) {const [showEditButton, setShowEditButton] = useState(false);+ const [showZoomButton, setShowZoomButton] = useState(false);+useEffect(() => {if (publicCollectionGalleryContext.accessedThroughSharedURL) {publicCollectionDownloadManager.setProgressUpdater(@@ -338,6 +340,10 @@ function PhotoViewer(props: Iprops) {);}+ function updateShowZoomButton(file: EnteFile) {+ setShowZoomButton(file.metadata.fileType === FILE_TYPE.IMAGE);+ }+const openPhotoSwipe = () => {const { items, currentIndex } = props;const options = {@@ -411,6 +417,7 @@ function PhotoViewer(props: Iprops) {updateShowConvertBtn(currItem);updateIsSourceLoaded(currItem);updateShowEditButton(currItem);+ updateShowZoomButton(currItem);});photoSwipe.listen('resize', () => {if (!photoSwipe?.currItem) return;@@ -766,12 +773,14 @@ function PhotoViewer(props: Iprops) {<DeleteIcon /></button>)}- <button- className="pswp__button pswp__button--custom"- onClick={toggleZoomInAndOut}- title={t('ZOOM_IN_OUT')}>- <ZoomInOutlinedIcon />- </button>+ {showZoomButton && (+ <button+ className="pswp__button pswp__button--custom"+ onClick={toggleZoomInAndOut}+ title={t('ZOOM_IN_OUT')}>+ <ZoomInOutlinedIcon />+ </button>+ )}<buttonclassName="pswp__button pswp__button--custom"onClick={() => {