1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +00:00
Files
seahub/frontend/src/components/file-chooser/tree-list-view.js
Aries 8623e01e99 Improve move and copy dialog ui components (#6467)
* implement catalog view in move dialog

* update move dialog ui components

* improve move dialog ui

* remove debug info

* improve copy dialog ui

* improve search view ui in move and copy dialog, refactor part of file-chooser.js and file-chooser.css

* handle cases where repo_name is too long, truncate text with an ellipsis, remove search container border

* handle cases where repo_name too long in search result item

* update move and dialog ui details

* add radius to repo list item
2024-08-05 10:48:16 +08:00

41 lines
1.1 KiB
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import TreeListItem from './tree-list-item';
const propTypes = {
selectedPath: PropTypes.string,
selectedRepo: PropTypes.object,
repo: PropTypes.object.isRequired,
onDirentItemClick: PropTypes.func.isRequired,
treeData: PropTypes.object.isRequired,
onNodeCollapse: PropTypes.func.isRequired,
onNodeExpanded: PropTypes.func.isRequired,
fileSuffixes: PropTypes.array,
};
class TreeListView extends React.Component {
render() {
return (
<div className="list-view-content">
<TreeListItem
node={this.props.treeData.root}
onNodeCollapse={this.props.onNodeCollapse}
onNodeExpanded={this.props.onNodeExpanded}
repo={this.props.repo}
onDirentItemClick={this.props.onDirentItemClick}
selectedRepo={this.props.selectedRepo}
selectedPath={this.props.selectedPath}
fileSuffixes={this.props.fileSuffixes}
level={0}
/>
</div>
);
}
}
TreeListView.propTypes = propTypes;
export default TreeListView;