mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Revert "Add "retry all" option to synchronisation page"
This reverts commit 15daaa16fd
.
This commit is contained in:
parent
cffc919791
commit
4c3d37b311
@ -55,8 +55,6 @@ class StatusScreenComponent extends React.Component {
|
|||||||
height: style.height - theme.headerHeight - containerPadding * 2,
|
height: style.height - theme.headerHeight - containerPadding * 2,
|
||||||
});
|
});
|
||||||
|
|
||||||
let retryHandlers = [];
|
|
||||||
|
|
||||||
function renderSectionTitleHtml(key, title) {
|
function renderSectionTitleHtml(key, title) {
|
||||||
return (
|
return (
|
||||||
<h2 key={`section_${key}`} style={theme.h2Style}>
|
<h2 key={`section_${key}`} style={theme.h2Style}>
|
||||||
@ -83,8 +81,6 @@ class StatusScreenComponent extends React.Component {
|
|||||||
this.resfreshScreen();
|
this.resfreshScreen();
|
||||||
};
|
};
|
||||||
|
|
||||||
retryHandlers.push(item.retryHandler);
|
|
||||||
|
|
||||||
retryLink = (
|
retryLink = (
|
||||||
<a href="#" onClick={onClick} style={retryStyle}>
|
<a href="#" onClick={onClick} style={retryStyle}>
|
||||||
{_('Retry')}
|
{_('Retry')}
|
||||||
@ -109,24 +105,6 @@ class StatusScreenComponent extends React.Component {
|
|||||||
return <div key={key}>{itemsHtml}</div>;
|
return <div key={key}>{itemsHtml}</div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
function renderRetryAllHtml() {
|
|
||||||
let retryAllLink = null;
|
|
||||||
if (retryHandlers.length > 1) {
|
|
||||||
const onClick = async () => {
|
|
||||||
await Promise.all(retryHandlers.map(handler => handler()));
|
|
||||||
this.resfreshScreen();
|
|
||||||
};
|
|
||||||
retryAllLink = (
|
|
||||||
<div>
|
|
||||||
<a href="#" onClick={onClick} style={retryStyle}>
|
|
||||||
{_('Retry All')}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return retryAllLink;
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderBodyHtml(report) {
|
function renderBodyHtml(report) {
|
||||||
let sectionsHtml = [];
|
let sectionsHtml = [];
|
||||||
|
|
||||||
@ -136,14 +114,7 @@ class StatusScreenComponent extends React.Component {
|
|||||||
sectionsHtml.push(renderSectionHtml(i, section));
|
sectionsHtml.push(renderSectionHtml(i, section));
|
||||||
}
|
}
|
||||||
|
|
||||||
let retryAllHtml = renderRetryAllHtml(); // must be called after renderSectionHtml
|
return <div>{sectionsHtml}</div>;
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{retryAllHtml}
|
|
||||||
{sectionsHtml}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let body = renderBodyHtml(this.state.report);
|
let body = renderBodyHtml(this.state.report);
|
||||||
|
Loading…
Reference in New Issue
Block a user