diff --git a/src/vs/platform/integrity/node/integrityServiceImpl.ts b/src/vs/platform/integrity/node/integrityServiceImpl.ts index 3a5837e9bd8f5b1bd99aef956232aab686e3eaa1..6b7f4212e03f98b21ad5f511bac7cd350a8cf8c7 100644 --- a/src/vs/platform/integrity/node/integrityServiceImpl.ts +++ b/src/vs/platform/integrity/node/integrityServiceImpl.ts @@ -15,6 +15,7 @@ import URI from 'vs/base/common/uri'; import Severity from 'vs/base/common/severity'; import {Action} from 'vs/base/common/actions'; import {IStorageService, StorageScope} from 'vs/platform/storage/common/storage'; +import {IOpenerService} from 'vs/platform/opener/common/opener'; interface ILoaderChecksums { [scriptSrc:string]: string; @@ -64,15 +65,18 @@ export class IntegrityServiceImpl implements IIntegrityService { public _serviceBrand: any; private _messageService: IMessageService; + private _openerService: IOpenerService; private _storage:IntegrityStorage; private _loaderChecksums: ILoaderChecksums; private _isPurePromise: TPromise; constructor( @IMessageService messageService: IMessageService, - @IStorageService storageService: IStorageService + @IStorageService storageService: IStorageService, + @IOpenerService openerService: IOpenerService ) { this._messageService = messageService; + this._openerService = openerService; this._storage = new IntegrityStorage(storageService); // Fetch checksums from loader @@ -122,10 +126,21 @@ export class IntegrityServiceImpl implements IIntegrityService { return TPromise.as(true); } ); + const MoreInfoAction = new Action( + 'integrity.moreInfo', + nls.localize('integrity.moreInfo', "More information"), + null, + true, + () => { + const uri = URI.parse(product.checksumFailMoreInfoUrl); + this._openerService.open(uri); + return TPromise.as(true); + } + ); this._messageService.show(Severity.Warning, { message: nls.localize('integrity.prompt', "Your {0} installation appears to be corrupt. Please reinstall.", product.nameShort), - actions: [OkAction, DontShowAgainAction] + actions: [OkAction, MoreInfoAction, DontShowAgainAction] }); } diff --git a/src/vs/platform/product.ts b/src/vs/platform/product.ts index 180b58c8f21f487b4141055d0ecac097233e7b56..b82685471d341918bd4012a867109b2c66336798 100644 --- a/src/vs/platform/product.ts +++ b/src/vs/platform/product.ts @@ -46,6 +46,7 @@ export interface IProductConfiguration { privacyStatementUrl: string; npsSurveyUrl: string; checksums: {[path:string]:string;}; + checksumFailMoreInfoUrl: string; } const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath);