mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 07:08:55 +00:00
fix file extended info bug (#6316)
This commit is contained in:
@@ -7,6 +7,7 @@ import TextTranslation from '../../utils/text-translation';
|
|||||||
import SeahubPopover from '../common/seahub-popover';
|
import SeahubPopover from '../common/seahub-popover';
|
||||||
import ListTagPopover from '../popover/list-tag-popover';
|
import ListTagPopover from '../popover/list-tag-popover';
|
||||||
import ViewModes from '../../components/view-modes';
|
import ViewModes from '../../components/view-modes';
|
||||||
|
import { PRIVATE_FILE_TYPE } from '../../constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
repoID: PropTypes.string.isRequired,
|
repoID: PropTypes.string.isRequired,
|
||||||
@@ -79,13 +80,14 @@ class DirTool extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
const menuItems = this.getMenu();
|
const menuItems = this.getMenu();
|
||||||
const { isDropdownMenuOpen } = this.state;
|
const { isDropdownMenuOpen } = this.state;
|
||||||
const { repoID, currentMode } = this.props;
|
const { repoID, currentMode, currentPath } = this.props;
|
||||||
const propertiesText = TextTranslation.PROPERTIES.value;
|
const propertiesText = TextTranslation.PROPERTIES.value;
|
||||||
|
const isFileExtended = currentPath === '/' + PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES;
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<div className="d-flex">
|
<div className="d-flex">
|
||||||
<ViewModes currentViewMode={currentMode} switchViewMode={this.props.switchViewMode} />
|
<ViewModes currentViewMode={currentMode} switchViewMode={this.props.switchViewMode} />
|
||||||
{!this.props.isCustomPermission &&
|
{(!this.props.isCustomPermission && !isFileExtended) &&
|
||||||
<span className="cur-view-path-btn ml-2" onClick={() => this.props.switchViewMode('detail')}>
|
<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 className="sf3-font sf3-font-info" aria-label={propertiesText} title={propertiesText}></span>
|
||||||
</span>
|
</span>
|
||||||
|
Reference in New Issue
Block a user