1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-26 09:33:22 +00:00

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

This commit is contained in:
Jason Ng
2026-02-25 13:05:29 -05:00
committed by GitHub
parent 666ff42d22
commit 2e38f409ec
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

@@ -12,6 +12,7 @@ import {
ViewChild,
ViewContainerRef,
} from "@angular/core";
import { toSignal } from "@angular/core/rxjs-interop";
import { ActivatedRoute, Router } from "@angular/router";
import {
firstValueFrom,
@@ -211,6 +212,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 */
@@ -620,7 +624,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 () => {