1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

Update dependency 5 (#5349)

* update dependency

* update dependency

* update dependency
This commit is contained in:
杨顺强
2022-12-31 19:38:51 +08:00
committed by GitHub
parent 3a4cb45fcf
commit f8db3a9614
3 changed files with 21 additions and 49 deletions

View File

@@ -22,19 +22,13 @@ class ImageDialog extends React.Component {
const imageItems = this.props.imageItems;
const imageIndex = this.props.imageIndex;
const imageItemsLength = imageItems.length;
const imageCaption = imageItemsLength && (
<Fragment>
<span>{gettext('%curr% of %total%').replace('%curr%', imageIndex + 1).replace('%total%', imageItemsLength)}</span>
<br />
<a href={imageItems[imageIndex].url} target="_blank">{gettext('Open in New Tab')}</a>
</Fragment>
);
const name = imageItems[imageIndex].name;
const imageTitle = `${name} (${imageIndex + 1}/${imageItemsLength})`;
return (
<Lightbox
imageTitle={imageTitle}
mainSrc={imageItems[imageIndex].src}
imageTitle={imageItems[imageIndex].name}
imageCaption={imageCaption}
nextSrc={imageItems[(imageIndex + 1) % imageItemsLength].src}
prevSrc={imageItems[(imageIndex + imageItemsLength - 1) % imageItemsLength].src}
onCloseRequest={this.props.closeImagePopup}