1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 19:29:56 +00:00

fix share TabPane (#4287)

This commit is contained in:
sniper-py
2019-11-22 14:36:37 +08:00
committed by Daniel Pan
parent ae14afe04e
commit 04c4ba55c4

View File

@@ -131,7 +131,7 @@ class ShareDialog extends React.Component {
</div>
<div className="share-dialog-main">
<TabContent activeTab={this.state.activeTab}>
{enableShareLink &&
{(enableShareLink && activeTab === 'shareLink') &&
<TabPane tabId="shareLink">
<GenerateShareLink
itemPath={this.props.itemPath}
@@ -141,7 +141,7 @@ class ShareDialog extends React.Component {
/>
</TabPane>
}
{enableUploadLink &&
{(enableUploadLink && activeTab === 'uploadLink') &&
<TabPane tabId="uploadLink">
<GenerateUploadLink
itemPath={this.props.itemPath}
@@ -150,7 +150,7 @@ class ShareDialog extends React.Component {
/>
</TabPane>
}
{itemType === 'dir' && activeTab === 'internalLink' &&
{(itemType === 'dir' && activeTab === 'internalLink') &&
<InternalLink
path={this.props.itemPath}
repoID={this.props.repoID}
@@ -159,17 +159,21 @@ class ShareDialog extends React.Component {
}
{enableDirPrivateShare &&
<Fragment>
{activeTab === 'shareToUser' &&
<TabPane tabId="shareToUser">
<ShareToUser itemType={this.props.itemType} isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} isRepoOwner={this.state.isRepoOwner} />
</TabPane>
{canInvitePeople &&
}
{activeTab === 'shareToGroup' &&
<TabPane tabId="shareToGroup">
<ShareToGroup itemType={this.props.itemType} isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} isRepoOwner={this.state.isRepoOwner} />
</TabPane>
}
{(canInvitePeople && activeTab === 'invitePeople') &&
<TabPane tabId="invitePeople">
<ShareToInvitePeople itemPath={this.props.itemPath} repoID={this.props.repoID} />
</TabPane>
}
<TabPane tabId="shareToGroup">
<ShareToGroup itemType={this.props.itemType} isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} isRepoOwner={this.state.isRepoOwner}/>
</TabPane>
</Fragment>
}
</TabContent>
@@ -200,6 +204,7 @@ class ShareDialog extends React.Component {
</div>
<div className="share-dialog-main">
<TabContent activeTab={this.state.activeTab}>
{activeTab === 'shareLink' &&
<TabPane tabId="shareLink">
<GenerateShareLink
itemPath={this.props.itemPath}
@@ -208,6 +213,7 @@ class ShareDialog extends React.Component {
itemType={itemType}
/>
</TabPane>
}
{activeTab === 'internalLink' &&
<InternalLink
path={this.props.itemPath}