-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some left-over clean-up from #8840 - Removing import and export methods
- Loading branch information
Showing
1 changed file
with
3 additions
and
48 deletions.
There are no files selected for viewing
51 changes: 3 additions & 48 deletions
51
apps/browser/src/tools/popup/settings/settings.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,9 @@ | ||
import { Component, OnInit } from "@angular/core"; | ||
import { Router } from "@angular/router"; | ||
import { Subject } from "rxjs"; | ||
|
||
import { VaultTimeoutService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout.service"; | ||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; | ||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; | ||
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; | ||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; | ||
import { DialogService } from "@bitwarden/components"; | ||
|
||
import { BrowserApi } from "../../../platform/browser/browser-api"; | ||
import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; | ||
import { Component } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "tools-settings", | ||
templateUrl: "settings.component.html", | ||
}) | ||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil | ||
export class SettingsComponent implements OnInit { | ||
private destroy$ = new Subject<void>(); | ||
|
||
constructor( | ||
private platformUtilsService: PlatformUtilsService, | ||
private i18nService: I18nService, | ||
private vaultTimeoutService: VaultTimeoutService, | ||
public messagingService: MessagingService, | ||
private router: Router, | ||
private environmentService: EnvironmentService, | ||
private dialogService: DialogService, | ||
) {} | ||
|
||
async ngOnInit() {} | ||
|
||
async import() { | ||
await this.router.navigate(["/import"]); | ||
if (await BrowserApi.isPopupOpen()) { | ||
// 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 | ||
BrowserPopupUtils.openCurrentPagePopout(window); | ||
} | ||
} | ||
|
||
export() { | ||
// 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(["/export"]); | ||
} | ||
|
||
ngOnDestroy() { | ||
this.destroy$.next(); | ||
this.destroy$.complete(); | ||
} | ||
export class SettingsComponent { | ||
constructor() {} | ||
} |