1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 01:44:13 +00:00

refactor: face ui (#6981)

* refactor: face ui

* feat: people pgotos

* feat: people pgotos

* feat: optimize ui

* feat: optimize ui

* feat: delete file

* optimize code

* feat: replace icon

* update

* feat: replace icon

* feat: optimize back btn

---------

Co-authored-by: 杨国璇 <ygx@Hello-word.local>
Co-authored-by: 杨国璇 <ygx@192.168.1.3>
Co-authored-by: ‘JoinTyang’ <yangtong1009@163.com>
This commit is contained in:
杨国璇
2024-11-05 17:37:24 +08:00
committed by GitHub
parent 8f04a770f7
commit 2cb758e302
39 changed files with 1593 additions and 927 deletions

View File

@@ -11,7 +11,6 @@ import ReposSortMenu from '../../components/repos-sort-menu';
import MetadataViewToolBar from '../../metadata/components/view-toolbar';
import { PRIVATE_FILE_TYPE } from '../../constants';
import { DIRENT_DETAIL_MODE } from '../dir-view-mode/constants';
import { FACE_RECOGNITION_VIEW_ID } from '../../metadata/constants';
const propTypes = {
repoID: PropTypes.string.isRequired,
@@ -118,7 +117,6 @@ class DirTool extends React.Component {
});
if (isFileExtended) {
if (viewId === FACE_RECOGNITION_VIEW_ID) return null;
return (
<div className="dir-tool">
<MetadataViewToolBar viewId={viewId} isCustomPermission={isCustomPermission} showDetail={this.showDirentDetail} />

View File

@@ -2,4 +2,3 @@ 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';

View File

@@ -9,8 +9,7 @@ import ResizeBar from '../resize-bar';
import { DRAG_HANDLER_HEIGHT, MAX_SIDE_PANEL_RATE, MIN_SIDE_PANEL_RATE } from '../resize-bar/constants';
import { SeafileMetadata } from '../../metadata';
import { mediaUrl } from '../../utils/constants';
import { GRID_MODE, LIST_MODE, METADATA_MODE, FACE_RECOGNITION_MODE } from './constants';
import FaceRecognition from '../../metadata/views/face-recognition';
import { GRID_MODE, LIST_MODE, METADATA_MODE } from './constants';
const propTypes = {
isSidePanelFolded: PropTypes.bool,
@@ -81,6 +80,7 @@ const propTypes = {
onItemsScroll: PropTypes.func.isRequired,
eventBus: PropTypes.object,
updateCurrentDirent: PropTypes.func.isRequired,
closeDirentDetail: PropTypes.func.isRequired,
};
class DirColumnView extends React.Component {
@@ -195,7 +195,7 @@ class DirColumnView extends React.Component {
onScroll={this.props.isViewFile ? () => {} : this.props.onItemsScroll}
ref={this.dirContentMain}
>
{currentMode === METADATA_MODE &&
{currentMode === METADATA_MODE && (
<SeafileMetadata
mediaUrl={mediaUrl}
repoID={this.props.repoID}
@@ -204,11 +204,9 @@ class DirColumnView extends React.Component {
deleteFilesCallback={this.props.deleteFilesCallback}
renameFileCallback={this.props.renameFileCallback}
updateCurrentDirent={this.props.updateCurrentDirent}
closeDirentDetail={this.props.closeDirentDetail}
/>
}
{currentMode === FACE_RECOGNITION_MODE &&
<FaceRecognition repoID={this.props.repoID}/>
}
)}
{currentMode === LIST_MODE &&
<DirListView
path={this.props.path}

View File

@@ -4,7 +4,7 @@
align-items: center;
justify-content: space-between;
line-height: 2.5rem;
border-bottom: 1px solid #e8e8e8;
border-bottom: 1px solid #eee;
height: 48px;
padding: 8px 16px;
}