1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-07 20:19:34 +00:00

Merge pull request #3677 from haiwen/share-bug-repair

repair share bug
This commit is contained in:
Daniel Pan 2019-06-19 17:31:59 +08:00 committed by GitHub
commit 0c75ced2ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -458,12 +458,10 @@ class DirentListItem extends React.Component {
}
renderItemOperation = () => {
let { dirent, selectedDirentList, currentRepoInfo } = this.props;
let { dirent, selectedDirentList, currentRepoInfo, showShareBtn } = this.props;
if (currentRepoInfo.permission === 'cloud-edit' || currentRepoInfo.permission === 'preview') {
return '';
}
let isShowShareBtn = (dirent.type === 'dir' && this.props.showShareBtn) || canGenerateShareLink;
return (
<Fragment>
@ -475,7 +473,7 @@ class DirentListItem extends React.Component {
<li className="operation-group-item">
<i className="op-icon sf2-icon-download" title={gettext('Download')} onClick={this.onItemDownload}></i>
</li>
{isShowShareBtn &&
{showShareBtn &&
<li className="operation-group-item">
<i className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onItemShare}></i>
</li>
@ -505,7 +503,7 @@ class DirentListItem extends React.Component {
<li className="operation-group-item">
<i className="op-icon sf2-icon-download" title={gettext('Download')} onClick={this.onItemDownload}></i>
</li>
{isShowShareBtn &&
{showShareBtn &&
<li className="operation-group-item">
<i className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onItemShare}></i>
</li>