|
|
|
@ -135,7 +135,7 @@ export class VersionsSettings extends PureComponent<Props, State> { |
|
|
|
|
|
|
|
|
|
render() { |
|
|
|
|
const { versions, viewMode, baseInfo, newInfo, isNewLatest, isLoading, diffData } = this.state; |
|
|
|
|
const canCompare = versions.filter((version) => version.checked).length !== 2; |
|
|
|
|
const canCompare = versions.filter((version) => version.checked).length === 2; |
|
|
|
|
const showButtons = versions.length > 1; |
|
|
|
|
const hasMore = versions.length >= this.limit; |
|
|
|
|
|
|
|
|
@ -169,7 +169,7 @@ export class VersionsSettings extends PureComponent<Props, State> { |
|
|
|
|
{isLoading ? ( |
|
|
|
|
<VersionsHistorySpinner msg="Fetching history list…" /> |
|
|
|
|
) : ( |
|
|
|
|
<VersionHistoryTable versions={versions} onCheck={this.onCheck} /> |
|
|
|
|
<VersionHistoryTable versions={versions} onCheck={this.onCheck} canCompare={canCompare} /> |
|
|
|
|
)} |
|
|
|
|
{this.state.isAppending && <VersionsHistorySpinner msg="Fetching more entries…" />} |
|
|
|
|
{showButtons && ( |
|
|
|
|