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

[share admin] upload links: added support for mobile; improvement (#4011)

* and improved 'share links'
This commit is contained in:
llj
2019-08-21 16:36:55 +08:00
committed by Daniel Pan
parent 0b25041ba9
commit 3e65a3a313
5 changed files with 234 additions and 194 deletions

View File

@@ -6,7 +6,7 @@ import { Button, Form, FormGroup, Label, Input, InputGroup, InputGroupAddon, Ale
import { gettext, shareLinkPasswordMinLength, canSendShareLinkEmail } from '../../utils/constants';
import { seafileAPI } from '../../utils/seafile-api';
import { Utils } from '../../utils/utils';
import SharedUploadInfo from '../../models/shared-upload-info';
import UploadLink from '../../models/upload-link';
import toaster from '../toast';
import SendLink from '../send-link';
import SessionExpiredTip from '../session-expired-tip';
@@ -41,7 +41,7 @@ class GenerateUploadLink extends React.Component {
let repoID = this.props.repoID;
seafileAPI.getUploadLinks(repoID, path).then((res) => {
if (res.data.length !== 0) {
let sharedUploadInfo = new SharedUploadInfo(res.data[0]);
let sharedUploadInfo = new UploadLink(res.data[0]);
this.setState({sharedUploadInfo: sharedUploadInfo});
}
}).catch((err) => {
@@ -98,7 +98,7 @@ class GenerateUploadLink extends React.Component {
let isValid = this.validateParamsInput();
if (isValid) {
seafileAPI.createUploadLink(repoID, path, password, expireDays).then((res) => {
let sharedUploadInfo = new SharedUploadInfo(res.data);
let sharedUploadInfo = new UploadLink(res.data);
this.setState({sharedUploadInfo: sharedUploadInfo});
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);