1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 12:13:45 +00:00

Merge remote-tracking branch 'origin' into auth/pm-18720/change-password-component-non-dialog-v3

This commit is contained in:
Patrick Pimentel
2025-06-03 10:15:53 -04:00
8 changed files with 19 additions and 57 deletions

View File

@@ -3620,14 +3620,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."

View File

@@ -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">

View File

@@ -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();

View File

@@ -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$,

View File

@@ -194,8 +194,8 @@
</ng-container>
<ng-container *ngIf="loaded">
<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>
<ng-container slot="title">{{ "sendsTitleNoItems" | i18n }}</ng-container>
<ng-container slot="description">{{ "sendsBodyNoItems" | i18n }}</ng-container>
<tools-new-send-dropdown
[hideIcon]="true"
*ngIf="!disableSend"

View File

@@ -8617,14 +8617,6 @@
"deviceTrusted": {
"message": "Device trusted"
},
"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."
},
"inviteUsers": {
"message": "Invite Users"
},

View File

@@ -41,7 +41,6 @@ export enum NudgeType {
NewNoteItemStatus = "new-note-item-status",
NewSshItemStatus = "new-ssh-item-status",
GeneratorNudgeStatus = "generator-nudge-status",
SendNudgeStatus = "send-nudge-status",
}
export const NUDGE_DISMISSED_DISK_KEY = new UserKeyDefinition<

View File

@@ -4,12 +4,14 @@
(onDismiss)="dismissGeneratorSpotlight(NudgeType.GeneratorNudgeStatus)"
>
<p
class="tw-text-main"
class="tw-text-main tw-mb-0"
bitTypography="body2"
[attr.aria-label]="'generatorNudgeIconAria' | i18n"
[attr.aria-label]="'generatorNudgeBodyAria' | i18n"
>
{{ "generatorNudgeBodyOne" | i18n }} <i class="bwi bwi-generate"></i>
{{ "generatorNudgeBodyTwo" | i18n }}
<span aria-hidden="true">
{{ "generatorNudgeBodyOne" | i18n }} <i class="bwi bwi-generate"></i>
{{ "generatorNudgeBodyTwo" | i18n }}
</span>
</p>
</bit-spotlight>
</div>