mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
[PM-15919] Remove v1 import page after Extension refresh (#12343)
* Remove v1 Import page and extension refresh conditional routing * Remove unused RouterLink import --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
971c157f56
commit
e7804856ab
@@ -96,7 +96,6 @@ import { MoreFromBitwardenPageV2Component } from "../tools/popup/settings/about-
|
||||
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 { ImportBrowserV2Component } from "../tools/popup/settings/import/import-browser-v2.component";
|
||||
import { ImportBrowserComponent } from "../tools/popup/settings/import/import-browser.component";
|
||||
import { SettingsV2Component } from "../tools/popup/settings/settings-v2.component";
|
||||
import { SettingsComponent } from "../tools/popup/settings/settings.component";
|
||||
import { clearVaultStateGuard } from "../vault/guards/clear-vault-state.guard";
|
||||
@@ -349,11 +348,12 @@ const routes: Routes = [
|
||||
canActivate: [authGuard],
|
||||
data: { elevation: 1 } satisfies RouteDataProperties,
|
||||
}),
|
||||
...extensionRefreshSwap(ImportBrowserComponent, ImportBrowserV2Component, {
|
||||
{
|
||||
path: "import",
|
||||
component: ImportBrowserV2Component,
|
||||
canActivate: [authGuard],
|
||||
data: { elevation: 1 } satisfies RouteDataProperties,
|
||||
}),
|
||||
},
|
||||
{
|
||||
path: "export",
|
||||
component: ExportBrowserV2Component,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component } from "@angular/core";
|
||||
import { Router, RouterLink } from "@angular/router";
|
||||
import { Router } from "@angular/router";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { AsyncActionsModule, ButtonModule, DialogModule } from "@bitwarden/components";
|
||||
@@ -16,7 +16,6 @@ import { PopupPageComponent } from "../../../../platform/popup/layout/popup-page
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterLink,
|
||||
JslibModule,
|
||||
DialogModule,
|
||||
AsyncActionsModule,
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<header>
|
||||
<div class="left">
|
||||
<button type="button" routerLink="/vault-settings">
|
||||
<span class="header-icon" aria-hidden="true"><i class="bwi bwi-angle-left"></i></span>
|
||||
<span>{{ "back" | i18n }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<h1 class="center">
|
||||
<span class="title">{{ "importData" | i18n }}</span>
|
||||
</h1>
|
||||
<div class="right">
|
||||
<button form="import_form_importForm" type="submit" [disabled]="disabled">
|
||||
<span [hidden]="loading">{{ "importData" | i18n }}</span>
|
||||
<i class="bwi bwi-spinner bwi-lg bwi-spin" [hidden]="!loading" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
<main tabindex="-1">
|
||||
<div class="tw-p-4">
|
||||
<tools-import
|
||||
(formDisabled)="this.disabled = $event"
|
||||
(formLoading)="this.loading = $event"
|
||||
(onSuccessfulImport)="this.onSuccessfulImport($event)"
|
||||
></tools-import>
|
||||
</div>
|
||||
</main>
|
||||
@@ -1,33 +0,0 @@
|
||||
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 { ImportComponent } from "@bitwarden/importer/ui";
|
||||
|
||||
@Component({
|
||||
templateUrl: "import-browser.component.html",
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterLink,
|
||||
JslibModule,
|
||||
DialogModule,
|
||||
AsyncActionsModule,
|
||||
ButtonModule,
|
||||
ImportComponent,
|
||||
],
|
||||
})
|
||||
export class ImportBrowserComponent {
|
||||
protected disabled = false;
|
||||
protected loading = false;
|
||||
|
||||
constructor(private router: Router) {}
|
||||
|
||||
protected async onSuccessfulImport(organizationId: string): Promise<void> {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/tabs/settings"]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user