Go to download page when automatic update fails (#871)

* add preference to set a custom update url

* go to download page when update fails

* fix i18n check
This commit is contained in:
Alberto Iannaccone
2022-03-01 08:24:29 +00:00
committed by GitHub
parent 2a27a14a68
commit a5a6a0b611
5 changed files with 160 additions and 89 deletions

View File

@@ -15,6 +15,7 @@ import {
} from '../../../common/protocol/ide-updater';
import { LocalStorageService } from '@theia/core/lib/browser';
import { SKIP_IDE_VERSION } from '../../arduino-frontend-contribution';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
@injectable()
export class IDEUpdaterDialogWidget extends ReactWidget {
@@ -35,6 +36,9 @@ export class IDEUpdaterDialogWidget extends ReactWidget {
@inject(LocalStorageService)
protected readonly localStorageService: LocalStorageService;
@inject(WindowService)
protected windowService: WindowService;
init(updateInfo: UpdateInfo, onClose: () => void): void {
this.updateInfo = updateInfo;
this.progressInfo = undefined;
@@ -92,9 +96,11 @@ export class IDEUpdaterDialogWidget extends ReactWidget {
<form>
<IDEUpdaterComponent
updateInfo={this.updateInfo}
windowService={this.windowService}
downloadStarted={this.downloadStarted}
downloadFinished={this.downloadFinished}
progress={this.progressInfo}
error={this.error}
onClose={this.close.bind(this)}
onSkipVersion={this.onSkipVersion.bind(this)}
onDownload={this.onDownload.bind(this)}