mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
fix warnings (#2937)
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import AsyncSelect from 'react-select/lib/Async';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Table } from 'reactstrap';
|
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Table } from 'reactstrap';
|
||||||
|
@@ -3,7 +3,6 @@ import ReactDOM from 'react-dom';
|
|||||||
import Account from './components/common/account';
|
import Account from './components/common/account';
|
||||||
import CodeMirror from 'react-codemirror';
|
import CodeMirror from 'react-codemirror';
|
||||||
import { Button } from 'reactstrap';
|
import { Button } from 'reactstrap';
|
||||||
import { seafileAPI } from './utils/seafile-api';
|
|
||||||
import { Utils } from './utils/utils';
|
import { Utils } from './utils/utils';
|
||||||
import watermark from 'watermark-dom';
|
import watermark from 'watermark-dom';
|
||||||
import { serviceURL, gettext, siteRoot, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle } from './utils/constants';
|
import { serviceURL, gettext, siteRoot, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle } from './utils/constants';
|
||||||
@@ -51,18 +50,18 @@ class SharedFileViewText extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fileEncode = () => {
|
fileEncode = () => {
|
||||||
const list = fileEncodingList.substring(1, fileEncodingList.length - 1).replace(/\'*/g,"").replace(/\s*/g,"").split(',');
|
const list = fileEncodingList.substring(1, fileEncodingList.length - 1).replace(/\'*/g,'').replace(/\s*/g,'').split(',');
|
||||||
return (
|
return (
|
||||||
<div className="file-enc-cont">
|
<div className="file-enc-cont">
|
||||||
<label htmlFor="file-enc">{gettext('Encoding:')}</label>
|
<label htmlFor="file-enc">{gettext('Encoding:')}</label>
|
||||||
<select id="file-enc" onChange={this.changeEncode} defaultValue={encoding}>
|
<select id="file-enc" onChange={this.changeEncode} defaultValue={encoding}>
|
||||||
{ list && list.map((value, index) => {
|
{ list && list.map((value, index) => {
|
||||||
if (value === 'auto') {
|
if (value === 'auto') {
|
||||||
return (<option value={value} key={index}>{gettext('auto detect')}</option>)
|
return (<option value={value} key={index}>{gettext('auto detect')}</option>);
|
||||||
} else {
|
} else {
|
||||||
return (<option value={value} key={index}>{value}</option>)
|
return (<option value={value} key={index}>{value}</option>);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,9 +116,9 @@ class SharedFileViewText extends React.Component {
|
|||||||
if (enableWatermark) {
|
if (enableWatermark) {
|
||||||
let watermark_txt;
|
let watermark_txt;
|
||||||
if (loginUser) {
|
if (loginUser) {
|
||||||
watermark_txt = siteName + " " + loginUser;
|
watermark_txt = siteName + ' ' + loginUser;
|
||||||
} else {
|
} else {
|
||||||
watermark_txt = gettext("Anonymous User");
|
watermark_txt = gettext('Anonymous User');
|
||||||
}
|
}
|
||||||
watermark.init({
|
watermark.init({
|
||||||
watermark_txt: watermark_txt,
|
watermark_txt: watermark_txt,
|
||||||
|
Reference in New Issue
Block a user