diff --git a/app/assets/javascripts/services/bridge.ts b/app/assets/javascripts/services/bridge.ts index ec19e963f..fdf67f1df 100644 --- a/app/assets/javascripts/services/bridge.ts +++ b/app/assets/javascripts/services/bridge.ts @@ -13,6 +13,7 @@ export interface Bridge { onMajorDataChange(): void; onInitialDataLoad(): void; onSearch(text?: string): void; + downloadBackup(): void; } const KEYCHAIN_STORAGE_KEY = 'keychain'; @@ -45,4 +46,6 @@ export class BrowserBridge implements Bridge { } onSearch() { } + downloadBackup() { + } } diff --git a/app/assets/javascripts/ui_models/application.ts b/app/assets/javascripts/ui_models/application.ts index 56d3b953a..29e8a3fa8 100644 --- a/app/assets/javascripts/ui_models/application.ts +++ b/app/assets/javascripts/ui_models/application.ts @@ -44,7 +44,6 @@ type WebServices = { export class WebApplication extends SNApplication { - private $compile?: ng.ICompileService private scope?: ng.IScope private webServices!: WebServices private currentAuthenticationElement?: JQLite @@ -55,10 +54,10 @@ export class WebApplication extends SNApplication { constructor( deviceInterface: WebDeviceInterface, identifier: string, - $compile: ng.ICompileService, + private $compile: ng.ICompileService, scope: ng.IScope, defaultSyncServerHost: string, - bridge: Bridge, + private bridge: Bridge, ) { super( bridge.environment, @@ -90,7 +89,7 @@ export class WebApplication extends SNApplication { service.application = undefined; } this.webServices = {} as WebServices; - this.$compile = undefined; + (this.$compile as any) = undefined; this.editorGroup.deinit(); this.componentGroup.deinit(); (this.scope! as any).application = undefined; @@ -156,6 +155,7 @@ export class WebApplication extends SNApplication { } presentPasswordWizard(type: PasswordWizardType) { + this.bridge.downloadBackup(); const scope = this.scope!.$new(true) as PasswordWizardScope; scope.type = type; scope.application = this;