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 d601f46e430..8164a1f4a67 100644 --- a/apps/desktop/src/vault/app/vault/item-footer.component.ts +++ b/apps/desktop/src/vault/app/vault/item-footer.component.ts @@ -97,7 +97,7 @@ export class ItemFooterComponent implements OnInit, OnChanges { } async ngOnChanges(changes: SimpleChanges) { - if (changes.cipher) { + if (changes.cipher || changes.action) { await this.checkArchiveState(); } } @@ -255,12 +255,15 @@ export class ItemFooterComponent implements OnInit, OnChanges { this.userCanArchive = userCanArchive; this.showArchiveButton = - cipherCanBeArchived && userCanArchive && this.action === "view" && !this.cipher.isArchived; + cipherCanBeArchived && + userCanArchive && + (this.action === "view" || this.action === "edit") && + !this.cipher.isArchived; // A user should always be able to unarchive an archived item this.showUnarchiveButton = hasArchiveFlagEnabled && - this.action === "view" && + (this.action === "view" || this.action === "edit") && this.cipher.isArchived && !this.cipher.isDeleted; }