1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00
Files
browser/apps/desktop/src/app/tools/export/export-desktop.component.ts
Daniel James Smith df193dd869 [PM-2517] [PM-8299] Add password protected export on desktop/Export managed collections (#9286)
* Move/replace submit and userVerification logic from web into the BaseExportComponent

Add "@bitwarden/auth" as dependency to the vault-export-ui package
New submit logic also checks for password-encrypted exports which will be need for future UI updates on browser and desktop

* Create export-desktop component using shared recipe

Create new export component that uses the shared export.component from @bitwarden/vault-export-ui

* Update imports within AppModule

Remove old ExportComponent
Remove ExportScopeCalloutComponent as it's part of the BaseExportComponent

* Open new component when clicking on Export Vault menu item

* Add missing entries to messages.json

* Delete old export.component

* Remove duplicate verifyUser-method

* Change placeholder example

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-05-30 00:00:49 +02:00

34 lines
898 B
TypeScript

import { DialogRef } from "@angular/cdk/dialog";
import { CommonModule } from "@angular/common";
import { Component } from "@angular/core";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { AsyncActionsModule, ButtonModule, DialogModule } from "@bitwarden/components";
import { ExportComponent } from "@bitwarden/vault-export-ui";
@Component({
templateUrl: "export-desktop.component.html",
standalone: true,
imports: [
CommonModule,
JslibModule,
DialogModule,
AsyncActionsModule,
ButtonModule,
ExportComponent,
],
})
export class ExportDesktopComponent {
protected disabled = false;
protected loading = false;
constructor(public dialogRef: DialogRef) {}
/**
* Callback that is called after a successful export.
*/
protected async onSuccessfulExport(organizationId: string): Promise<void> {
this.dialogRef.close();
}
}