1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 17:02:47 +00:00

add notice

This commit is contained in:
ilearnit
2018-12-10 04:05:54 +00:00
committed by shanshuirenjia
parent c61c134079
commit 563f0020d1
3 changed files with 17 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import AsyncSelect from 'react-select/lib/Async';
import toaster from '../toast';
import { gettext } from '../../utils/constants';
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import { seafileAPI } from '../../utils/seafile-api.js';
@@ -52,8 +53,14 @@ class TransferDialog extends React.Component {
let repoID = this.props.repoID;
let user = this.state.selectedOption.email;
seafileAPI.transferRepo(repoID, user).then(res => {
let message = gettext('Successfully transferred the library.');
toaster.success(message);
this.props.submit(repoID);
this.props.toggleDialog();
}).catch(res => {
let message = gettext('Failed. Please check the network.')
this.props.toggleDialog();
toaster.danger(message);
})
}