mirror of
https://github.com/bitwarden/directory-connector
synced 2026-01-07 11:03:23 +00:00
Resolve remaining eslint errors
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Component, Input, ViewChild, ViewContainerRef } from "@angular/core";
|
||||
import { Component, Input, ViewChild, ViewContainerRef, OnDestroy } from "@angular/core";
|
||||
import { Router } from "@angular/router";
|
||||
import { Subject, takeUntil } from "rxjs";
|
||||
|
||||
import { StateService } from "../../abstractions/state.service";
|
||||
|
||||
@@ -17,7 +18,7 @@ import { ApiLogInCredentials } from "@/jslib/common/src/models/domain/logInCrede
|
||||
selector: "app-apiKey",
|
||||
templateUrl: "apiKey.component.html",
|
||||
})
|
||||
export class ApiKeyComponent {
|
||||
export class ApiKeyComponent implements OnDestroy {
|
||||
@ViewChild("environment", { read: ViewContainerRef, static: true })
|
||||
environmentModal: ViewContainerRef;
|
||||
@Input() clientId = "";
|
||||
@@ -27,6 +28,8 @@ export class ApiKeyComponent {
|
||||
successRoute = "/tabs/dashboard";
|
||||
showSecret = false;
|
||||
|
||||
private destroyed$: Subject<void> = new Subject();
|
||||
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
private router: Router,
|
||||
@@ -92,12 +95,18 @@ export class ApiKeyComponent {
|
||||
this.environmentModal
|
||||
);
|
||||
|
||||
childComponent.onSaved.subscribe(() => {
|
||||
childComponent.onSaved.pipe(takeUntil(this.destroyed$)).subscribe(() => {
|
||||
modalRef.close();
|
||||
});
|
||||
}
|
||||
|
||||
toggleSecret() {
|
||||
this.showSecret = !this.showSecret;
|
||||
document.getElementById("client_secret").focus();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.destroyed$.next();
|
||||
this.destroyed$.complete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { enableProdMode } from "@angular/core";
|
||||
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
|
||||
|
||||
import { AppModule } from "./app.module";
|
||||
|
||||
import { isDev } from "@/jslib/electron/src/utils";
|
||||
|
||||
// tslint:disable-next-line
|
||||
require("../scss/styles.scss");
|
||||
|
||||
import { AppModule } from "./app.module";
|
||||
|
||||
if (!isDev()) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user