From a057fbf3bd14adb350a4a3d7d9981637d31f02a0 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 20 Nov 2017 18:44:56 +0000 Subject: [PATCH] Electron: added sync icon --- ElectronClient/app/gui/SideBar.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ElectronClient/app/gui/SideBar.jsx b/ElectronClient/app/gui/SideBar.jsx index 8cfbfc964..4456d6a93 100644 --- a/ElectronClient/app/gui/SideBar.jsx +++ b/ElectronClient/app/gui/SideBar.jsx @@ -189,9 +189,12 @@ class SideBarComponent extends React.Component { return
{icon}{label}
} - synchronizeButton(label) { + synchronizeButton(type) { const style = this.style().button; - return {this.sync_click()}}>{label} + const iconName = type === 'sync' ? 'fa-refresh' : 'fa-times'; + const label = type === 'sync' ? _('Synchronise') : _('Cancel'); + const icon = + return {this.sync_click()}}>{icon}{label} } render() { @@ -232,7 +235,7 @@ class SideBarComponent extends React.Component { syncReportText.push(
{lines[i]}
); } - items.push(this.synchronizeButton(this.props.syncStarted ? _('Cancel') : _('Synchronise'))); + items.push(this.synchronizeButton(this.props.syncStarted ? 'cancel' : 'sync')); items.push(
{syncReportText}
);