1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-09 03:53:53 +00:00
Files
browser/apps/web/src/app/tools/vault-export/export-web.component.ts
Daniel James Smith c35bbc522c [PM-9051][PM-8641] Use reusable export-component on web (#9741)
* Add export-web.component

Introduce new export-web component
Delete old component
export.module - With export-web being standalone there's no need for a importModule
Change routing to load new component

* Prepare export.component to receive a orgId via the hosting-component

* Remove unused onSaved as it's replaced by onSuccessfulExport

* Refactor org-vault-export.component

Introduce new org-vault-export.component.html as the old component relied on the markup from password manager
Refactor org-vault-export.component
Retrieve organizationId from Route and pass it into the shared export.component
Ensure when exporting from AC to include all data from the selected org
org-vault-export.module - With the new component being standalone there's no need for a importModule
Change routing to load new org-vault-export component

* PM-8641 - Add success toast to base-export component
This ensures a success toast is shown on all clients consistently
Add missing entries into clients messages.json

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-06-25 19:17:03 +02:00

25 lines
685 B
TypeScript

import { Component } from "@angular/core";
import { Router } from "@angular/router";
import { ExportComponent } from "@bitwarden/vault-export-ui";
import { HeaderModule } from "../../layouts/header/header.module";
import { SharedModule } from "../../shared";
@Component({
templateUrl: "export-web.component.html",
standalone: true,
imports: [SharedModule, ExportComponent, HeaderModule],
})
export class ExportWebComponent {
protected loading = false;
protected disabled = false;
constructor(private router: Router) {}
/**
* Callback that is called after a successful export.
*/
protected async onSuccessfulExport(organizationId: string): Promise<void> {}
}