mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 18:29:23 +00:00
update image dialog, add download, delete and view original image button (#6670)
* update image dialog, add download, delete and view original image button * update react-image-lightbox * add-image-rotate-api * support restore in image previewer * support image rotate * upgrade react-image-lightbox * fix bug - first image auto previewed in list layout, improve delete and restore action * remove raise * fix last line --------- Co-authored-by: r350178982 <32759763+r350178982@users.noreply.github.com> Co-authored-by: Michael An <2331806369@qq.com>
This commit is contained in:
@@ -15,7 +15,6 @@ const propTypes = {
|
||||
isSidePanelFolded: PropTypes.bool,
|
||||
switchViewMode: PropTypes.func.isRequired,
|
||||
isCustomPermission: PropTypes.bool,
|
||||
|
||||
pathPrefix: PropTypes.array.isRequired,
|
||||
isTreePanelShown: PropTypes.bool.isRequired,
|
||||
toggleTreePanel: PropTypes.func.isRequired,
|
||||
@@ -101,7 +100,8 @@ const propTypes = {
|
||||
showShareBtn: PropTypes.bool.isRequired,
|
||||
onUploadFile: PropTypes.func.isRequired,
|
||||
onUploadFolder: PropTypes.func.isRequired,
|
||||
onToolbarFileTagChanged: PropTypes.func.isRequired
|
||||
onToolbarFileTagChanged: PropTypes.func.isRequired,
|
||||
eventBus: PropTypes.object,
|
||||
};
|
||||
|
||||
class LibContentContainer extends React.Component {
|
||||
@@ -341,6 +341,7 @@ class LibContentContainer extends React.Component {
|
||||
showDirentDetail={this.props.showDirentDetail}
|
||||
onItemsScroll={this.onItemsScroll}
|
||||
isDirentDetailShow={this.props.isDirentDetailShow}
|
||||
eventBus={this.props.eventBus}
|
||||
/>
|
||||
)}
|
||||
{this.props.isDirentDetailShow && (
|
||||
|
@@ -914,6 +914,9 @@ class LibContentView extends React.Component {
|
||||
}
|
||||
if (parentPath === this.state.path && !this.state.isViewFile) {
|
||||
this.addDirent(name, 'file');
|
||||
if (Utils.imageCheck(name)) {
|
||||
this.props.eventBus.dispatch(EVENT_BUS_TYPE.RESTORE_IMAGE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.state.isTreePanelShown) {
|
||||
@@ -2293,6 +2296,7 @@ class LibContentView extends React.Component {
|
||||
showShareBtn={showShareBtn}
|
||||
onUploadFile={this.onUploadFile}
|
||||
onUploadFolder={this.onUploadFolder}
|
||||
eventBus={this.props.eventBus}
|
||||
/>
|
||||
{canUpload && this.state.pathExist && !this.state.isViewFile && (
|
||||
<FileUploader
|
||||
|
Reference in New Issue
Block a user