mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 17:53:39 +00:00
[PM-19337] Desktop Archive (#16787)
* fix typescript errors * add archive filter to desktop * exclude archive items from search * add left click menu options for archive * add MP prompt checks for archive/unarchive * assure that a cipher cannot be assigned to collections when archived * move cipher from archive vault if a user loses premium * ensure clone only shows when archive is active * refactor right side footer actions to getter so it can be expanded * add confirmation prompt for archiving cipher * add utility service for archiving/unarchiving a cipher * add archive/unarchive ability to footer of desktop * add tests for utilities service * handle null emission of `cipherViews$` * use active user id directly from activeAccount * remove unneeded load of vault items * refresh internal cipher when archive is toggled - forcing the footer view to update * refresh current cipher when archived from the left-click menu * only show archive for viewing a cipher * add cipher form tests * clear archive date when soft deleting * update success messages * remove archive date when cloning * fix crowdin message swap * fix test * move MP prompt before archive prompt - match PM-26994 * fix failing test * add optional chaining * move template logic into class * condense logic * `unArchive`
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { combineLatest, Observable, switchMap } from "rxjs";
|
||||
import { combineLatest, filter, Observable, switchMap } from "rxjs";
|
||||
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||
@@ -20,7 +20,7 @@ export class NewItemNudgeService extends DefaultSingleNudgeService {
|
||||
nudgeStatus$(nudgeType: NudgeType, userId: UserId): Observable<NudgeStatus> {
|
||||
return combineLatest([
|
||||
this.getNudgeStatus$(nudgeType, userId),
|
||||
this.cipherService.cipherViews$(userId),
|
||||
this.cipherService.cipherViews$(userId).pipe(filter((ciphers) => ciphers != null)),
|
||||
]).pipe(
|
||||
switchMap(async ([nudgeStatus, ciphers]) => {
|
||||
if (nudgeStatus.hasSpotlightDismissed) {
|
||||
|
||||
Reference in New Issue
Block a user