diff --git a/ElectronClient/gui/StatusScreen.jsx b/ElectronClient/gui/StatusScreen.jsx index 006c4ed3bb..8e5de29e40 100644 --- a/ElectronClient/gui/StatusScreen.jsx +++ b/ElectronClient/gui/StatusScreen.jsx @@ -55,6 +55,8 @@ class StatusScreenComponent extends React.Component { height: style.height - theme.headerHeight - containerPadding * 2, }); + let retryHandlers = []; + function renderSectionTitleHtml(key, title) { return (

@@ -81,6 +83,8 @@ class StatusScreenComponent extends React.Component { this.resfreshScreen(); }; + retryHandlers.push(item.retryHandler); + retryLink = ( {_('Retry')} @@ -105,6 +109,24 @@ class StatusScreenComponent extends React.Component { return
{itemsHtml}
; }; + function renderRetryAllHtml() { + let retryAllLink = null; + if (retryHandlers.length > 1) { + const onClick = async () => { + await Promise.all(retryHandlers.map(handler => handler())); + this.resfreshScreen(); + }; + retryAllLink = ( +
+ + {_('Retry All')} + +
+ ); + } + return retryAllLink; + } + function renderBodyHtml(report) { let sectionsHtml = []; @@ -114,7 +136,14 @@ class StatusScreenComponent extends React.Component { sectionsHtml.push(renderSectionHtml(i, section)); } - return
{sectionsHtml}
; + let retryAllHtml = renderRetryAllHtml(); // must be called after renderSectionHtml + + return ( +
+ {retryAllHtml} + {sectionsHtml} +
+ ); } let body = renderBodyHtml(this.state.report);