mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-19 18:29:23 +00:00
refactor: metadata view (#6322)
* refactor: metadata view * feat: update code * feat: update code * feat: update code --------- Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
@@ -8,6 +8,7 @@ import SeahubPopover from '../common/seahub-popover';
|
||||
import ListTagPopover from '../popover/list-tag-popover';
|
||||
import ViewModes from '../../components/view-modes';
|
||||
import { PRIVATE_FILE_TYPE } from '../../constants';
|
||||
import MetadataViewToolBar from '../../metadata/metadata-view/components/view-toolbar';
|
||||
|
||||
const propTypes = {
|
||||
repoID: PropTypes.string.isRequired,
|
||||
@@ -83,11 +84,20 @@ class DirTool extends React.Component {
|
||||
const { repoID, currentMode, currentPath } = this.props;
|
||||
const propertiesText = TextTranslation.PROPERTIES.value;
|
||||
const isFileExtended = currentPath === '/' + PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES;
|
||||
|
||||
if (isFileExtended) {
|
||||
return (
|
||||
<div className="d-flex">
|
||||
<MetadataViewToolBar />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="d-flex">
|
||||
<ViewModes currentViewMode={currentMode} switchViewMode={this.props.switchViewMode} />
|
||||
{(!this.props.isCustomPermission && !isFileExtended) &&
|
||||
{(!this.props.isCustomPermission) &&
|
||||
<span className="cur-view-path-btn ml-2" onClick={() => this.props.switchViewMode('detail')}>
|
||||
<span className="sf3-font sf3-font-info" aria-label={propertiesText} title={propertiesText}></span>
|
||||
</span>
|
||||
|
@@ -1,15 +0,0 @@
|
||||
.dir-column-file {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dir-column-file .dir-column-file-top {
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
z-index: 7;
|
||||
transform: translateZ(1000px);
|
||||
position: relative;
|
||||
background: #ffffff;
|
||||
}
|
@@ -5,8 +5,6 @@ import { Utils } from '../../utils/utils';
|
||||
import { gettext, siteRoot, lang, mediaUrl } from '../../utils/constants';
|
||||
import SeafileMarkdownViewer from '../seafile-markdown-viewer';
|
||||
|
||||
import './dir-column-file.css';
|
||||
|
||||
const propTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
repoID: PropTypes.string.isRequired,
|
||||
@@ -60,12 +58,7 @@ class DirColumnFile extends React.Component {
|
||||
mediaUrl,
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="dir-column-file w-100 h-100 o-hidden d-flex">
|
||||
<div className="dir-column-file-top"></div>
|
||||
<SeafileMetadata repoID={this.props.repoID} currentRepoInfo={this.props.currentRepoInfo} />
|
||||
</div>
|
||||
);
|
||||
return (<SeafileMetadata repoID={this.props.repoID} currentRepoInfo={this.props.currentRepoInfo} />);
|
||||
}
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user