1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-19 15:38:38 +00:00

Merge pull request #7203 from haiwen/fix-download-people-image

fix: download people image
This commit is contained in:
杨国璇 2024-12-16 18:42:00 +08:00 committed by GitHub
commit c9c60b7a62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import ContextMenu from '../../../components/context-menu'; import ContextMenu from '../../../components/context-menu';
import { gettext, useGoFileserver, fileServerRoot } from '../../../../utils/constants'; import { gettext, useGoFileserver, fileServerRoot } from '../../../../utils/constants';
import { getRowById } from '../../../utils/table'; import { getRowById } from '../../../utils/table';
import { useMetadataView } from '../../../hooks/metadata-view';
import { downloadFile } from '../../../utils/file'; import { downloadFile } from '../../../utils/file';
import ZipDownloadDialog from '../../../../components/dialog/zip-download-dialog'; import ZipDownloadDialog from '../../../../components/dialog/zip-download-dialog';
import metadataAPI from '../../../api'; import metadataAPI from '../../../api';
@ -16,10 +15,9 @@ const CONTEXT_MENU_KEY = {
DELETE: 'delete', DELETE: 'delete',
}; };
const GalleryContextMenu = ({ selectedImages, boundaryCoordinates, onDelete }) => { const GalleryContextMenu = ({ metadata, selectedImages, boundaryCoordinates, onDelete }) => {
const [isZipDialogOpen, setIsZipDialogOpen] = useState(false); const [isZipDialogOpen, setIsZipDialogOpen] = useState(false);
const { metadata } = useMetadataView();
const repoID = window.sfMetadataContext.getSetting('repoID'); const repoID = window.sfMetadataContext.getSetting('repoID');
const checkCanDeleteRow = window.sfMetadataContext.checkCanDeleteRow(); const checkCanDeleteRow = window.sfMetadataContext.checkCanDeleteRow();
@ -96,6 +94,7 @@ const GalleryContextMenu = ({ selectedImages, boundaryCoordinates, onDelete }) =
}; };
GalleryContextMenu.propTypes = { GalleryContextMenu.propTypes = {
metadata: PropTypes.object,
selectedImages: PropTypes.array, selectedImages: PropTypes.array,
boundaryCoordinates: PropTypes.object, boundaryCoordinates: PropTypes.object,
onDelete: PropTypes.func, onDelete: PropTypes.func,

View File

@ -362,6 +362,7 @@ const Main = ({ isLoadingMore, metadata, onDelete, onLoadMore }) => {
)} )}
</div> </div>
<GalleryContextmenu <GalleryContextmenu
metadata={metadata}
selectedImages={selectedImages} selectedImages={selectedImages}
boundaryCoordinates={containerRef?.current?.getBoundingClientRect() || {}} boundaryCoordinates={containerRef?.current?.getBoundingClientRect() || {}}
onDelete={handleDeleteSelectedImages} onDelete={handleDeleteSelectedImages}