mirror of
https://github.com/bitwarden/browser
synced 2026-02-24 00:23:17 +00:00
migrated vault cipher list
This commit is contained in:
16
libs/vault/src/components/vault-item-event.ts
Normal file
16
libs/vault/src/components/vault-item-event.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { CipherViewLike } from "@bitwarden/common/vault/utils/cipher-view-like-utils";
|
||||
import { VaultItem } from "@bitwarden/vault";
|
||||
|
||||
export type VaultItemEvent<C extends CipherViewLike> =
|
||||
| { type: "viewAttachments"; item: C }
|
||||
| { type: "viewEvents"; item: C }
|
||||
| { type: "clone"; item: C }
|
||||
| { type: "restore"; items: C[] }
|
||||
| { type: "delete"; items: VaultItem<C>[] }
|
||||
| { type: "copyField"; item: C; field: "username" | "password" | "totp" }
|
||||
| { type: "moveToFolder"; items: C[] }
|
||||
| { type: "assignToCollections"; items: C[] }
|
||||
| { type: "archive"; items: C[] }
|
||||
| { type: "unarchive"; items: C[] }
|
||||
| { type: "toggleFavorite"; item: C }
|
||||
| { type: "editCipher"; item: C };
|
||||
7
libs/vault/src/components/vault-item.ts
Normal file
7
libs/vault/src/components/vault-item.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { CollectionView } from "@bitwarden/common/admin-console/models/collections";
|
||||
import { CipherViewLike } from "@bitwarden/common/vault/utils/cipher-view-like-utils";
|
||||
|
||||
export interface VaultItem<C extends CipherViewLike> {
|
||||
collection?: CollectionView;
|
||||
cipher?: C;
|
||||
}
|
||||
@@ -12,6 +12,7 @@ export { CopyCipherFieldDirective } from "./components/copy-cipher-field.directi
|
||||
export { OrgIconDirective } from "./components/org-icon.directive";
|
||||
export { CanDeleteCipherDirective } from "./components/can-delete-cipher.directive";
|
||||
export { DarkImageSourceDirective } from "./components/dark-image-source.directive";
|
||||
export { GetOrgNameFromIdPipe } from "./pipes/get-organization-name.pipe";
|
||||
|
||||
export * from "./cipher-view";
|
||||
export * from "./cipher-form";
|
||||
@@ -30,6 +31,8 @@ export * from "./components/carousel";
|
||||
export * from "./components/new-cipher-menu/new-cipher-menu.component";
|
||||
export * from "./components/permit-cipher-details-popover/permit-cipher-details-popover.component";
|
||||
export * from "./components/vault-items-transfer";
|
||||
export { VaultItem } from "./components/vault-item";
|
||||
export { VaultItemEvent } from "./components/vault-item-event";
|
||||
|
||||
export { DefaultSshImportPromptService } from "./services/default-ssh-import-prompt.service";
|
||||
export { SshImportPromptService } from "./services/ssh-import-prompt.service";
|
||||
|
||||
16
libs/vault/src/pipes/get-organization-name.pipe.ts
Normal file
16
libs/vault/src/pipes/get-organization-name.pipe.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Pipe, PipeTransform } from "@angular/core";
|
||||
|
||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||
import { OrganizationId } from "@bitwarden/sdk-internal";
|
||||
|
||||
@Pipe({
|
||||
name: "orgNameFromId",
|
||||
pure: true,
|
||||
standalone: false,
|
||||
})
|
||||
export class GetOrgNameFromIdPipe implements PipeTransform {
|
||||
transform(value: string | OrganizationId, organizations: Organization[]) {
|
||||
const orgName = organizations?.find((o) => o.id === value)?.name;
|
||||
return orgName;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user