1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 16:10:26 +00:00

Dir mode optimized (#2992)

* optimized isRepoOwner&isAdmin

* optimized isAdmin

* optimized encrypted porps

* optimized showShareBtn judgement

* repair share bug

* update showShareBtn logic

* delete unnecessary comment
This commit is contained in:
杨顺强
2019-02-27 13:53:36 +08:00
committed by Daniel Pan
parent 34d4fe1017
commit 344eca259a
12 changed files with 61 additions and 81 deletions

View File

@@ -54,7 +54,7 @@ class ShareDialog extends React.Component {
const {repoEncrypted, userPerm, enableDirPrivateShare} = this.props;
const enableShareLink = !repoEncrypted && canGenerateShareLink;
const enableUploadLink = !repoEncrypted && canGenerateUploadLink && userPerm == 'rw';
return (
<Fragment>
<div className="share-dialog-side">
@@ -112,10 +112,10 @@ class ShareDialog extends React.Component {
{enableDirPrivateShare &&
<Fragment>
<TabPane tabId="shareToUser">
<ShareToUser isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} />
<ShareToUser itemType={this.props.itemType} isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} />
</TabPane>
<TabPane tabId="shareToGroup">
<ShareToGroup isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} />
<ShareToGroup itemType={this.props.itemType} isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} />
</TabPane>
</Fragment>
}