2019-02-21 17:37:04 +08:00
|
|
|
import React, { Fragment } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2019-03-15 10:10:24 +08:00
|
|
|
import { gettext } from '../../utils/constants';
|
2019-02-21 17:37:04 +08:00
|
|
|
import CommonToolbar from '../../components/toolbar/common-toolbar';
|
|
|
|
|
|
|
|
const propTypes = {
|
|
|
|
onSideNavMenuClick: PropTypes.func.isRequired,
|
|
|
|
repoID: PropTypes.string.isRequired,
|
|
|
|
repoName: PropTypes.string.isRequired,
|
|
|
|
onSearchedClick: PropTypes.func.isRequired,
|
2019-05-30 14:13:23 +08:00
|
|
|
currentRepoInfo: PropTypes.object,
|
2024-06-06 12:11:49 +08:00
|
|
|
path: PropTypes.string,
|
2024-06-13 11:34:51 +08:00
|
|
|
isViewFile: PropTypes.bool,
|
2019-02-21 17:37:04 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LibContentToolbar extends React.Component {
|
|
|
|
|
2019-02-22 15:35:31 +08:00
|
|
|
render() {
|
2019-02-21 17:37:04 +08:00
|
|
|
return (
|
|
|
|
<Fragment>
|
|
|
|
<div className="cur-view-toolbar">
|
|
|
|
<span className="sf2-icon-menu hidden-md-up d-md-none side-nav-toggle" title={gettext('Side Nav Menu')} onClick={this.props.onSideNavMenuClick}></span>
|
|
|
|
</div>
|
2023-10-09 17:32:13 +08:00
|
|
|
<CommonToolbar
|
|
|
|
isLibView={true}
|
2024-06-06 12:11:49 +08:00
|
|
|
path={this.props.path}
|
2024-06-13 11:34:51 +08:00
|
|
|
isViewFile={this.props.isViewFile}
|
2023-10-09 17:32:13 +08:00
|
|
|
repoID={this.props.repoID}
|
|
|
|
repoName={this.props.repoName}
|
2024-01-09 18:23:11 +08:00
|
|
|
currentRepoInfo={this.props.currentRepoInfo}
|
2023-10-09 17:32:13 +08:00
|
|
|
onSearchedClick={this.props.onSearchedClick}
|
|
|
|
/>
|
2019-02-21 17:37:04 +08:00
|
|
|
</Fragment>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LibContentToolbar.propTypes = propTypes;
|
|
|
|
|
|
|
|
export default LibContentToolbar;
|