1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-17 00:32:37 +00:00

Merge branch '7.0'

This commit is contained in:
plt 2019-08-14 13:36:49 +08:00
commit 10512c3647
2 changed files with 8 additions and 8 deletions

View File

@ -18,7 +18,7 @@ const propTypes = {
onEdit: PropTypes.func.isRequired, onEdit: PropTypes.func.isRequired,
toggleNewDraft: PropTypes.func.isRequired, toggleNewDraft: PropTypes.func.isRequired,
toggleStar: PropTypes.func.isRequired, toggleStar: PropTypes.func.isRequired,
backToParentDirectory: PropTypes.func.isRequired, openParentDirectory: PropTypes.func.isRequired,
openDialogs: PropTypes.func.isRequired, openDialogs: PropTypes.func.isRequired,
showFileHistory: PropTypes.bool.isRequired, showFileHistory: PropTypes.bool.isRequired,
toggleHistory: PropTypes.func.isRequired, toggleHistory: PropTypes.func.isRequired,
@ -39,7 +39,7 @@ const MoreMenuPropTypes = {
editorMode: PropTypes.string.isRequired, editorMode: PropTypes.string.isRequired,
isSmallScreen: PropTypes.bool, isSmallScreen: PropTypes.bool,
toggleShareLinkDialog: PropTypes.func, toggleShareLinkDialog: PropTypes.func,
backToParentDirectory: PropTypes.func, openParentDirectory: PropTypes.func,
showFileHistory: PropTypes.bool, showFileHistory: PropTypes.bool,
toggleHistory: PropTypes.func, toggleHistory: PropTypes.func,
}; };
@ -81,7 +81,7 @@ class MoreMenu extends React.PureComponent {
<DropdownItem onMouseDown={this.props.openDialogs.bind(this, 'help')}>{gettext('Help')}</DropdownItem> <DropdownItem onMouseDown={this.props.openDialogs.bind(this, 'help')}>{gettext('Help')}</DropdownItem>
} }
{isSmall && canGenerateShareLink && <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 && <DropdownItem onMouseDown={this.props.openParentDirectory}>{gettext('Open parent directory')}</DropdownItem>}
{(isSmall && this.props.showFileHistory) && {(isSmall && this.props.showFileHistory) &&
<DropdownItem onMouseDown={this.props.toggleHistory}>{gettext('File History')}</DropdownItem> <DropdownItem onMouseDown={this.props.toggleHistory}>{gettext('File History')}</DropdownItem>
} }
@ -148,8 +148,8 @@ class MarkdownViewerToolbar extends React.Component {
/> />
} }
<ButtonGroup> <ButtonGroup>
<IconButton text={gettext('Back to parent directory')} id={'parentDirectory'} <IconButton text={gettext('Open parent directory')} id={'parentDirectory'}
icon={'fa fa-folder-open'} onMouseDown={this.props.backToParentDirectory}/> icon={'fa fa-folder-open'} onMouseDown={this.props.openParentDirectory}/>
{(canLockUnlockFile && !isLocked) && {(canLockUnlockFile && !isLocked) &&
<IconButton id="lock-unlock-file" icon='fa fa-lock' text={gettext('Lock')} onMouseDown={this.props.toggleLockFile}/> <IconButton id="lock-unlock-file" icon='fa fa-lock' text={gettext('Lock')} onMouseDown={this.props.toggleLockFile}/>
} }
@ -204,7 +204,7 @@ class MarkdownViewerToolbar extends React.Component {
editorMode={this.props.editorMode} editorMode={this.props.editorMode}
onEdit={this.props.onEdit} onEdit={this.props.onEdit}
toggleShareLinkDialog={this.props.toggleShareLinkDialog} toggleShareLinkDialog={this.props.toggleShareLinkDialog}
backToParentDirectory={this.props.backToParentDirectory} openParentDirectory={this.props.openParentDirectory}
showFileHistory={this.props.showFileHistory} showFileHistory={this.props.showFileHistory}
toggleHistory={this.props.toggleHistory} toggleHistory={this.props.toggleHistory}
isSmallScreen={true} isSmallScreen={true}

View File

@ -715,7 +715,7 @@ class MarkdownEditor extends React.Component {
} }
} }
backToParentDirectory = () => { openParentDirectory = () => {
window.location.href = editorUtilities.getParentDectionaryUrl(); window.location.href = editorUtilities.getParentDectionaryUrl();
} }
@ -783,7 +783,7 @@ class MarkdownEditor extends React.Component {
collabUsers={this.state.collabUsers} collabUsers={this.state.collabUsers}
fileInfo={this.state.fileInfo} fileInfo={this.state.fileInfo}
toggleStar={this.toggleStar} toggleStar={this.toggleStar}
backToParentDirectory={this.backToParentDirectory} openParentDirectory={this.openParentDirectory}
openDialogs={this.openDialogs} openDialogs={this.openDialogs}
toggleShareLinkDialog={this.toggleShareLinkDialog} toggleShareLinkDialog={this.toggleShareLinkDialog}
onEdit={this.onEdit} onEdit={this.onEdit}