From d0ca3f234410cbfe62e1eba4e059d6f10f82e4bd Mon Sep 17 00:00:00 2001 From: Michael An <1822852997@qq.com> Date: Tue, 23 Apr 2019 13:55:07 +0800 Subject: [PATCH] collab server --- .../toolbar/markdown-viewer-toolbar.js | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/toolbar/markdown-viewer-toolbar.js b/frontend/src/components/toolbar/markdown-viewer-toolbar.js index a963f78525..cd126e1949 100644 --- a/frontend/src/components/toolbar/markdown-viewer-toolbar.js +++ b/frontend/src/components/toolbar/markdown-viewer-toolbar.js @@ -5,6 +5,8 @@ import { IconButton, ButtonGroup, CollabUsersButton } from '@seafile/seafile-edi import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem, Tooltip } from 'reactstrap'; import FileInfo from '@seafile/seafile-editor/dist/components/topbarcomponent/file-info'; +const { seafileCollabServer } = window.app.config; + const propTypes = { isDocs: PropTypes.bool.isRequired, hasDraft: PropTypes.bool.isRequired, @@ -31,7 +33,12 @@ const MoreMenuPropTypes = { readOnly: PropTypes.bool.isRequired, openDialogs: PropTypes.func.isRequired, onEdit: PropTypes.func.isRequired, - editorMode: PropTypes.string.isRequired + editorMode: PropTypes.string.isRequired, + isSmallScreen: PropTypes.bool, + toggleShareLinkDialog: PropTypes.func, + backToParentDirectory: PropTypes.func, + showFileHistory: PropTypes.func, + toggleHistory: PropTypes.func, }; class MoreMenu extends React.PureComponent { @@ -126,8 +133,13 @@ class MarkdownViewerToolbar extends React.Component { } } - {this.props.collabUsers.length > 0 && } + {(seafileCollabServer && this.props.collabUsers.length > 0) && + + } @@ -193,8 +205,13 @@ class MarkdownViewerToolbar extends React.Component { - {this.props.collabUsers.length > 0 && } + {(seafileCollabServer && this.props.collabUsers.length > 0) && + + } { saving ?