mirror of
https://github.com/bitwarden/browser
synced 2026-02-09 21:20:27 +00:00
Revert changes
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { ChangeDetectorRef, Component, NgZone, OnDestroy, OnInit, inject } from "@angular/core";
|
||||
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
||||
import { NavigationEnd, Router, RouterOutlet } from "@angular/router";
|
||||
@@ -44,8 +46,8 @@ import { DesktopSyncVerificationDialogComponent } from "./components/desktop-syn
|
||||
export class AppComponent implements OnInit, OnDestroy {
|
||||
private compactModeService = inject(PopupCompactModeService);
|
||||
|
||||
private lastActivity: Date | null = null;
|
||||
private activeUserId: UserId | null = null;
|
||||
private lastActivity: Date;
|
||||
private activeUserId: UserId;
|
||||
private recordActivitySubject = new Subject<void>();
|
||||
private routerAnimations = false;
|
||||
|
||||
@@ -83,7 +85,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
await this.clearComponentStates();
|
||||
|
||||
this.accountService.activeAccount$.pipe(takeUntil(this.destroy$)).subscribe((account) => {
|
||||
this.activeUserId = account?.id ?? null;
|
||||
this.activeUserId = account?.id;
|
||||
});
|
||||
|
||||
this.authService.activeAccountStatus$
|
||||
@@ -113,10 +115,6 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
if (msg.logoutReason) {
|
||||
await this.displayLogoutReason(msg.logoutReason);
|
||||
}
|
||||
|
||||
if (this.activeUserId) {
|
||||
await this.router.navigate(["vault"]);
|
||||
}
|
||||
});
|
||||
this.changeDetectorRef.detectChanges();
|
||||
} else if (msg.command === "authBlocked" || msg.command === "goHome") {
|
||||
@@ -184,9 +182,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
await this.clearComponentStates();
|
||||
}
|
||||
if (url.startsWith("/tabs/")) {
|
||||
if (this.activeUserId) {
|
||||
await this.cipherService.setAddEditCipherInfo(null, this.activeUserId);
|
||||
}
|
||||
await this.cipherService.setAddEditCipherInfo(null, this.activeUserId);
|
||||
}
|
||||
(window as any).previousPopupUrl = url;
|
||||
|
||||
|
||||
@@ -56,9 +56,7 @@ export class VaultBrowserStateService {
|
||||
return await firstValueFrom(this.vaultBrowserGroupingsComponentState$);
|
||||
}
|
||||
|
||||
async setBrowserGroupingsComponentState(
|
||||
value: BrowserGroupingsComponentState | null,
|
||||
): Promise<void> {
|
||||
async setBrowserGroupingsComponentState(value: BrowserGroupingsComponentState): Promise<void> {
|
||||
await this.activeUserVaultBrowserGroupingsComponentState.update(() => value, {
|
||||
shouldUpdate: (current) => !(current == null && value == null),
|
||||
});
|
||||
@@ -68,7 +66,7 @@ export class VaultBrowserStateService {
|
||||
return await firstValueFrom(this.vaultBrowserComponentState$);
|
||||
}
|
||||
|
||||
async setBrowserVaultItemsComponentState(value: BrowserComponentState | null): Promise<void> {
|
||||
async setBrowserVaultItemsComponentState(value: BrowserComponentState): Promise<void> {
|
||||
await this.activeUserVaultBrowserComponentState.update(() => value, {
|
||||
shouldUpdate: (current) => !(current == null && value == null),
|
||||
});
|
||||
|
||||
@@ -198,7 +198,7 @@ export abstract class CipherService implements UserKeyRotationDataProvider<Ciphe
|
||||
abstract restoreWithServer(id: string, userId: UserId, asAdmin?: boolean): Promise<any>;
|
||||
abstract restoreManyWithServer(ids: string[], orgId?: string): Promise<void>;
|
||||
abstract getKeyForCipherKeyDecryption(cipher: Cipher, userId: UserId): Promise<any>;
|
||||
abstract setAddEditCipherInfo(value: AddEditCipherInfo | null, userId: UserId): Promise<void>;
|
||||
abstract setAddEditCipherInfo(value: AddEditCipherInfo, userId: UserId): Promise<void>;
|
||||
/**
|
||||
* Returns user ciphers re-encrypted with the new user key.
|
||||
* @param originalUserKey the original user key
|
||||
|
||||
Reference in New Issue
Block a user