-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
杨国璇
authored and
杨国璇
committed
Oct 17, 2024
1 parent
0039f48
commit e3668c4
Showing
21 changed files
with
442 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export { VIEW_TYPE } from '../../metadata/constants'; | ||
export const LIST_MODE = 'list'; | ||
export const GRID_MODE = 'grid'; | ||
export const DIRENT_DETAIL_MODE = 'detail'; | ||
export const METADATA_MODE = 'metadata'; | ||
export const FACE_RECOGNITION_MODE = 'person_image'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 0 additions & 133 deletions
133
frontend/src/metadata/components/gallery-details/index.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.sf-metadata-view-detail .detail-content-empty .empty-tip { | ||
margin: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React, { useMemo } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { gettext, mediaUrl } from '../../../utils/constants'; | ||
import { Detail, Header, Body } from '../../../components/dirent-detail/detail'; | ||
import EmptyTip from '../../../components/empty-tip'; | ||
import { useMetadata } from '../../hooks'; | ||
import { VIEW_TYPE } from '../../constants'; | ||
|
||
import './index.css'; | ||
|
||
const ViewDetails = ({ viewId, onClose }) => { | ||
const { viewsMap } = useMetadata(); | ||
|
||
const view = useMemo(() => viewsMap[viewId], [viewId, viewsMap]); | ||
const icon = useMemo(() => { | ||
const type = view.type; | ||
if (type === VIEW_TYPE.GALLERY) return `${mediaUrl}favicons/gallery.png`; | ||
if (type === VIEW_TYPE.TABLE) return `${mediaUrl}favicons/table.png`; | ||
}, [view]); | ||
|
||
return ( | ||
<Detail className="sf-metadata-view-detail"> | ||
<Header title={view.name} icon={icon} iconSize={28} onClose={onClose} /> | ||
<Body> | ||
<div className="detail-content detail-content-empty"> | ||
<EmptyTip text={gettext('There is no information to display.')} /> | ||
</div> | ||
</Body> | ||
</Detail> | ||
); | ||
}; | ||
|
||
ViewDetails.propTypes = { | ||
viewId: PropTypes.string.isRequired, | ||
onClose: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default ViewDetails; |
Oops, something went wrong.