bitwarden-estensione-browser/src/app/organizations/tools/export.component.ts

44 lines
1.5 KiB
TypeScript
Raw Normal View History

2018-07-05 20:40:53 +02:00
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { CryptoService } from 'jslib/abstractions/crypto.service';
2019-07-12 23:11:50 +02:00
import { EventService } from 'jslib/abstractions/event.service';
2018-07-05 20:40:53 +02:00
import { ExportService } from 'jslib/abstractions/export.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
import { ExportComponent as BaseExportComponent } from '../../tools/export.component';
2019-08-09 17:14:46 +02:00
2019-07-12 23:11:50 +02:00
import { EventType } from 'jslib/enums/eventType';
2018-07-05 20:40:53 +02:00
@Component({
selector: 'app-org-export',
templateUrl: '../../tools/export.component.html',
})
export class ExportComponent extends BaseExportComponent {
constructor(cryptoService: CryptoService, i18nService: I18nService,
2018-08-14 21:14:04 +02:00
platformUtilsService: PlatformUtilsService, exportService: ExportService,
2019-07-12 23:11:50 +02:00
eventService: EventService, private route: ActivatedRoute) {
super(cryptoService, i18nService, platformUtilsService, exportService, eventService);
2018-07-05 20:40:53 +02:00
}
ngOnInit() {
this.route.parent.parent.params.subscribe(async params => {
2018-07-05 20:40:53 +02:00
this.organizationId = params.organizationId;
});
}
getExportData() {
2018-12-17 16:54:18 +01:00
return this.exportService.getOrganizationExport(this.organizationId, this.format);
2018-07-05 20:40:53 +02:00
}
getFileName() {
return super.getFileName('org');
}
2019-07-12 23:11:50 +02:00
async collectEvent(): Promise<any> {
// TODO
// await this.eventService.collect(EventType.Organization_ClientExportedVault);
}
2018-07-05 20:40:53 +02:00
}