aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/settings/settings/EditSettingsForm.js12
-rw-r--r--src/containers/settings/EditSettingsScreen.js1
-rw-r--r--src/electron/ipc-api/autoUpdate.ts7
-rw-r--r--src/stores/AppStore.js1
4 files changed, 16 insertions, 5 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js
index 1757ac297..eab65f5e5 100644
--- a/src/components/settings/settings/EditSettingsForm.js
+++ b/src/components/settings/settings/EditSettingsForm.js
@@ -12,6 +12,7 @@ import Toggle from '../../ui/Toggle';
12import ToggleRaw from '../../ui/ToggleRaw'; 12import ToggleRaw from '../../ui/ToggleRaw';
13import Select from '../../ui/Select'; 13import Select from '../../ui/Select';
14import Input from '../../ui/Input'; 14import Input from '../../ui/Input';
15import Infobox from '../../ui/Infobox';
15 16
16import { 17import {
17 DEFAULT_APP_SETTINGS, 18 DEFAULT_APP_SETTINGS,
@@ -193,6 +194,7 @@ class EditSettingsForm extends Component {
193 isUpdateAvailable: PropTypes.bool.isRequired, 194 isUpdateAvailable: PropTypes.bool.isRequired,
194 noUpdateAvailable: PropTypes.bool.isRequired, 195 noUpdateAvailable: PropTypes.bool.isRequired,
195 updateIsReadyToInstall: PropTypes.bool.isRequired, 196 updateIsReadyToInstall: PropTypes.bool.isRequired,
197 updateFailed: PropTypes.bool.isRequired,
196 isClearingAllCache: PropTypes.bool.isRequired, 198 isClearingAllCache: PropTypes.bool.isRequired,
197 onClearAllCache: PropTypes.func.isRequired, 199 onClearAllCache: PropTypes.func.isRequired,
198 getCacheSize: PropTypes.func.isRequired, 200 getCacheSize: PropTypes.func.isRequired,
@@ -242,6 +244,7 @@ class EditSettingsForm extends Component {
242 isUpdateAvailable, 244 isUpdateAvailable,
243 noUpdateAvailable, 245 noUpdateAvailable,
244 updateIsReadyToInstall, 246 updateIsReadyToInstall,
247 updateFailed,
245 isClearingAllCache, 248 isClearingAllCache,
246 onClearAllCache, 249 onClearAllCache,
247 getCacheSize, 250 getCacheSize,
@@ -800,7 +803,9 @@ class EditSettingsForm extends Component {
800 <br /> 803 <br />
801 </div> 804 </div>
802 )} 805 )}
803 {intl.formatMessage(messages.currentVersion)} {ferdiVersion} 806 <p>
807 {intl.formatMessage(messages.currentVersion)} {ferdiVersion}
808 </p>
804 {noUpdateAvailable && ( 809 {noUpdateAvailable && (
805 <> 810 <>
806 <br /> 811 <br />
@@ -808,6 +813,11 @@ class EditSettingsForm extends Component {
808 {intl.formatMessage(messages.updateStatusUpToDate)} 813 {intl.formatMessage(messages.updateStatusUpToDate)}
809 </> 814 </>
810 )} 815 )}
816 {updateFailed && (
817 <Infobox type="danger" icon="alert">
818 An error occured (check the console for more details)
819 </Infobox>
820 )}
811 <p className="settings__message"> 821 <p className="settings__message">
812 <Icon icon={mdiGithub} /> 822 <Icon icon={mdiGithub} />
813 Ferdi is based on{' '} 823 Ferdi is based on{' '}
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index ddf6876b9..3d215a0d7 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -727,6 +727,7 @@ class EditSettingsScreen extends Component {
727 isUpdateAvailable={updateStatus === updateStatusTypes.AVAILABLE} 727 isUpdateAvailable={updateStatus === updateStatusTypes.AVAILABLE}
728 noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE} 728 noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE}
729 updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED} 729 updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED}
730 updateFailed={updateStatus === updateStatusTypes.FAILED}
730 onSubmit={d => this.onSubmit(d)} 731 onSubmit={d => this.onSubmit(d)}
731 getCacheSize={() => app.cacheSize} 732 getCacheSize={() => app.cacheSize}
732 isClearingAllCache={isClearingAllCache} 733 isClearingAllCache={isClearingAllCache}
diff --git a/src/electron/ipc-api/autoUpdate.ts b/src/electron/ipc-api/autoUpdate.ts
index e6b805edc..33af57efc 100644
--- a/src/electron/ipc-api/autoUpdate.ts
+++ b/src/electron/ipc-api/autoUpdate.ts
@@ -39,8 +39,7 @@ export default (params: { mainWindow: BrowserWindow; settings: any }) => {
39 }, 20); 39 }, 20);
40 } 40 }
41 } catch (error) { 41 } catch (error) {
42 console.error(error); 42 event.sender.send('autoUpdate', { error });
43 event.sender.send('autoUpdate', { error: true });
44 } 43 }
45 } 44 }
46 }); 45 });
@@ -74,9 +73,9 @@ export default (params: { mainWindow: BrowserWindow; settings: any }) => {
74 params.mainWindow.webContents.send('autoUpdate', { downloaded: true }); 73 params.mainWindow.webContents.send('autoUpdate', { downloaded: true });
75 }); 74 });
76 75
77 autoUpdater.on('error', () => { 76 autoUpdater.on('error', error => {
78 debug('update-error'); 77 debug('update-error');
79 params.mainWindow.webContents.send('autoUpdate', { error: true }); 78 params.mainWindow.webContents.send('autoUpdate', { error });
80 }); 79 });
81 } 80 }
82}; 81};
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 5881e37a4..eca347153 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -181,6 +181,7 @@ export default class AppStore extends Store {
181 } 181 }
182 182
183 if (data.error) { 183 if (data.error) {
184 console.log('Updater error:', data.error);
184 this.updateStatus = this.updateStatusTypes.FAILED; 185 this.updateStatus = this.updateStatusTypes.FAILED;
185 } 186 }
186 }); 187 });