mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
Ocm (#4640)
* ocm share local and inter-server api, ocm share page (#4335) * ocm share * optimize code * ocm repo (#4341) * ocm repo * hide share if not repo owner * optimize code * fix All refresh page, hide upload if is r perm * update permission check * update return status code * update code * add receive user drop share
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Modal, ModalHeader, ModalBody, TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap';
|
||||
import { gettext, username, canGenerateShareLink, canGenerateUploadLink, canInvitePeople, additionalShareDialogNote } from '../../utils/constants';
|
||||
import { Modal, ModalHeader, ModalBody, TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap';
|
||||
import { gettext, username, canGenerateShareLink, canGenerateUploadLink, canInvitePeople, additionalShareDialogNote, enableOCM } from '../../utils/constants';
|
||||
import ShareToUser from './share-to-user';
|
||||
import ShareToGroup from './share-to-group';
|
||||
import ShareToInvitePeople from './share-to-invite-people';
|
||||
import GenerateShareLink from './generate-share-link';
|
||||
import GenerateUploadLink from './generate-upload-link';
|
||||
import ShareToOtherServer from './share-to-other-server';
|
||||
import InternalLink from './internal-link';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import Loading from '../loading';
|
||||
@@ -141,6 +142,13 @@ class ShareDialog extends React.Component {
|
||||
}
|
||||
</Fragment>
|
||||
}
|
||||
{enableOCM && itemType === 'library' && this.state.isRepoOwner &&
|
||||
<NavItem>
|
||||
<NavLink className={activeTab === 'shareToOtherServer' ? 'active' : ''} onClick={this.toggle.bind(this, 'shareToOtherServer')}>
|
||||
{gettext('Share to other server')}
|
||||
</NavLink>
|
||||
</NavItem>
|
||||
}
|
||||
</Nav>
|
||||
</div>
|
||||
<div className="share-dialog-main">
|
||||
@@ -190,6 +198,11 @@ class ShareDialog extends React.Component {
|
||||
}
|
||||
</Fragment>
|
||||
}
|
||||
{enableOCM && itemType === 'library' && activeTab === 'shareToOtherServer' &&
|
||||
<TabPane tabId="shareToOtherServer">
|
||||
<ShareToOtherServer itemType={this.props.itemType} isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} isRepoOwner={this.state.isRepoOwner} />
|
||||
</TabPane>
|
||||
}
|
||||
</TabContent>
|
||||
</div>
|
||||
</Fragment>
|
||||
|
Reference in New Issue
Block a user