mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
[PM-22269] Generator/Send Nudge Updates (#15049)
* remove margin from the bottom of paragraph tag in generator spotlight * update aria-label text to match translation key * Remove `SendNudgeStatus` nudge type * update web send page to use new title and description * update old no sends title and description * hide internal contents on generator nudge * remove NudgeService from send-v2 test
This commit is contained in:
@@ -3614,14 +3614,6 @@
|
||||
"trustUser": {
|
||||
"message": "Trust user"
|
||||
},
|
||||
"sendsNoItemsTitle": {
|
||||
"message": "No active Sends",
|
||||
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||
},
|
||||
"sendsNoItemsMessage": {
|
||||
"message": "Use Send to securely share encrypted information with anyone.",
|
||||
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||
},
|
||||
"sendsTitleNoItems": {
|
||||
"message": "Send sensitive information safely",
|
||||
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||
|
||||
@@ -20,29 +20,16 @@
|
||||
*ngIf="listState === sendState.Empty"
|
||||
class="tw-flex tw-flex-col tw-h-full tw-justify-center"
|
||||
>
|
||||
<ng-container *ngIf="!(showSendSpotlight$ | async)">
|
||||
<bit-no-items [icon]="noItemIcon" class="tw-text-main">
|
||||
<ng-container slot="title">{{ "sendsNoItemsTitle" | i18n }}</ng-container>
|
||||
<ng-container slot="description">{{ "sendsNoItemsMessage" | i18n }}</ng-container>
|
||||
<tools-new-send-dropdown
|
||||
[hideIcon]="true"
|
||||
*ngIf="!sendsDisabled"
|
||||
slot="button"
|
||||
></tools-new-send-dropdown>
|
||||
</bit-no-items>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="showSendSpotlight$ | async">
|
||||
<bit-no-items [icon]="noItemIcon" class="tw-text-main">
|
||||
<ng-container slot="title">{{ "sendsTitleNoItems" | i18n }}</ng-container>
|
||||
<ng-container slot="description">{{ "sendsBodyNoItems" | i18n }}</ng-container>
|
||||
<tools-new-send-dropdown
|
||||
[hideIcon]="true"
|
||||
*ngIf="!sendsDisabled"
|
||||
slot="button"
|
||||
[buttonType]="'secondary'"
|
||||
></tools-new-send-dropdown>
|
||||
</bit-no-items>
|
||||
</ng-container>
|
||||
<bit-no-items [icon]="noItemIcon" class="tw-text-main">
|
||||
<ng-container slot="title">{{ "sendsTitleNoItems" | i18n }}</ng-container>
|
||||
<ng-container slot="description">{{ "sendsBodyNoItems" | i18n }}</ng-container>
|
||||
<tools-new-send-dropdown
|
||||
[hideIcon]="true"
|
||||
*ngIf="!sendsDisabled"
|
||||
slot="button"
|
||||
[buttonType]="'secondary'"
|
||||
></tools-new-send-dropdown>
|
||||
</bit-no-items>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="listState !== sendState.Empty">
|
||||
|
||||
@@ -6,7 +6,6 @@ import { MockProxy, mock } from "jest-mock-extended";
|
||||
import { of, BehaviorSubject } from "rxjs";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { NudgesService } from "@bitwarden/angular/vault";
|
||||
import { SearchService } from "@bitwarden/common/abstractions/search.service";
|
||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
@@ -122,7 +121,6 @@ describe("SendV2Component", () => {
|
||||
{ provide: SendListFiltersService, useValue: sendListFiltersService },
|
||||
{ provide: PopupRouterCacheService, useValue: mock<PopupRouterCacheService>() },
|
||||
{ provide: PolicyService, useValue: policyService },
|
||||
{ provide: NudgesService, useValue: mock<NudgesService>() },
|
||||
],
|
||||
}).compileComponents();
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component, OnDestroy } from "@angular/core";
|
||||
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
||||
import { combineLatest, Observable, switchMap } from "rxjs";
|
||||
import { combineLatest, switchMap } from "rxjs";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { NudgesService, NudgeType } from "@bitwarden/angular/vault";
|
||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||
import { PolicyType } from "@bitwarden/common/admin-console/enums";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
@@ -61,12 +60,6 @@ export class SendV2Component implements OnDestroy {
|
||||
protected title: string = "allSends";
|
||||
protected noItemIcon = NoSendsIcon;
|
||||
protected noResultsIcon = Icons.NoResults;
|
||||
private activeUserId$ = this.accountService.activeAccount$.pipe(getUserId);
|
||||
protected showSendSpotlight$: Observable<boolean> = this.activeUserId$.pipe(
|
||||
switchMap((userId) =>
|
||||
this.nudgesService.showNudgeSpotlight$(NudgeType.SendNudgeStatus, userId),
|
||||
),
|
||||
);
|
||||
|
||||
protected sendsDisabled = false;
|
||||
|
||||
@@ -75,7 +68,6 @@ export class SendV2Component implements OnDestroy {
|
||||
protected sendListFiltersService: SendListFiltersService,
|
||||
private policyService: PolicyService,
|
||||
private accountService: AccountService,
|
||||
private nudgesService: NudgesService,
|
||||
) {
|
||||
combineLatest([
|
||||
this.sendItemsService.emptyList$,
|
||||
|
||||
Reference in New Issue
Block a user