1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-26 01:23:24 +00:00

Merge branch 'main' of github.com:bitwarden/clients into feature/PM-30737-Migrate-DeleteAccount

This commit is contained in:
Isaac Ivins
2026-02-03 11:21:24 -05:00
41 changed files with 637 additions and 94 deletions

View File

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