mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
Remove some features from the open source version (#3192)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Alert } from 'reactstrap';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import { gettext, isDocs } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
|
||||
const propTypes = {
|
||||
@@ -136,7 +136,7 @@ class CreateFile extends React.Component {
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
{this.props.fileType == '.md' && (
|
||||
{this.props.fileType == '.md' && isDocs && (
|
||||
<FormGroup check>
|
||||
<Label check>
|
||||
<Input type="checkbox" onChange={this.handleCheck}/>{' '}{gettext('This is a draft')}
|
||||
|
@@ -6,7 +6,7 @@ import { gettext, siteRoot, enableWiki, canAddRepo, canGenerateShareLink, canGen
|
||||
import { seafileAPI } from '../utils/seafile-api';
|
||||
import { Badge } from 'reactstrap';
|
||||
|
||||
import { canViewOrg } from '../utils/constants';
|
||||
import { canViewOrg, isDocs } from '../utils/constants';
|
||||
|
||||
const propTypes = {
|
||||
currentTab: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
||||
@@ -189,12 +189,14 @@ class MainSideNav extends React.Component {
|
||||
<span className="nav-text">{gettext('Favorites')}</span>
|
||||
</Link>
|
||||
</li>
|
||||
<li className="nav-item">
|
||||
<Link className={`nav-link ellipsis ${this.getActiveClass('dashboard')}`} to={siteRoot + 'dashboard/'} title={gettext('Activities')} onClick={() => this.tabItemClick('dashboard')}>
|
||||
<span className="sf2-icon-clock" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Activities')}</span>
|
||||
</Link>
|
||||
</li>
|
||||
{isDocs &&
|
||||
<li className="nav-item">
|
||||
<Link className={`nav-link ellipsis ${this.getActiveClass('dashboard')}`} to={siteRoot + 'dashboard/'} title={gettext('Activities')} onClick={() => this.tabItemClick('dashboard')}>
|
||||
<span className="sf2-icon-clock" aria-hidden="true"></span>
|
||||
<span className="nav-text">{gettext('Activities')}</span>
|
||||
</Link>
|
||||
</li>
|
||||
}
|
||||
{enableWiki &&
|
||||
<li className="nav-item">
|
||||
<Link className={`nav-link ellipsis ${this.getActiveClass('wikis')}`} to={siteRoot + 'wikis/'} title={gettext('Wikis')} onClick={() => this.tabItemClick('wikis')}>
|
||||
@@ -203,15 +205,17 @@ class MainSideNav extends React.Component {
|
||||
</Link>
|
||||
</li>
|
||||
}
|
||||
<li className="nav-item" onClick={() => this.tabItemClick('drafts')}>
|
||||
<Link className={`nav-link ellipsis ${this.getActiveClass('drafts')}`} to={siteRoot + 'drafts/'} title={gettext('Drafts')}>
|
||||
<span className="sf2-icon-edit" aria-hidden="true"></span>
|
||||
<span className="draft-info nav-text">
|
||||
{gettext('Drafts')}
|
||||
{this.props.draftCounts === 0 ? '' : <Badge color="info" pill>{this.props.draftCounts}</Badge>}
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
{isDocs &&
|
||||
<li className="nav-item" onClick={() => this.tabItemClick('drafts')}>
|
||||
<Link className={`nav-link ellipsis ${this.getActiveClass('drafts')}`} to={siteRoot + 'drafts/'} title={gettext('Drafts')}>
|
||||
<span className="sf2-icon-edit" aria-hidden="true"></span>
|
||||
<span className="draft-info nav-text">
|
||||
{gettext('Drafts')}
|
||||
{this.props.draftCounts === 0 ? '' : <Badge color="info" pill>{this.props.draftCounts}</Badge>}
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
}
|
||||
<li className="nav-item">
|
||||
<Link className={`nav-link ellipsis ${this.getActiveClass('linked-devices')}`} to={siteRoot + 'linked-devices/'} title={gettext('Linked Devices')} onClick={() => this.tabItemClick('linked-devices')}>
|
||||
<span className="sf2-icon-monitor" aria-hidden="true"></span>
|
||||
|
@@ -5,6 +5,7 @@ import { IconButton, ButtonGroup, CollabUsersButton } from '@seafile/seafile-edi
|
||||
import FileInfo from '@seafile/seafile-editor/dist/components/topbarcomponent/file-info';
|
||||
|
||||
const propTypes = {
|
||||
isDocs: PropTypes.bool.isRequired,
|
||||
hasDraft: PropTypes.bool.isRequired,
|
||||
isDraft: PropTypes.bool.isRequired,
|
||||
editorUtilities: PropTypes.object.isRequired,
|
||||
@@ -42,7 +43,7 @@ class MarkdownViewerToolbar extends React.Component {
|
||||
</div>
|
||||
}
|
||||
<div className="topbar-btn-container">
|
||||
{ (!this.props.hasDraft && !this.props.isDraft) &&
|
||||
{ (!this.props.hasDraft && !this.props.isDraft && this.props.isDocs) &&
|
||||
<button onMouseDown={this.props.toggleNewDraft} className="btn btn-success btn-new-draft">
|
||||
{gettext('New Draft')}</button>
|
||||
}
|
||||
|
Reference in New Issue
Block a user