diff --git a/frontend_app_gallery/src/container/Gallery.jsx b/frontend_app_gallery/src/container/Gallery.jsx index 3d104aadd7..91ec02caf1 100644 --- a/frontend_app_gallery/src/container/Gallery.jsx +++ b/frontend_app_gallery/src/container/Gallery.jsx @@ -386,168 +386,184 @@ class Gallery extends React.Component { return state.imagesPreviews[state.fileSelected].rawFileUrl } + onMouseMove = () => { + clearInterval(this.mouseMoveTimeout) + if (this.state.displayLightbox) { + document.getElementsByClassName('ril__toolbar')[0].style.transform = 'translateY(0px)' + document.getElementsByClassName('ril__toolbar')[0].style['transition-duration'] = '0.5s' + } + this.mouseMoveTimeout = setInterval(() => { + if (this.state.displayLightbox) { + document.getElementsByClassName('ril__toolbar')[0].style.transform = 'translateY(-50px)' + document.getElementsByClassName('ril__toolbar')[0].style['transition-duration'] = '0.5s' + } + }, 2000) + } + render () { const { state, props } = this if (state.imagesPreviews[state.fileSelected]) this.lightboxRotation.changeAngle(state.imagesPreviews[state.fileSelected].rotationAngle) return ( - - - - -
- - - + - - {state.imagesPreviewsLoaded - ? ( - (this.modalRoot = modalRoot)} /> + + + {state.displayLightbox && ( + { this.handleClickPreviousNextPage(DIRECTION.LEFT) }} + onMoveNextRequest={() => { this.handleClickPreviousNextPage(DIRECTION.RIGHT) }} + imagePadding={0} + reactModalProps={{ parentSelector: () => this.modalRoot }} + toolbarButtons={[ +
+ + + + + + + + + + + +
+ ]} /> - ) : ( -
- -
- ) - } - - this.setState({ fullscreen })} - > -
(this.modalRoot = modalRoot)} /> - - - {state.displayLightbox && ( - { this.handleClickPreviousNextPage(DIRECTION.LEFT) }} - onMoveNextRequest={() => { this.handleClickPreviousNextPage(DIRECTION.RIGHT) }} - imagePadding={0} - reactModalProps={{ parentSelector: () => this.modalRoot }} - toolbarButtons={[ -
- - - - - - - - - - - -
- ]} - /> - )} - - {state.displayPopupDelete && ( - -
-
{props.t('Are you sure ?')}
-
- - - + )} + + {state.displayPopupDelete && ( + +
+
{props.t('Are you sure ?')}
+
+ + + +
-
- - )} - - + + )} + + +
) } }