mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-23 09:11:15 +00:00
29 lines
715 B
JavaScript
29 lines
715 B
JavaScript
|
import React from 'react';
|
||
|
import PropTypes from 'prop-types';
|
||
|
import { gettext, maxUploadFileSize } from '../../utils/constants';
|
||
|
|
||
|
const propTypes = {
|
||
|
file: PropTypes.object,
|
||
|
};
|
||
|
|
||
|
class ForbidUploadListItem extends React.Component {
|
||
|
|
||
|
render() {
|
||
|
let { file } = this.props;
|
||
|
let msg = gettext('Please upload files less than {placeholder}M').replace('{placeholder}', maxUploadFileSize);
|
||
|
return (
|
||
|
<tr className="file-upload-item">
|
||
|
<td className="upload-name">
|
||
|
<div className="ellipsis">{file.name}</div>
|
||
|
</td>
|
||
|
|
||
|
<td colSpan={3} className="error">{msg}</td>
|
||
|
</tr>
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
ForbidUploadListItem.propTypes = propTypes;
|
||
|
|
||
|
export default ForbidUploadListItem;
|