Remove zoom option from videos (#1471)
This commit is contained in:
commit
0c8634351c
|
@ -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>
|
||||
)}
|
||||
<button
|
||||
className="pswp__button pswp__button--custom"
|
||||
onClick={() => {
|
||||
|
|
Loading…
Reference in a new issue