1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-30 13:23:14 +00:00

delete extra blanks

This commit is contained in:
LeoSirius 2019-04-19 22:44:41 +08:00
parent 9df8dcf64f
commit dc81840916

View File

@ -40,11 +40,11 @@ class FileToolbar extends React.Component {
this.setState({isShareDialogOpen: !this.state.isShareDialogOpen}); this.setState({isShareDialogOpen: !this.state.isShareDialogOpen});
} }
toggle = () => { toggle = () => {
this.setState({ this.setState({
dropdownOpen: !this.state.dropdownOpen dropdownOpen: !this.state.dropdownOpen
}); });
} }
render() { render() {
const { isLocked, lockedByMe } = this.props; const { isLocked, lockedByMe } = this.props;
@ -141,53 +141,53 @@ class FileToolbar extends React.Component {
)} )}
</ButtonGroup> </ButtonGroup>
<Dropdown isOpen={this.state.dropdownOpen} toggle={this.toggle} className="d-block d-md-none"> <Dropdown isOpen={this.state.dropdownOpen} toggle={this.toggle} className="d-block d-md-none">
<DropdownToggle className="sf2-icon-more"> <DropdownToggle className="sf2-icon-more">
</DropdownToggle> </DropdownToggle>
<DropdownMenu right={true}> <DropdownMenu right={true}>
<DropdownItem> <DropdownItem>
<a href={`${siteRoot}library/${repoID}/${Utils.encodePath(repoName + parentDir)}`} className="text-inherit"> <a href={`${siteRoot}library/${repoID}/${Utils.encodePath(repoName + parentDir)}`} className="text-inherit">
{gettext('Open parent folder')} {gettext('Open parent folder')}
</a> </a>
</DropdownItem> </DropdownItem>
{showLockUnlockBtn && ( {showLockUnlockBtn && (
<DropdownItem onClick={this.props.toggleLockFile}> <DropdownItem onClick={this.props.toggleLockFile}>
{lockUnlockText} {lockUnlockText}
</DropdownItem> </DropdownItem>
)} )}
{showShareBtn && ( {showShareBtn && (
<DropdownItem onClick={this.toggleShareDialog}> <DropdownItem onClick={this.toggleShareDialog}>
{gettext('Share')} {gettext('Share')}
</DropdownItem> </DropdownItem>
)} )}
{filePerm == 'rw' && ( {filePerm == 'rw' && (
<DropdownItem> <DropdownItem>
<a href={`${siteRoot}repo/file_revisions/${repoID}/?p=${encodeURIComponent(filePath)}&referer=${encodeURIComponent(location.href)}`} className="text-inherit"> <a href={`${siteRoot}repo/file_revisions/${repoID}/?p=${encodeURIComponent(filePath)}&referer=${encodeURIComponent(location.href)}`} className="text-inherit">
{gettext('History')} {gettext('History')}
</a> </a>
</DropdownItem> </DropdownItem>
)} )}
{(canEditFile && !err) && ( {(canEditFile && !err) && (
<DropdownItem> <DropdownItem>
<a href={`${siteRoot}repo/${repoID}/file/edit/?p=${encodeURIComponent(filePath)}&file_enc=${encodeURIComponent(fileEnc)}`} className="text-inherit"> <a href={`${siteRoot}repo/${repoID}/file/edit/?p=${encodeURIComponent(filePath)}&file_enc=${encodeURIComponent(fileEnc)}`} className="text-inherit">
{gettext('Edit')} {gettext('Edit')}
</a> </a>
</DropdownItem> </DropdownItem>
)} )}
{canDownloadFile && ( {canDownloadFile && (
<DropdownItem> <DropdownItem>
<a href="?dl=1" className="text-inherit"> <a href="?dl=1" className="text-inherit">
{gettext('Download')} {gettext('Download')}
</a> </a>
</DropdownItem> </DropdownItem>
)} )}
{enableComment && ( {enableComment && (
<DropdownItem onClick={this.props.toggleCommentPanel}> <DropdownItem onClick={this.props.toggleCommentPanel}>
{gettext('Comment')} {gettext('Comment')}
</DropdownItem> </DropdownItem>
)} )}
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
{this.state.isShareDialogOpen && {this.state.isShareDialogOpen &&
<ModalPortal> <ModalPortal>