bitwarden-estensione-browser/src/app/vault/export.component.ts

48 lines
1.6 KiB
TypeScript
Raw Normal View History

2020-11-04 18:09:21 +01:00
import {
Component,
OnInit,
NgZone,
} from '@angular/core';
2018-08-02 05:21:32 +02:00
import { CryptoService } from 'jslib/abstractions/crypto.service';
2019-07-12 23:11:39 +02:00
import { EventService } from 'jslib/abstractions/event.service';
2018-08-02 05:21:32 +02:00
import { ExportService } from 'jslib/abstractions/export.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
2020-11-04 18:09:21 +01:00
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
2018-08-02 05:21:32 +02:00
import { ExportComponent as BaseExportComponent } from 'jslib/angular/components/export.component';
2020-11-04 18:09:21 +01:00
const BroadcasterSubscriptionId = 'ExportComponent';
2018-08-02 05:21:32 +02:00
@Component({
selector: 'app-export',
templateUrl: 'export.component.html',
})
2020-11-04 18:09:21 +01:00
export class ExportComponent extends BaseExportComponent implements OnInit {
constructor(cryptoService: CryptoService, i18nService: I18nService,
2019-07-12 23:11:39 +02:00
platformUtilsService: PlatformUtilsService, exportService: ExportService,
2020-11-04 18:09:21 +01:00
eventService: EventService, private broadcasterService: BroadcasterService,
private ngZone: NgZone) {
super(cryptoService, i18nService, platformUtilsService, exportService, eventService, window);
2018-08-02 05:21:32 +02:00
}
2020-11-04 18:09:21 +01:00
async ngOnInit() {
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
this.ngZone.run(() => {
switch (message.command) {
case 'windowHidden':
this.onWindowHidden();
break;
default:
}
});
});
}
onWindowHidden() {
this.showPassword = false;
}
2018-08-02 05:21:32 +02:00
}