mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 05:30:01 +00:00
Followup to remove comments and timeouts and handle errors
This commit is contained in:
@@ -60,10 +60,6 @@ export class DesktopAutofillService implements OnDestroy {
|
||||
.pipe(
|
||||
distinctUntilChanged(),
|
||||
switchMap((enabled) => {
|
||||
/* if (!enabled) {
|
||||
return EMPTY;
|
||||
} */
|
||||
|
||||
return this.accountService.activeAccount$.pipe(
|
||||
map((account) => account?.id),
|
||||
filter((userId): userId is UserId => userId != null),
|
||||
|
||||
@@ -160,7 +160,6 @@ export class DesktopFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
this.rpId.pipe(
|
||||
filter((id) => id != null),
|
||||
take(1),
|
||||
timeout(5000), // 5 seconds timeout
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { BitwardenShield } from "@bitwarden/auth/angular";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import {
|
||||
@@ -21,14 +22,12 @@ import {
|
||||
SectionHeaderComponent,
|
||||
BitIconButtonComponent,
|
||||
} from "@bitwarden/components";
|
||||
// import { SearchComponent } from "@bitwarden/components/src/search/search.component";
|
||||
|
||||
import {
|
||||
DesktopFido2UserInterfaceService,
|
||||
DesktopFido2UserInterfaceSession,
|
||||
} from "../../../autofill/services/desktop-fido2-user-interface.service";
|
||||
import { DesktopSettingsService } from "../../../platform/services/desktop-settings.service";
|
||||
// import { AnchorLinkDirective } from "../../../../../libs/components/src/link/link.directive";
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
@@ -45,7 +44,6 @@ import { DesktopSettingsService } from "../../../platform/services/desktop-setti
|
||||
SectionComponent,
|
||||
ItemModule,
|
||||
BadgeModule,
|
||||
// SearchComponent,
|
||||
],
|
||||
templateUrl: "fido2-create.component.html",
|
||||
})
|
||||
@@ -62,6 +60,7 @@ export class Fido2CreateComponent implements OnInit {
|
||||
private readonly cipherService: CipherService,
|
||||
private readonly dialogService: DialogService,
|
||||
private readonly domainSettingsService: DomainSettingsService,
|
||||
private readonly logService: LogService,
|
||||
private readonly router: Router,
|
||||
) {}
|
||||
|
||||
@@ -90,9 +89,7 @@ export class Fido2CreateComponent implements OnInit {
|
||||
});
|
||||
this.ciphersSubject.next(relevantCiphers);
|
||||
})
|
||||
.catch(() => {
|
||||
// console.error(err);
|
||||
});
|
||||
.catch((error) => this.logService.error(error));
|
||||
}
|
||||
|
||||
async addPasskeyToCipher(cipher: CipherView) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import { firstValueFrom, map, BehaviorSubject, Observable } from "rxjs";
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { BitwardenShield } from "@bitwarden/auth/angular";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import {
|
||||
@@ -57,6 +58,7 @@ export class Fido2VaultComponent implements OnInit, OnDestroy {
|
||||
private readonly fido2UserInterfaceService: DesktopFido2UserInterfaceService,
|
||||
private readonly cipherService: CipherService,
|
||||
private readonly accountService: AccountService,
|
||||
private readonly logService: LogService,
|
||||
private readonly router: Router,
|
||||
) {}
|
||||
|
||||
@@ -75,9 +77,7 @@ export class Fido2VaultComponent implements OnInit, OnDestroy {
|
||||
.then((ciphers) => {
|
||||
this.ciphersSubject.next(ciphers);
|
||||
})
|
||||
.catch(() => {
|
||||
// console.error(err);
|
||||
});
|
||||
.catch((error) => this.logService.error(error));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user