From ed63efd0765031e067db0539f2e58c59b8c24c6c Mon Sep 17 00:00:00 2001 From: Isaac Ivins Date: Mon, 26 Jan 2026 16:12:04 -0500 Subject: [PATCH] fixed conflict --- .../src/vault/app/vault-v3/vault.component.ts | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/apps/desktop/src/vault/app/vault-v3/vault.component.ts b/apps/desktop/src/vault/app/vault-v3/vault.component.ts index ca217bdb187..c62559f4804 100644 --- a/apps/desktop/src/vault/app/vault-v3/vault.component.ts +++ b/apps/desktop/src/vault/app/vault-v3/vault.component.ts @@ -598,64 +598,64 @@ export class VaultComponent implements OnInit, OnDestroy, CopyClickListener { ) { menu.push({ type: "separator" }); } - // if (cipher.login.canLaunch) { - // menu.push({ - // label: this.i18nService.t("launch"), - // click: () => this.platformUtilsService.launchUri(cipher.login.launchUri), - // }); - // } - // if (cipher.login.username != null) { - // menu.push({ - // label: this.i18nService.t("copyUsername"), - // click: () => this.copyValue(cipher, cipher.login.username, "username", "Username"), - // }); - // } - // if (cipher.login.password != null && cipher.viewPassword) { - // menu.push({ - // label: this.i18nService.t("copyPassword"), - // click: () => { - // this.copyValue(cipher, cipher.login.password, "password", "Password"); - // this.eventCollectionService - // .collect(EventType.Cipher_ClientCopiedPassword, cipher.id) - // .catch(() => {}); - // }, - // }); - // } - // if (cipher.login.hasTotp && (cipher.organizationUseTotp || this.userHasPremiumAccess)) { - // menu.push({ - // label: this.i18nService.t("copyVerificationCodeTotp"), - // click: async () => { - // const value = await firstValueFrom( - // this.totpService.getCode$(cipher.login.totp), - // ).catch((): any => null); - // if (value) { - // this.copyValue(cipher, value.code, "verificationCodeTotp", "TOTP"); - // } - // }, - // }); - // } + if (cipher.login.canLaunch) { + menu.push({ + label: this.i18nService.t("launch"), + click: () => this.platformUtilsService.launchUri(cipher.login.launchUri), + }); + } + if (cipher.login.username != null) { + menu.push({ + label: this.i18nService.t("copyUsername"), + click: () => this.copyValue(cipher, cipher.login.username, "username", "Username"), + }); + } + if (cipher.login.password != null && cipher.viewPassword) { + menu.push({ + label: this.i18nService.t("copyPassword"), + click: () => { + this.copyValue(cipher, cipher.login.password, "password", "Password"); + this.eventCollectionService + .collect(EventType.Cipher_ClientCopiedPassword, cipher.id) + .catch(() => {}); + }, + }); + } + if (cipher.login.hasTotp && (cipher.organizationUseTotp || this.userHasPremiumAccess)) { + menu.push({ + label: this.i18nService.t("copyVerificationCodeTotp"), + click: async () => { + const value = await firstValueFrom( + this.totpService.getCode$(cipher.login.totp), + ).catch((): any => null); + if (value) { + this.copyValue(cipher, value.code, "verificationCodeTotp", "TOTP"); + } + }, + }); + } break; case CipherType.Card: if (cipher.card.number != null || cipher.card.code != null) { menu.push({ type: "separator" }); } - // if (cipher.card.number != null) { - // menu.push({ - // label: this.i18nService.t("copyNumber"), - // click: () => this.copyValue(cipher, cipher.card.number, "number", "Card Number"), - // }); - // } - // if (cipher.card.code != null) { - // menu.push({ - // label: this.i18nService.t("copySecurityCode"), - // click: () => { - // this.copyValue(cipher, cipher.card.code, "securityCode", "Security Code"); - // this.eventCollectionService - // .collect(EventType.Cipher_ClientCopiedCardCode, cipher.id) - // .catch(() => {}); - // }, - // }); - // } + if (cipher.card.number != null) { + menu.push({ + label: this.i18nService.t("copyNumber"), + click: () => this.copyValue(cipher, cipher.card.number, "number", "Card Number"), + }); + } + if (cipher.card.code != null) { + menu.push({ + label: this.i18nService.t("copySecurityCode"), + click: () => { + this.copyValue(cipher, cipher.card.code, "securityCode", "Security Code"); + this.eventCollectionService + .collect(EventType.Cipher_ClientCopiedCardCode, cipher.id) + .catch(() => {}); + }, + }); + } break; default: break;