mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 01:41:39 +00:00
style (#3112)
This commit is contained in:
@@ -154,7 +154,6 @@ const CommentItempropTypes = {
|
||||
editorUtilities: PropTypes.object.isRequired,
|
||||
item: PropTypes.object,
|
||||
time: PropTypes.string,
|
||||
key: PropTypes.number,
|
||||
editComment: PropTypes.func,
|
||||
showResolvedComment: PropTypes.bool,
|
||||
deleteComment: PropTypes.func,
|
||||
@@ -301,6 +300,6 @@ class CommentItem extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
CommentsList.propTypes = CommentItempropTypes;
|
||||
CommentItem.propTypes = CommentItempropTypes;
|
||||
|
||||
export default CommentsList;
|
||||
|
@@ -20,7 +20,7 @@ class HistoryList extends React.Component {
|
||||
this.perPage = 25;
|
||||
this.state = {
|
||||
historyList: [],
|
||||
activeItem: -1,
|
||||
activeItem: 0,
|
||||
currentPage: 1,
|
||||
totalReversionCount: 0,
|
||||
loading: false
|
||||
@@ -114,7 +114,7 @@ class HistoryList extends React.Component {
|
||||
index={index}
|
||||
key={index}
|
||||
preItem={arr[preItemIndex]}
|
||||
/>
|
||||
/>
|
||||
);
|
||||
}) : <Loading/>
|
||||
}
|
||||
@@ -132,12 +132,13 @@ HistoryList.propTypes = propTypes;
|
||||
|
||||
|
||||
const HistoryItempropTypes = {
|
||||
ctime: PropTypes.number,
|
||||
ctime: PropTypes.string,
|
||||
onClick: PropTypes.func,
|
||||
index: PropTypes.number,
|
||||
preItem: PropTypes.string,
|
||||
currewntItem: PropTypes.string,
|
||||
preItem: PropTypes.object,
|
||||
currewntItem: PropTypes.object,
|
||||
name: PropTypes.string,
|
||||
className: PropTypes.string,
|
||||
};
|
||||
|
||||
class HistoryItem extends React.Component {
|
||||
@@ -152,7 +153,7 @@ class HistoryItem extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
HistoryList.propTypes = HistoryItempropTypes;
|
||||
HistoryItem.propTypes = HistoryItempropTypes;
|
||||
|
||||
|
||||
export default HistoryList;
|
||||
|
@@ -2,11 +2,11 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { gettext } from '../../utils/constants';
|
||||
|
||||
const propTypes = {
|
||||
|
||||
const OutlineItempropTypes = {
|
||||
scrollToNode: PropTypes.func.isRequired,
|
||||
isViewer: PropTypes.bool.isRequired,
|
||||
document: PropTypes.object.isRequired,
|
||||
editor: PropTypes.object.isRequired,
|
||||
node: PropTypes.object.isRequired,
|
||||
active: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
class OutlineItem extends React.PureComponent {
|
||||
@@ -35,6 +35,17 @@ class OutlineItem extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
OutlineItem.propTypes = OutlineItempropTypes;
|
||||
|
||||
const propTypes = {
|
||||
scrollToNode: PropTypes.func.isRequired,
|
||||
isViewer: PropTypes.bool.isRequired,
|
||||
document: PropTypes.object.isRequired,
|
||||
editor: PropTypes.object.isRequired,
|
||||
activeTitleIndex: PropTypes.number,
|
||||
value: PropTypes.object,
|
||||
};
|
||||
|
||||
class OutlineView extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
@@ -46,19 +57,19 @@ class OutlineView extends React.PureComponent {
|
||||
return (
|
||||
<div className="seafile-editor-outline">
|
||||
{headerList.size > 0 ?
|
||||
headerList.map((node, index) => {
|
||||
let active = (index === this.props.activeTitleIndex) ? ' active' : '';
|
||||
return (
|
||||
<OutlineItem
|
||||
key={node.key}
|
||||
editor={this.props.editor}
|
||||
value={this.props.value}
|
||||
node={node}
|
||||
active={active}
|
||||
scrollToNode={this.props.scrollToNode}
|
||||
/>
|
||||
);
|
||||
}) : <div className={'size-panel-no-content'}>{gettext('No out line.')}</div>}
|
||||
headerList.map((node, index) => {
|
||||
let active = (index === this.props.activeTitleIndex) ? ' active' : '';
|
||||
return (
|
||||
<OutlineItem
|
||||
key={node.key}
|
||||
editor={this.props.editor}
|
||||
value={this.props.value}
|
||||
node={node}
|
||||
active={active}
|
||||
scrollToNode={this.props.scrollToNode}
|
||||
/>
|
||||
);
|
||||
}) : <div className={'size-panel-no-content'}>{gettext('No outline')}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user