mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
[PM-7240] Create new export component [UI changes] (#9285)
* 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 * 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-browser-v2 component Copy existing `export-browser`-component Add `popup-page` and -`header` and -`footer` Add missing imports as page is marked as standalone Route to new page when feature flag enabled * Remove duplicate verifyUser methods --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
parent
8361c0bd29
commit
28e8f8f364
@ -40,6 +40,7 @@ import { AboutPageV2Component } from "../tools/popup/settings/about-page/about-p
|
||||
import { AboutPageComponent } from "../tools/popup/settings/about-page/about-page.component";
|
||||
import { MoreFromBitwardenPageV2Component } from "../tools/popup/settings/about-page/more-from-bitwarden-page-v2.component";
|
||||
import { MoreFromBitwardenPageComponent } from "../tools/popup/settings/about-page/more-from-bitwarden-page.component";
|
||||
import { ExportBrowserV2Component } from "../tools/popup/settings/export/export-browser-v2.component";
|
||||
import { ExportBrowserComponent } from "../tools/popup/settings/export/export-browser.component";
|
||||
import { ImportBrowserV2Component } from "../tools/popup/settings/import/import-browser-v2.component";
|
||||
import { ImportBrowserComponent } from "../tools/popup/settings/import/import-browser.component";
|
||||
@ -243,12 +244,11 @@ const routes: Routes = [
|
||||
canActivate: [AuthGuard],
|
||||
data: { state: "import" },
|
||||
}),
|
||||
{
|
||||
...extensionRefreshSwap(ExportBrowserComponent, ExportBrowserV2Component, {
|
||||
path: "export",
|
||||
component: ExportBrowserComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: { state: "export" },
|
||||
},
|
||||
}),
|
||||
{
|
||||
path: "autofill",
|
||||
component: AutofillComponent,
|
||||
|
@ -0,0 +1,27 @@
|
||||
<popup-page>
|
||||
<popup-header slot="header" [pageTitle]="'exportVault' | i18n" showBackButton>
|
||||
<ng-container slot="end">
|
||||
<app-pop-out></app-pop-out>
|
||||
</ng-container>
|
||||
</popup-header>
|
||||
|
||||
<tools-export
|
||||
(formDisabled)="this.disabled = $event"
|
||||
(formLoading)="this.loading = $event"
|
||||
(onSuccessfulExport)="this.onSuccessfulExport($event)"
|
||||
></tools-export>
|
||||
|
||||
<popup-footer slot="footer">
|
||||
<button
|
||||
[disabled]="disabled"
|
||||
[loading]="loading"
|
||||
form="export_form_exportForm"
|
||||
bitButton
|
||||
type="submit"
|
||||
bitFormButton
|
||||
buttonType="primary"
|
||||
>
|
||||
{{ "exportVault" | i18n }}
|
||||
</button>
|
||||
</popup-footer>
|
||||
</popup-page>
|
@ -0,0 +1,40 @@
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component } from "@angular/core";
|
||||
import { Router, RouterLink } from "@angular/router";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { AsyncActionsModule, ButtonModule, DialogModule } from "@bitwarden/components";
|
||||
import { ExportComponent } from "@bitwarden/vault-export-ui";
|
||||
|
||||
import { PopOutComponent } from "../../../../platform/popup/components/pop-out.component";
|
||||
import { PopupFooterComponent } from "../../../../platform/popup/layout/popup-footer.component";
|
||||
import { PopupHeaderComponent } from "../../../../platform/popup/layout/popup-header.component";
|
||||
import { PopupPageComponent } from "../../../../platform/popup/layout/popup-page.component";
|
||||
|
||||
@Component({
|
||||
templateUrl: "export-browser-v2.component.html",
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterLink,
|
||||
JslibModule,
|
||||
DialogModule,
|
||||
AsyncActionsModule,
|
||||
ButtonModule,
|
||||
ExportComponent,
|
||||
PopupPageComponent,
|
||||
PopupFooterComponent,
|
||||
PopupHeaderComponent,
|
||||
PopOutComponent,
|
||||
],
|
||||
})
|
||||
export class ExportBrowserV2Component {
|
||||
protected disabled = false;
|
||||
protected loading = false;
|
||||
|
||||
constructor(private router: Router) {}
|
||||
|
||||
protected async onSuccessfulExport(organizationId: string): Promise<void> {
|
||||
await this.router.navigate(["/vault-settings"]);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user