mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-08 04:30:28 +00:00
commit
0c75ced2ee
@ -458,13 +458,11 @@ class DirentListItem extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderItemOperation = () => {
|
renderItemOperation = () => {
|
||||||
let { dirent, selectedDirentList, currentRepoInfo } = this.props;
|
let { dirent, selectedDirentList, currentRepoInfo, showShareBtn } = this.props;
|
||||||
if (currentRepoInfo.permission === 'cloud-edit' || currentRepoInfo.permission === 'preview') {
|
if (currentRepoInfo.permission === 'cloud-edit' || currentRepoInfo.permission === 'preview') {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
let isShowShareBtn = (dirent.type === 'dir' && this.props.showShareBtn) || canGenerateShareLink;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{selectedDirentList.length > 1 ?
|
{selectedDirentList.length > 1 ?
|
||||||
@ -475,7 +473,7 @@ class DirentListItem extends React.Component {
|
|||||||
<li className="operation-group-item">
|
<li className="operation-group-item">
|
||||||
<i className="op-icon sf2-icon-download" title={gettext('Download')} onClick={this.onItemDownload}></i>
|
<i className="op-icon sf2-icon-download" title={gettext('Download')} onClick={this.onItemDownload}></i>
|
||||||
</li>
|
</li>
|
||||||
{isShowShareBtn &&
|
{showShareBtn &&
|
||||||
<li className="operation-group-item">
|
<li className="operation-group-item">
|
||||||
<i className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onItemShare}></i>
|
<i className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onItemShare}></i>
|
||||||
</li>
|
</li>
|
||||||
@ -505,7 +503,7 @@ class DirentListItem extends React.Component {
|
|||||||
<li className="operation-group-item">
|
<li className="operation-group-item">
|
||||||
<i className="op-icon sf2-icon-download" title={gettext('Download')} onClick={this.onItemDownload}></i>
|
<i className="op-icon sf2-icon-download" title={gettext('Download')} onClick={this.onItemDownload}></i>
|
||||||
</li>
|
</li>
|
||||||
{isShowShareBtn &&
|
{showShareBtn &&
|
||||||
<li className="operation-group-item">
|
<li className="operation-group-item">
|
||||||
<i className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onItemShare}></i>
|
<i className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onItemShare}></i>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user