Skip to content

Commit

Permalink
fix rebase error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouwenxuan authored and zhouwenxuan committed Jan 17, 2025
1 parent 3f0e9ef commit 83c061d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/dialog/image-dialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ImageDialog = ({ repoID, repoInfo, enableRotate: oldEnableRotate, imageIte
return (
<div
className="lightbox-side-panel"
style={{ width: expanded ? `${SIDE_PANEL_EXPANDED_WIDTH}px` : `${SIDE_PANEL_COLLAPSED_WIDTH}px` }}
style={{ width: expanded ? SIDE_PANEL_EXPANDED_WIDTH : SIDE_PANEL_COLLAPSED_WIDTH }}
aria-expanded={expanded}
>
<div className="side-panel-controller" onClick={onToggleSidePanel}>
Expand Down Expand Up @@ -111,7 +111,7 @@ const ImageDialog = ({ repoID, repoInfo, enableRotate: oldEnableRotate, imageIte
OCRLabel={gettext('OCR')}
sidePanel={!isCustomPermission ? {
render: renderSidePanel,
width: expanded ? `${SIDE_PANEL_EXPANDED_WIDTH}px` : `${SIDE_PANEL_COLLAPSED_WIDTH}px`,
width: expanded ? SIDE_PANEL_EXPANDED_WIDTH : SIDE_PANEL_COLLAPSED_WIDTH,
} : null}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ const FileDetails = ({ repoID, dirent, direntDetail }) => {
{enableMetadataManagement && enableMetadata && enableFaceRecognition && Utils.imageCheck(dirent.name) && (
<People repoID={repoID} record={record} />
)}
{enableMetadataManagement && enableMetadata && enableFaceRecognition && Utils.imageCheck(dirent.name) && (
<People repoID={repoID} record={record} />
)}
</>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ const EmbeddedFileDetails = ({ repoID, repoInfo, dirent, path, onClose, width =

useEffect(() => {
if (isView || isTag) return;
// init context
const context = new MetadataContext();
window.sfMetadataContext = context;
window.sfMetadataContext.init({ repoID, repoInfo });

if (!window.sfMetadataContext) {
const context = new MetadataContext();
window.sfMetadataContext = context;
window.sfMetadataContext.init({ repoID, repoInfo });
}

return () => {
if (window.sfMetadataContext) {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/metadata/components/metadata-details/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useMemo } from 'react';
import PropTypes from 'prop-types';
import CellFormatter from '../cell-formatter';
import DetailEditor from '../detail-editor';
import DetailItem from '../../../components/dirent-detail/detail-item';
Expand Down

0 comments on commit 83c061d

Please sign in to comment.