1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 11:21:29 +00:00

change default thumbnail size (#6710)

* change default thumbnail size

* change py test file

* change thumbnail image size
This commit is contained in:
Michael An
2024-09-05 14:56:52 +08:00
committed by GitHub
parent eaf2114643
commit fba6f9735e
19 changed files with 56 additions and 43 deletions

View File

@@ -47,14 +47,20 @@ class ImageDialog extends React.Component {
const imageItemsLength = imageItems.length;
const name = imageItems[imageIndex].name;
const imageTitle = `${name} (${imageIndex + 1}/${imageItemsLength})`;
const mainImg = imageItems[imageIndex];
const nextImg = imageItems[(imageIndex + 1) % imageItemsLength];
const prevImg = imageItems[(imageIndex + imageItemsLength - 1) % imageItemsLength];
const mainSrc = mainImg.thumbnail || mainImg.src;
const nextSrc = nextImg.thumbnail || nextImg.src;
const prevSrc = prevImg.thumbnail || prevImg.src;
return (
<Lightbox
wrapperClassName='custom-image-previewer'
imageTitle={imageTitle}
mainSrc={imageItems[imageIndex].src}
nextSrc={imageItems[(imageIndex + 1) % imageItemsLength].src}
prevSrc={imageItems[(imageIndex + imageItemsLength - 1) % imageItemsLength].src}
mainSrc={mainSrc}
nextSrc={nextSrc}
prevSrc={prevSrc}
onCloseRequest={this.props.closeImagePopup}
onMovePrevRequest={this.props.moveToPrevImage}
onMoveNextRequest={this.props.moveToNextImage}