1
0
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:
Leslie Xiong
2026-01-23 02:53:53 -05:00
parent 2fac696567
commit 5ebba7a4b4
31 changed files with 2641 additions and 672 deletions

View 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 };

View 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;
}

View File

@@ -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";

View 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;
}
}