mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 00:00:00 +00:00
modify some style
This commit is contained in:
@@ -414,11 +414,10 @@ class DirentListItem extends React.Component {
|
||||
}
|
||||
|
||||
let isShowShareBtn = false;
|
||||
|
||||
if (canGenerateShareLink) {
|
||||
isShowShareBtn = true;
|
||||
} else {
|
||||
if (this.props.showShareBtn) {
|
||||
if (this.props.showShareBtn) {
|
||||
if (canGenerateShareLink) {
|
||||
isShowShareBtn = true;
|
||||
} else {
|
||||
if (dirent.type === 'dir') {
|
||||
isShowShareBtn = true;
|
||||
} else {
|
||||
@@ -437,7 +436,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>
|
||||
{this.props.showShareBtn && isShowShareBtn &&
|
||||
{isShowShareBtn &&
|
||||
<li className="operation-group-item">
|
||||
<i className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onItemShare}></i>
|
||||
</li>
|
||||
@@ -467,7 +466,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>
|
||||
{this.props.showShareBtn && isShowShareBtn &&
|
||||
{isShowShareBtn &&
|
||||
<li className="operation-group-item">
|
||||
<i className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onItemShare}></i>
|
||||
</li>
|
||||
|
@@ -461,7 +461,7 @@ class DirentListView extends React.Component {
|
||||
contextmenuList = this.props.showShareBtn ? [SHARE, DOWNLOAD, DELETE, 'Divider'] : [DOWNLOAD, DELETE, 'Divider'];
|
||||
|
||||
if (dirent.type === 'file') {
|
||||
contextmenuList = canGenerateShareLink ? [SHARE, DOWNLOAD, DELETE, 'Divider'] : [DOWNLOAD, DELETE, 'Divider']
|
||||
contextmenuList = canGenerateShareLink ? [SHARE, DOWNLOAD, DELETE, 'Divider'] : [DOWNLOAD, DELETE, 'Divider'];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -77,7 +77,7 @@ class MoreMenu extends React.PureComponent {
|
||||
{(this.props.openDialogs && editorMode === 'rich') &&
|
||||
<DropdownItem onMouseDown={this.props.openDialogs.bind(this, 'help')}>{gettext('Help')}</DropdownItem>
|
||||
}
|
||||
{isSmall && <DropdownItem onMouseDown={this.props.toggleShareLinkDialog}>{gettext('Share')}</DropdownItem>}
|
||||
{isSmall && canGenerateShareLink && <DropdownItem onMouseDown={this.props.toggleShareLinkDialog}>{gettext('Share')}</DropdownItem>}
|
||||
{isSmall && <DropdownItem onMouseDown={this.props.backToParentDirectory}>{gettext('Back to parent directory')}</DropdownItem>}
|
||||
{(isSmall && this.props.showFileHistory) &&
|
||||
<DropdownItem onMouseDown={this.props.toggleHistory}>{gettext('File History')}</DropdownItem>
|
||||
|
Reference in New Issue
Block a user