1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 08:28:11 +00:00

Add internal links to the dir (#3947)

* Add internal links to the dir

* Indent style
This commit is contained in:
zxj96
2019-08-05 17:31:15 +08:00
committed by Daniel Pan
parent affa4f8d12
commit c7933c7f63
4 changed files with 20 additions and 8 deletions

View File

@@ -76,7 +76,7 @@ class ShareDialog extends React.Component {
}
let activeTab = this.state.activeTab;
const {repoEncrypted, userPerm, enableDirPrivateShare} = this.props;
const {repoEncrypted, userPerm, enableDirPrivateShare, itemType} = this.props;
const enableShareLink = !repoEncrypted && canGenerateShareLink;
const enableUploadLink = !repoEncrypted && canGenerateUploadLink && userPerm == 'rw';
@@ -98,6 +98,11 @@ class ShareDialog extends React.Component {
</NavLink>
</NavItem>
}
<NavItem>
<NavLink className={activeTab === 'internalLink' ? 'active' : ''} onClick={this.toggle.bind(this, 'internalLink')}>
{gettext('Internal Link')}
</NavLink>
</NavItem>
{enableDirPrivateShare &&
<Fragment>
<NavItem>
@@ -134,6 +139,13 @@ class ShareDialog extends React.Component {
/>
</TabPane>
}
<TabPane tabId="internalLink">
<InternalLink
path={this.props.itemPath}
repoID={this.props.repoID}
direntType={itemType}
/>
</TabPane>
{enableDirPrivateShare &&
<Fragment>
<TabPane tabId="shareToUser">