From a76e68c3101b3d1e9772799cd30e5f773a62f2ec Mon Sep 17 00:00:00 2001 From: Jason Ng Date: Wed, 21 Jan 2026 13:49:07 -0500 Subject: [PATCH] [PM-30761] remove archive from trash (#18361) * add isDeleted check to showUnarchiveBtn and other optionss in vault cipher row * remove unarchive options from desktop trash, remove archive options in bulk menu for items in trash --- .../vault/app/vault/item-footer.component.ts | 5 +- .../src/vault/app/vault/vault-v2.component.ts | 2 +- .../vault-cipher-row.component.html | 64 +++++++++++-------- .../vault-items/vault-cipher-row.component.ts | 13 +++- .../vault-items/vault-items.component.html | 25 ++++---- .../vault-items/vault-items.component.ts | 9 ++- 6 files changed, 71 insertions(+), 47 deletions(-) diff --git a/apps/desktop/src/vault/app/vault/item-footer.component.ts b/apps/desktop/src/vault/app/vault/item-footer.component.ts index 3f22a08d00e..399a0e7875d 100644 --- a/apps/desktop/src/vault/app/vault/item-footer.component.ts +++ b/apps/desktop/src/vault/app/vault/item-footer.component.ts @@ -246,6 +246,9 @@ export class ItemFooterComponent implements OnInit, OnChanges { // A user should always be able to unarchive an archived item this.showUnarchiveButton = - hasArchiveFlagEnabled && this.action === "view" && this.cipher.isArchived; + hasArchiveFlagEnabled && + this.action === "view" && + this.cipher.isArchived && + !this.cipher.isDeleted; } } diff --git a/apps/desktop/src/vault/app/vault/vault-v2.component.ts b/apps/desktop/src/vault/app/vault/vault-v2.component.ts index f92b433125c..20e6bc6d35b 100644 --- a/apps/desktop/src/vault/app/vault/vault-v2.component.ts +++ b/apps/desktop/src/vault/app/vault/vault-v2.component.ts @@ -611,7 +611,7 @@ export class VaultV2Component }); } - if (cipher.isArchived) { + if (cipher.isArchived && !cipher.isDeleted) { menu.push({ label: this.i18nService.t("unArchive"), click: async () => { diff --git a/apps/web/src/app/vault/components/vault-items/vault-cipher-row.component.html b/apps/web/src/app/vault/components/vault-items/vault-cipher-row.component.html index 5b9f9db3e62..081829a8d83 100644 --- a/apps/web/src/app/vault/components/vault-items/vault-cipher-row.component.html +++ b/apps/web/src/app/vault/components/vault-items/vault-cipher-row.component.html @@ -171,37 +171,47 @@ - @if (!viewingOrgVault) { - } - - - - - + @if (!isDeleted && canEditCipher) { + + } + @if (showAttachments) { + + } + @if (showClone) { + + } + @if (showAssignToCollections) { + + } + @if (showEventLogs) { + + } @if (showArchiveButton) { @if (userCanArchive) { - + @if (bulkArchiveAllowed) { + + } - + @if (bulkUnarchiveAllowed) { + + }