1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00

[PM-18803] nudges new items (#14523)

* Added new-items-nudge service and component to show spotlight for new item nudges
This commit is contained in:
Jason Ng
2025-05-01 12:43:55 -04:00
committed by GitHub
parent 64daf5a889
commit a62d269a89
15 changed files with 398 additions and 7 deletions

View File

@@ -34,7 +34,9 @@ import { AsyncActionsModule, ButtonModule, ItemModule, ToastService } from "@bit
import {
CipherFormConfig,
CipherFormGenerationService,
NudgeStatus,
PasswordRepromptService,
VaultNudgesService,
} from "@bitwarden/vault";
// FIXME: remove `/apps` import from `/libs`
// FIXME: remove `src` and fix import
@@ -47,6 +49,7 @@ import { CipherFormService } from "./abstractions/cipher-form.service";
import { TotpCaptureService } from "./abstractions/totp-capture.service";
import { CipherFormModule } from "./cipher-form.module";
import { CipherFormComponent } from "./components/cipher-form.component";
import { NewItemNudgeComponent } from "./components/new-item-nudge/new-item-nudge.component";
import { CipherFormCacheService } from "./services/default-cipher-form-cache.service";
const defaultConfig: CipherFormConfig = {
@@ -132,8 +135,23 @@ export default {
component: CipherFormComponent,
decorators: [
moduleMetadata({
imports: [CipherFormModule, AsyncActionsModule, ButtonModule, ItemModule],
imports: [
CipherFormModule,
AsyncActionsModule,
ButtonModule,
ItemModule,
NewItemNudgeComponent,
],
providers: [
{
provide: VaultNudgesService,
useValue: {
showNudge$: new BehaviorSubject({
hasBadgeDismissed: true,
hasSpotlightDismissed: true,
} as NudgeStatus),
},
},
{
provide: CipherFormService,
useClass: TestAddEditFormService,