mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
PM-14914/ssh-key-item-type-filtering-web (#11990)
This commit is contained in:
@@ -68,6 +68,9 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
||||
if (this.activeFilter.cipherType === CipherType.SecureNote) {
|
||||
return "searchSecureNote";
|
||||
}
|
||||
if (this.activeFilter.cipherType === CipherType.SshKey) {
|
||||
return "searchSshKey";
|
||||
}
|
||||
if (this.activeFilter.selectedFolderNode?.node) {
|
||||
return "searchFolder";
|
||||
}
|
||||
|
||||
@@ -306,6 +306,12 @@ export class VaultFilterService implements VaultFilterServiceAbstraction {
|
||||
type: CipherType.SecureNote,
|
||||
icon: "bwi-sticky-note",
|
||||
},
|
||||
{
|
||||
id: "sshKey",
|
||||
name: this.i18nService.t("typeSshKey"),
|
||||
type: CipherType.SshKey,
|
||||
icon: "bwi-key",
|
||||
},
|
||||
];
|
||||
|
||||
return this.buildTypeTree(
|
||||
|
||||
@@ -23,6 +23,9 @@ export function createFilterFunction(filter: RoutedVaultFilterModel): FilterFunc
|
||||
if (filter.type === "note" && cipher.type !== CipherType.SecureNote) {
|
||||
return false;
|
||||
}
|
||||
if (filter.type === "sshKey" && cipher.type !== CipherType.SshKey) {
|
||||
return false;
|
||||
}
|
||||
if (filter.type === "trash" && !cipher.isDeleted) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
export const All = "all";
|
||||
|
||||
// TODO: Remove `All` when moving to vertical navigation.
|
||||
const itemTypes = ["favorites", "login", "card", "identity", "note", "trash", All] as const;
|
||||
const itemTypes = [
|
||||
"favorites",
|
||||
"login",
|
||||
"card",
|
||||
"identity",
|
||||
"note",
|
||||
"sshKey",
|
||||
"trash",
|
||||
All,
|
||||
] as const;
|
||||
|
||||
export type RoutedVaultFilterItemType = (typeof itemTypes)[number];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user