mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-13 13:50:07 +00:00
Merge branch '7.0'
This commit is contained in:
@@ -41,7 +41,7 @@ class FileUpdateDetailDialog extends React.Component {
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
renderContentItem = (items) => {
|
||||
|
@@ -111,7 +111,7 @@ class ShareToGroup extends React.Component {
|
||||
sharedItems: []
|
||||
};
|
||||
this.options = [];
|
||||
this.permissions = []
|
||||
this.permissions = [];
|
||||
let { itemType, isRepoOwner } = props;
|
||||
if (itemType === 'library') {
|
||||
this.permissions = isRepoOwner ? ['rw', 'r', 'admin', 'cloud-edit', 'preview'] : ['rw', 'r', 'cloud-edit', 'preview'];
|
||||
|
@@ -77,7 +77,7 @@ class DirentDetail extends React.Component {
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ class DirentDetail extends React.Component {
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,15 +191,15 @@ class DirentDetail extends React.Component {
|
||||
<Fragment>
|
||||
<div className="detail-body dirent-info">
|
||||
<div className="img"><img src={bigIconUrl} className="thumbnail" alt="" /></div>
|
||||
{this.state.direntDetail &&
|
||||
{this.state.direntDetail &&
|
||||
<div className="dirent-table-container">
|
||||
<DetailListView
|
||||
<DetailListView
|
||||
repoInfo={this.props.currentRepoInfo}
|
||||
path={this.props.path}
|
||||
repoID={this.props.repoID}
|
||||
dirent={this.props.dirent || folderDirent}
|
||||
direntType={this.state.direntType}
|
||||
direntDetail={this.state.direntDetail}
|
||||
direntDetail={this.state.direntDetail}
|
||||
fileTagList={this.state.fileTagList}
|
||||
relatedFiles={this.state.relatedFiles}
|
||||
onFileTagChanged={this.props.onFileTagChanged}
|
||||
@@ -259,4 +259,4 @@ class DirentDetail extends React.Component {
|
||||
|
||||
DirentDetail.propTypes = propTypes;
|
||||
|
||||
export default DirentDetail;
|
||||
export default DirentDetail;
|
||||
|
@@ -245,7 +245,7 @@ class DirentGridView extends React.Component{
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
onUnlockItem = (currentObject) => {
|
||||
|
@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Resumablejs from '@seafile/resumablejs';
|
||||
import MD5 from 'MD5';
|
||||
import { enableResumableFileUpload } from '../../utils/constants';
|
||||
import { enableResumableFileUpload, resumableUploadFileBlockSize } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import { gettext } from '../../utils/constants';
|
||||
@@ -66,7 +66,7 @@ class FileUploader extends React.Component {
|
||||
testChunks: this.props.testChunks || false,
|
||||
headers: this.setHeaders || {},
|
||||
withCredentials: this.props.withCredentials || false,
|
||||
chunkSize: this.props.chunkSize,
|
||||
chunkSize: parseInt(resumableUploadFileBlockSize) * 1024 * 1024 || 1 * 1024 * 1024,
|
||||
simultaneousUploads: this.props.simultaneousUploads || 1,
|
||||
fileParameterName: this.props.fileParameterName,
|
||||
generateUniqueIdentifier: this.generateUniqueIdentifier,
|
||||
|
16
frontend/src/components/libs-mobile-thead.js
Normal file
16
frontend/src/components/libs-mobile-thead.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import React from 'react';
|
||||
import { gettext } from '../utils/constants';
|
||||
|
||||
function LibsMobileThead() {
|
||||
return (
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="12%"><span className="sr-only">{gettext('Library Type')}</span></th>
|
||||
<th width="80%"></th>
|
||||
<th width="8%"><span className="sr-only">{gettext('Actions')}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
);
|
||||
}
|
||||
|
||||
export default LibsMobileThead;
|
@@ -265,7 +265,7 @@ class SharedRepoListItem extends React.Component {
|
||||
<Dropdown isOpen={this.state.isItemMenuShow} toggle={this.toggleOperationMenu}>
|
||||
<DropdownToggle
|
||||
tag="i"
|
||||
className="sf-dropdown-toggle sf2-icon-caret-down"
|
||||
className="sf-dropdown-toggle fa fa-ellipsis-v ml-0"
|
||||
title={gettext('More Operations')}
|
||||
data-toggle="dropdown"
|
||||
aria-expanded={this.state.isItemMenuShow}
|
||||
|
@@ -4,6 +4,7 @@ import { gettext } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import SharedRepoListItem from './shared-repo-list-item';
|
||||
import toaster from '../toast';
|
||||
import LibsMobileThead from '../libs-mobile-thead';
|
||||
|
||||
const propTypes = {
|
||||
libraryType: PropTypes.string,
|
||||
@@ -129,23 +130,9 @@ class SharedRepoListView extends React.Component {
|
||||
}
|
||||
|
||||
renderMobileUI = () => {
|
||||
let isShowTableThread = this.props.isShowTableThread !== undefined ? this.props.isShowTableThread : true;
|
||||
|
||||
const { sortByName, sortByTime, sortIcon } = this.getSortMetaData();
|
||||
|
||||
return (
|
||||
<table className={isShowTableThread ? '' : 'table-thead-hidden'}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="18%"><span className="sr-only">{gettext('Library Type')}</span></th>
|
||||
<th width="68%">
|
||||
{gettext('Sort:')}
|
||||
<a className="table-sort-op" href="#" onClick={this.sortByName}>{gettext('name')} {sortByName && sortIcon}</a>
|
||||
<a className="table-sort-op" href="#" onClick={this.sortByTime}>{gettext('last update')} {sortByTime && sortIcon}</a>
|
||||
</th>
|
||||
<th width="14%"><span className="sr-only">{gettext('Actions')}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<table className="table-thead-hidden">
|
||||
<LibsMobileThead />
|
||||
<tbody>
|
||||
{this.renderRepoListView()}
|
||||
</tbody>
|
||||
|
@@ -87,7 +87,7 @@ class WikiMarkdownViewer extends React.Component {
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user