Skip to content

Commit

Permalink
Clean-up settings.component
Browse files Browse the repository at this point in the history
Some left-over clean-up from #8840
- Removing import and export methods
  • Loading branch information
djsmith85 committed May 17, 2024
1 parent 6616a0a commit cdfed80
Showing 1 changed file with 3 additions and 48 deletions.
51 changes: 3 additions & 48 deletions apps/browser/src/tools/popup/settings/settings.component.ts
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() {}
}

0 comments on commit cdfed80

Please sign in to comment.