mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-12 14:38:58 +00:00
Merge pull request #3356 from haiwen/fix-collab
collaborate server button
This commit is contained in:
commit
abff0ecad5
@ -5,6 +5,8 @@ import { IconButton, ButtonGroup, CollabUsersButton } from '@seafile/seafile-edi
|
|||||||
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem, Tooltip } from 'reactstrap';
|
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem, Tooltip } from 'reactstrap';
|
||||||
import FileInfo from '@seafile/seafile-editor/dist/components/topbarcomponent/file-info';
|
import FileInfo from '@seafile/seafile-editor/dist/components/topbarcomponent/file-info';
|
||||||
|
|
||||||
|
const { seafileCollabServer } = window.app.config;
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isDocs: PropTypes.bool.isRequired,
|
isDocs: PropTypes.bool.isRequired,
|
||||||
hasDraft: PropTypes.bool.isRequired,
|
hasDraft: PropTypes.bool.isRequired,
|
||||||
@ -31,7 +33,12 @@ const MoreMenuPropTypes = {
|
|||||||
readOnly: PropTypes.bool.isRequired,
|
readOnly: PropTypes.bool.isRequired,
|
||||||
openDialogs: PropTypes.func.isRequired,
|
openDialogs: PropTypes.func.isRequired,
|
||||||
onEdit: 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 {
|
class MoreMenu extends React.PureComponent {
|
||||||
@ -126,8 +133,13 @@ class MarkdownViewerToolbar extends React.Component {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{this.props.collabUsers.length > 0 && <CollabUsersButton className={'collab-users-dropdown'}
|
{(seafileCollabServer && this.props.collabUsers.length > 0) &&
|
||||||
users={this.props.collabUsers} id={'usersButton'} />}
|
<CollabUsersButton
|
||||||
|
className="collab-users-dropdown"
|
||||||
|
users={this.props.collabUsers}
|
||||||
|
id="usersButton"
|
||||||
|
/>
|
||||||
|
}
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
<IconButton id={'shareBtn'} text={gettext('Share')} icon={'fa fa-share-alt'}
|
<IconButton id={'shareBtn'} text={gettext('Share')} icon={'fa fa-share-alt'}
|
||||||
onMouseDown={this.props.toggleShareLinkDialog}/>
|
onMouseDown={this.props.toggleShareLinkDialog}/>
|
||||||
@ -193,8 +205,13 @@ class MarkdownViewerToolbar extends React.Component {
|
|||||||
<FileInfo toggleStar={this.props.toggleStar} editorUtilities={this.props.editorUtilities}
|
<FileInfo toggleStar={this.props.toggleStar} editorUtilities={this.props.editorUtilities}
|
||||||
fileInfo={this.props.fileInfo}/>
|
fileInfo={this.props.fileInfo}/>
|
||||||
<div className="topbar-btn-container">
|
<div className="topbar-btn-container">
|
||||||
{this.props.collabUsers.length > 0 && <CollabUsersButton className={'collab-users-dropdown'}
|
{(seafileCollabServer && this.props.collabUsers.length > 0) &&
|
||||||
users={this.props.collabUsers} id={'usersButton'} />}
|
<CollabUsersButton
|
||||||
|
className="collab-users-dropdown"
|
||||||
|
users={this.props.collabUsers}
|
||||||
|
id="usersButton"
|
||||||
|
/>
|
||||||
|
}
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
{ saving ?
|
{ saving ?
|
||||||
<button type={'button'} className={'btn btn-icon btn-secondary btn-active'}>
|
<button type={'button'} className={'btn btn-icon btn-secondary btn-active'}>
|
||||||
|
Loading…
Reference in New Issue
Block a user