1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 08:53:14 +00:00

add libraryType to choose different create repo method

This commit is contained in:
shanshuirenjia
2018-12-07 13:21:43 +08:00
parent a51bc8cea5
commit 6420c7fcdb
4 changed files with 36 additions and 23 deletions

View File

@@ -6,7 +6,7 @@ import CreateRepoDialog from '../dialog/create-repo-dialog';
const propTypes = {
// isOwnLibrary: PropTypes.bool.isRequired,
// libraryType: PropTypes.string.isRequired,
libraryType: PropTypes.string.isRequired,
onCreateRepo: PropTypes.func.isRequired,
};
@@ -38,12 +38,15 @@ class RepoViewToolbar extends React.Component {
<i className="fas fa-plus-square op-icon"></i>
{gettext('New Library')}
</button>
<button className="btn btn-secondary operation-item" title={gettext('More')} onClick={this.onShareClick}>{gettext('More')}</button>
{this.props.libraryType !== 'group' && (
<button className="btn btn-secondary operation-item" title={gettext('More')} onClick={this.onShareClick}>{gettext('More')}</button>
)}
</div>
</div>
{this.state.isCreateRepoDialogShow && (
<ModalPortal>
<CreateRepoDialog
libraryType={this.props.libraryType}
onCreateRepo={this.onCreateRepo}
onCreateToggle={this.onCreateToggle}
/>