mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 00:00:00 +00:00
add notice
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
|
import toaster from '../toast';
|
||||||
import { Button, Modal, ModalHeader, ModalBody, Form, FormGroup, Label, Input } from 'reactstrap';
|
import { Button, Modal, ModalHeader, ModalBody, Form, FormGroup, Label, Input } from 'reactstrap';
|
||||||
import { seafileAPI } from '../../utils/seafile-api.js';
|
import { seafileAPI } from '../../utils/seafile-api.js';
|
||||||
|
|
||||||
@@ -44,7 +45,9 @@ class LibHistorySetting extends React.Component {
|
|||||||
let reg = /^-?\d+$/;
|
let reg = /^-?\d+$/;
|
||||||
let flag = reg.test(days);
|
let flag = reg.test(days);
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
let message = gettext('Successfully set library history.');
|
||||||
seafileAPI.setRepoHistoryLimit(repoID, days).then(res => {
|
seafileAPI.setRepoHistoryLimit(repoID, days).then(res => {
|
||||||
|
toaster.success(message);
|
||||||
this.setState({
|
this.setState({
|
||||||
keepDays: res.data.keep_days
|
keepDays: res.data.keep_days
|
||||||
});
|
});
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import AsyncSelect from 'react-select/lib/Async';
|
import AsyncSelect from 'react-select/lib/Async';
|
||||||
|
import toaster from '../toast';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
|
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
|
||||||
import { seafileAPI } from '../../utils/seafile-api.js';
|
import { seafileAPI } from '../../utils/seafile-api.js';
|
||||||
@@ -52,8 +53,14 @@ class TransferDialog extends React.Component {
|
|||||||
let repoID = this.props.repoID;
|
let repoID = this.props.repoID;
|
||||||
let user = this.state.selectedOption.email;
|
let user = this.state.selectedOption.email;
|
||||||
seafileAPI.transferRepo(repoID, user).then(res => {
|
seafileAPI.transferRepo(repoID, user).then(res => {
|
||||||
|
let message = gettext('Successfully transferred the library.');
|
||||||
|
toaster.success(message);
|
||||||
this.props.submit(repoID);
|
this.props.submit(repoID);
|
||||||
this.props.toggleDialog();
|
this.props.toggleDialog();
|
||||||
|
}).catch(res => {
|
||||||
|
let message = gettext('Failed. Please check the network.')
|
||||||
|
this.props.toggleDialog();
|
||||||
|
toaster.danger(message);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@ import React, { Component, Fragment } from 'react';
|
|||||||
import { Link } from '@reach/router';
|
import { Link } from '@reach/router';
|
||||||
import { gettext, siteRoot, lang } from '../../utils/constants';
|
import { gettext, siteRoot, lang } from '../../utils/constants';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
|
import toaster from '../../components/toast';
|
||||||
import CommonToolbar from '../../components/toolbar/common-toolbar';
|
import CommonToolbar from '../../components/toolbar/common-toolbar';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
moment.locale(lang);
|
moment.locale(lang);
|
||||||
@@ -101,8 +102,14 @@ class DeletedRepoItem extends Component {
|
|||||||
|
|
||||||
restoreDeletedRepo = () => {
|
restoreDeletedRepo = () => {
|
||||||
let repoID = this.props.repo.repo_id;
|
let repoID = this.props.repo.repo_id;
|
||||||
|
let repoName = this.props.repo.repo_name;
|
||||||
seafileAPI.restoreDeletedRepo(repoID).then(res => {
|
seafileAPI.restoreDeletedRepo(repoID).then(res => {
|
||||||
|
let message = gettext('Successfully restored library') + ' ' + repoName;
|
||||||
|
toaster.success(message);
|
||||||
this.props.refreshDeletedRepoList(repoID);
|
this.props.refreshDeletedRepoList(repoID);
|
||||||
|
}).catch(res => {
|
||||||
|
let message = gettext('Failed. Please check the network.')
|
||||||
|
toaster.danger(message);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user