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:
@@ -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}
|
||||
|
Reference in New Issue
Block a user