1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 16:10:26 +00:00

Repo invitation (#4264)

* add fake url

* add SharedRepoInvitation model

* add indexes

* rm indexes

* update Manager

* add SharedRepoInvitations

* add is_repo_admin

* add try

* fix path

* update

* add  SharedRepoInvitation

* add share in signup

* rm InvitePeople icon

* add inviter_name

* add share invite dialog

* add shared_queryset.delete

* fix spell

* rename to RepoShare

* rename to RepoShare in py

* add handleKeyDown

* update error msg

* add unittest

* fix

* add logger
This commit is contained in:
sniper-py
2019-11-18 17:55:17 +08:00
committed by Daniel Pan
parent 4e1d766f74
commit 106f29be06
12 changed files with 977 additions and 16 deletions

View File

@@ -1,9 +1,10 @@
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 } from '../../utils/constants';
import { gettext, username, canGenerateShareLink, canGenerateUploadLink, canInvitePeople } 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 InternalLink from './internal-link';
@@ -117,6 +118,13 @@ class ShareDialog extends React.Component {
{gettext('Share to group')}
</NavLink>
</NavItem>
{canInvitePeople &&
<NavItem>
<NavLink className={activeTab === 'invitePeople' ? 'active' : ''} onClick={this.toggle.bind(this, 'invitePeople')}>
{gettext('Invite People')}
</NavLink>
</NavItem>
}
</Fragment>
}
</Nav>
@@ -154,6 +162,11 @@ class ShareDialog extends React.Component {
<TabPane tabId="shareToUser">
<ShareToUser itemType={this.props.itemType} isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} isRepoOwner={this.state.isRepoOwner}/>
</TabPane>
{canInvitePeople &&
<TabPane tabId="invitePeople">
<ShareToInvitePeople itemPath={this.props.itemPath} repoID={this.props.repoID}/>
</TabPane>
}
<TabPane tabId="shareToGroup">
<ShareToGroup itemType={this.props.itemType} isGroupOwnedRepo={this.props.isGroupOwnedRepo} itemPath={this.props.itemPath} repoID={this.props.repoID} isRepoOwner={this.state.isRepoOwner}/>
</TabPane>