mirror of
https://github.com/bitwarden/browser
synced 2025-12-30 07:03:26 +00:00
* Cipher service web changes * Updated browser client to pass user id to cipher service observable changes * Cli changes * desktop changes * Fixed test * Libs changes * Fixed merge conflicts * Fixed merge conflicts * removed duplicate reference fixed conflict * Fixed test * Fixed test * Fixed test * Fixed desturcturing issue on failed to decrypt ciphers cipher service * Updated abstraction to use method syntax * Fixed conflicts * Fixed test on add edit v2 Passed active userId to delete function * Used getUserId utility function * made vault changes * made suggestion changes * made suggestion changes * made suggestion changes * Replace getUserId function calls with pipe operator syntax for better consistency * fixed merge conflicts * revert mistake made of usinf account activity during merge conflict fix * fixed conflicts * fixed tests
41 lines
1.6 KiB
TypeScript
41 lines
1.6 KiB
TypeScript
// FIXME: Update this file to be type safe and remove this and next line
|
|
// @ts-strict-ignore
|
|
import { Component } from "@angular/core";
|
|
import { distinctUntilChanged } from "rxjs";
|
|
|
|
import { VaultItemsComponent as BaseVaultItemsComponent } from "@bitwarden/angular/vault/components/vault-items.component";
|
|
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
|
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
|
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
|
|
|
import { SearchBarService } from "../../../app/layout/search/search-bar.service";
|
|
|
|
@Component({
|
|
selector: "app-vault-items",
|
|
templateUrl: "vault-items.component.html",
|
|
})
|
|
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
|
export class VaultItemsComponent extends BaseVaultItemsComponent {
|
|
constructor(
|
|
searchService: SearchService,
|
|
searchBarService: SearchBarService,
|
|
cipherService: CipherService,
|
|
accountService: AccountService,
|
|
) {
|
|
super(searchService, cipherService, accountService);
|
|
|
|
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
|
searchBarService.searchText$.pipe(distinctUntilChanged()).subscribe((searchText) => {
|
|
this.searchText = searchText;
|
|
// 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.search(200);
|
|
});
|
|
}
|
|
|
|
trackByFn(index: number, c: CipherView) {
|
|
return c.id;
|
|
}
|
|
}
|