Skip to content

Commit

Permalink
Merge pull request #7203 from haiwen/fix-download-people-image
Browse files Browse the repository at this point in the history
fix: download people image
  • Loading branch information
YangGuoXuan-0503 authored Dec 16, 2024
2 parents d19d22c + 0dcc30e commit c9c60b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/metadata/views/gallery/context-menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import ContextMenu from '../../../components/context-menu';
import { gettext, useGoFileserver, fileServerRoot } from '../../../../utils/constants';
import { getRowById } from '../../../utils/table';
import { useMetadataView } from '../../../hooks/metadata-view';
import { downloadFile } from '../../../utils/file';
import ZipDownloadDialog from '../../../../components/dialog/zip-download-dialog';
import metadataAPI from '../../../api';
Expand All @@ -16,10 +15,9 @@ const CONTEXT_MENU_KEY = {
DELETE: 'delete',
};

const GalleryContextMenu = ({ selectedImages, boundaryCoordinates, onDelete }) => {
const GalleryContextMenu = ({ metadata, selectedImages, boundaryCoordinates, onDelete }) => {
const [isZipDialogOpen, setIsZipDialogOpen] = useState(false);

const { metadata } = useMetadataView();
const repoID = window.sfMetadataContext.getSetting('repoID');
const checkCanDeleteRow = window.sfMetadataContext.checkCanDeleteRow();

Expand Down Expand Up @@ -96,6 +94,7 @@ const GalleryContextMenu = ({ selectedImages, boundaryCoordinates, onDelete }) =
};

GalleryContextMenu.propTypes = {
metadata: PropTypes.object,
selectedImages: PropTypes.array,
boundaryCoordinates: PropTypes.object,
onDelete: PropTypes.func,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/metadata/views/gallery/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ const Main = ({ isLoadingMore, metadata, onDelete, onLoadMore }) => {
)}
</div>
<GalleryContextmenu
metadata={metadata}
selectedImages={selectedImages}
boundaryCoordinates={containerRef?.current?.getBoundingClientRect() || {}}
onDelete={handleDeleteSelectedImages}
Expand Down

0 comments on commit c9c60b7

Please sign in to comment.