1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-27 18:13:29 +00:00

[PM-31408] update archive flag check in desktop vault (#19230) (#19233)

(cherry picked from commit 2e38f409ec)
This commit is contained in:
Jason Ng
2026-02-25 13:26:23 -05:00
committed by GitHub
parent 5065b0cf22
commit ac8a1086a4
2 changed files with 9 additions and 2 deletions

View File

@@ -201,6 +201,9 @@ export class VaultComponent implements OnInit, OnDestroy, CopyClickListener {
),
{ initialValue: false },
);
readonly archiveFlagEnabled = toSignal(this.cipherArchiveService.hasArchiveFlagEnabled$, {
initialValue: false,
});
protected itemTypesIcon = ItemTypes;
private organizations$: Observable<Organization[]> = this.accountService.activeAccount$.pipe(
@@ -601,7 +604,7 @@ export class VaultComponent implements OnInit, OnDestroy, CopyClickListener {
}
}
if (userCanArchive && !cipher.isDeleted && !cipher.isArchived) {
if (this.archiveFlagEnabled() && !cipher.isDeleted && !cipher.isArchived) {
menu.push({
label: this.i18nService.t("archiveVerb"),
click: async () => {

View File

@@ -10,6 +10,7 @@ import {
ViewChild,
ViewContainerRef,
} from "@angular/core";
import { toSignal } from "@angular/core/rxjs-interop";
import { ActivatedRoute, Router } from "@angular/router";
import {
firstValueFrom,
@@ -209,6 +210,9 @@ export class VaultV2Component<C extends CipherViewLike>
collections: CollectionView[] | null = null;
config: CipherFormConfig | null = null;
readonly userHasPremium = signal<boolean>(false);
readonly archiveFlagEnabled = toSignal(this.cipherArchiveService.hasArchiveFlagEnabled$, {
initialValue: false,
});
protected itemTypesIcon = ItemTypes;
/** Tracks the disabled status of the edit cipher form */
@@ -618,7 +622,7 @@ export class VaultV2Component<C extends CipherViewLike>
}
}
if (userCanArchive && !cipher.isDeleted && !cipher.isArchived) {
if (this.archiveFlagEnabled() && !cipher.isDeleted && !cipher.isArchived) {
menu.push({
label: this.i18nService.t("archiveVerb"),
click: async () => {