From 8dc7c950a30783d6160e77b206c4a219c1cceace Mon Sep 17 00:00:00 2001 From: Michael An <2331806369@qq.com> Date: Tue, 13 Aug 2019 10:42:21 +0800 Subject: [PATCH] change tooltip (#3977) --- .../components/toolbar/markdown-viewer-toolbar.js | 12 ++++++------ frontend/src/markdown-editor.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/toolbar/markdown-viewer-toolbar.js b/frontend/src/components/toolbar/markdown-viewer-toolbar.js index 7e4601b3bf..434f7e99ac 100644 --- a/frontend/src/components/toolbar/markdown-viewer-toolbar.js +++ b/frontend/src/components/toolbar/markdown-viewer-toolbar.js @@ -18,7 +18,7 @@ const propTypes = { onEdit: PropTypes.func.isRequired, toggleNewDraft: PropTypes.func.isRequired, toggleStar: PropTypes.func.isRequired, - backToParentDirectory: PropTypes.func.isRequired, + openParentDirectory: PropTypes.func.isRequired, openDialogs: PropTypes.func.isRequired, showFileHistory: PropTypes.bool.isRequired, toggleHistory: PropTypes.func.isRequired, @@ -39,7 +39,7 @@ const MoreMenuPropTypes = { editorMode: PropTypes.string.isRequired, isSmallScreen: PropTypes.bool, toggleShareLinkDialog: PropTypes.func, - backToParentDirectory: PropTypes.func, + openParentDirectory: PropTypes.func, showFileHistory: PropTypes.bool, toggleHistory: PropTypes.func, }; @@ -81,7 +81,7 @@ class MoreMenu extends React.PureComponent { {gettext('Help')} } {isSmall && canGenerateShareLink && {gettext('Share')}} - {isSmall && {gettext('Back to parent directory')}} + {isSmall && {gettext('Open parent directory')}} {(isSmall && this.props.showFileHistory) && {gettext('File History')} } @@ -148,8 +148,8 @@ class MarkdownViewerToolbar extends React.Component { /> } - + {(canLockUnlockFile && !isLocked) && } @@ -204,7 +204,7 @@ class MarkdownViewerToolbar extends React.Component { editorMode={this.props.editorMode} onEdit={this.props.onEdit} toggleShareLinkDialog={this.props.toggleShareLinkDialog} - backToParentDirectory={this.props.backToParentDirectory} + openParentDirectory={this.props.openParentDirectory} showFileHistory={this.props.showFileHistory} toggleHistory={this.props.toggleHistory} isSmallScreen={true} diff --git a/frontend/src/markdown-editor.js b/frontend/src/markdown-editor.js index 1be0f2ffc6..1bcdb43e55 100644 --- a/frontend/src/markdown-editor.js +++ b/frontend/src/markdown-editor.js @@ -681,7 +681,7 @@ class MarkdownEditor extends React.Component { } } - backToParentDirectory = () => { + openParentDirectory = () => { window.location.href = editorUtilities.getParentDectionaryUrl(); } @@ -749,7 +749,7 @@ class MarkdownEditor extends React.Component { collabUsers={this.state.collabUsers} fileInfo={this.state.fileInfo} toggleStar={this.toggleStar} - backToParentDirectory={this.backToParentDirectory} + openParentDirectory={this.openParentDirectory} openDialogs={this.openDialogs} toggleShareLinkDialog={this.toggleShareLinkDialog} onEdit={this.onEdit}