diff --git a/kanmail/client/components/emails/Filters.jsx b/kanmail/client/components/emails/Filters.jsx index 6c80bca7..c2d99927 100644 --- a/kanmail/client/components/emails/Filters.jsx +++ b/kanmail/client/components/emails/Filters.jsx @@ -128,6 +128,7 @@ export default class Filters extends React.Component { folders: PropTypes.array.isRequired, accountName: PropTypes.string, updateVersion: PropTypes.string, + updateError: PropTypes.string, } constructor(props) { @@ -241,6 +242,16 @@ export default class Filters extends React.Component { } renderUpdateLink() { + if (this.props.updateError) { + return ( +
  • openLink('https://kanmail.io/download')}> + + Error downloading update: {this.props.updateError}.
    Please re-download the latest version from the Kanmail website. +
    +
  • + ); + } + if (!this.props.updateVersion) { return; } diff --git a/kanmail/client/stores/update.js b/kanmail/client/stores/update.js index d66b8108..89127bd2 100644 --- a/kanmail/client/stores/update.js +++ b/kanmail/client/stores/update.js @@ -17,6 +17,7 @@ class UpdateStore extends BaseStore { updateVersion: null, updateReady: false, updateDownloading: false, + updateError: null, }; } @@ -37,6 +38,10 @@ class UpdateStore extends BaseStore { return post('/api/update').then(() => { this.props.updateReady = true; this.triggerUpdate(); + }).catch((e) => { + this.props.updateDownloading = false; + this.props.updateError = e.data ? e.data.errorMessage : 'unknown'; + this.triggerUpdate(); }); } } diff --git a/kanmail/client/styles/themes/base.less b/kanmail/client/styles/themes/base.less index a708a71f..63c9d0a0 100644 --- a/kanmail/client/styles/themes/base.less +++ b/kanmail/client/styles/themes/base.less @@ -205,6 +205,10 @@ section#sidebar { span.update { background: @green; color: white; + + &.error { + background: @red; + } } a {