diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index 4036b3d0b7ca..c07222f0ac09 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -2321,6 +2321,42 @@ "licenseClass": { "message": "License class" }, + "addItemHeaderLogin": { + "message": "Add login", + "description": "Header for new login item type" + }, + "addItemHeaderCard": { + "message": "Add card", + "description": "Header for new card item type" + }, + "addItemHeaderIdentity": { + "message": "Add identity", + "description": "Header for new identity item type" + }, + "addItemHeaderNote": { + "message": "Add note", + "description": "Header for new note item type" + }, + "addItemHeaderSecureNote": { + "message": "Add secure note", + "description": "Header for new secure note item type" + }, + "addItemHeaderSshKey": { + "message": "Add SSH key", + "description": "Header for new SSH key item type" + }, + "addItemHeaderBankAccount": { + "message": "Add bank account", + "description": "Header for new bank account item type" + }, + "addItemHeaderDriversLicense": { + "message": "Add license", + "description": "Header for new license item type" + }, + "addItemHeaderPassport": { + "message": "Add passport", + "description": "Header for new passport item type" + }, "newItemHeaderLogin": { "message": "New Login", "description": "Header for new login item type" @@ -2385,6 +2421,22 @@ "message": "Edit secure note", "description": "Header for edit secure note item type" }, + "editItemHeaderLoginSentenceCase": { + "message": "Edit login", + "description": "Header for edit login item type" + }, + "editItemHeaderCardSentenceCase": { + "message": "Edit card", + "description": "Header for edit card item type" + }, + "editItemHeaderIdentitySentenceCase": { + "message": "Edit identity", + "description": "Header for edit identity item type" + }, + "editItemHeaderNoteSentenceCase": { + "message": "Edit note", + "description": "Header for edit note item type" + }, "editItemHeaderSshKey": { "message": "Edit SSH key", "description": "Header for edit SSH key item type" @@ -3344,6 +3396,10 @@ "message": "New Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, + "createSendV2": { + "message": "Create Send", + "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." + }, "newPassword": { "message": "New password" }, @@ -5299,6 +5355,29 @@ } } }, + "viewItemHeaderLoginSentenceCase": { + "message": "View login", + "description": "Header for view login item type" + }, + "viewItemHeaderCardSentenceCase": { + "message": "View card", + "description": "Header for view card item type" + }, + "viewItemHeaderIdentitySentenceCase": { + "message": "View identity", + "description": "Header for view identity item type" + }, + "viewItemHeaderNoteSentenceCase": { + "message": "View note", + "description": "Header for view note item type" + }, + "create": { + "message": "Create", + "description": "for adding new items" + }, + "addCollection": { + "message": "Add collection" + }, "new": { "message": "New" }, diff --git a/apps/browser/src/vault/popup/components/vault/add-edit/add-edit.component.spec.ts b/apps/browser/src/vault/popup/components/vault/add-edit/add-edit.component.spec.ts index f7f9c2482281..e5e832ad459c 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit/add-edit.component.spec.ts +++ b/apps/browser/src/vault/popup/components/vault/add-edit/add-edit.component.spec.ts @@ -91,7 +91,12 @@ describe("AddEditComponent", () => { providers: [ provideNoopAnimations(), { provide: PlatformUtilsService, useValue: mock() }, - { provide: ConfigService, useValue: mock() }, + { + provide: ConfigService, + useValue: mock({ + getFeatureFlag$: jest.fn().mockReturnValue(of(false)), + }), + }, { provide: PopupRouterCacheService, useValue: { back, setHistory } }, { provide: PopupCloseWarningService, useValue: { disable } }, { provide: Router, useValue: { navigate } }, diff --git a/apps/browser/src/vault/popup/components/vault/add-edit/add-edit.component.ts b/apps/browser/src/vault/popup/components/vault/add-edit/add-edit.component.ts index cb26afabafa3..c36745716ca0 100644 --- a/apps/browser/src/vault/popup/components/vault/add-edit/add-edit.component.ts +++ b/apps/browser/src/vault/popup/components/vault/add-edit/add-edit.component.ts @@ -2,7 +2,7 @@ // @ts-strict-ignore import { CommonModule } from "@angular/common"; import { Component, OnInit, OnDestroy, viewChild } from "@angular/core"; -import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; +import { takeUntilDestroyed, toSignal } from "@angular/core/rxjs-interop"; import { FormsModule } from "@angular/forms"; import { ActivatedRoute, Params, Router } from "@angular/router"; import { firstValueFrom, map, Observable, switchMap } from "rxjs"; @@ -192,6 +192,11 @@ export type AddEditQueryParams = Partial>; ], }) export class AddEditComponent implements OnInit, OnDestroy { + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + readonly cipherFormComponent = viewChild(CipherFormComponent); headerText: string; @@ -513,18 +518,54 @@ export class AddEditComponent implements OnInit, OnDestroy { setHeader(mode: CipherFormMode, type: CipherType) { const isEditMode = mode === "edit" || mode === "partial-edit"; const translation = { - [CipherType.Login]: isEditMode ? "editItemHeaderLogin" : "newItemHeaderLogin", - [CipherType.Card]: isEditMode ? "editItemHeaderCard" : "newItemHeaderCard", - [CipherType.Identity]: isEditMode ? "editItemHeaderIdentity" : "newItemHeaderIdentity", - [CipherType.SecureNote]: isEditMode ? "editItemHeaderNote" : "newItemHeaderNote", - [CipherType.SshKey]: isEditMode ? "editItemHeaderSshKey" : "newItemHeaderSshKey", + [CipherType.Login]: isEditMode + ? this.btnTextAddCreateFeatureFlag() + ? "editItemHeaderLoginSentenceCase" + : "editItemHeaderLogin" + : this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderLogin" + : "newItemHeaderLogin", + [CipherType.Card]: isEditMode + ? this.btnTextAddCreateFeatureFlag() + ? "editItemHeaderCardSentenceCase" + : "editItemHeaderCard" + : this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderCard" + : "newItemHeaderCard", + [CipherType.Identity]: isEditMode + ? this.btnTextAddCreateFeatureFlag() + ? "editItemHeaderIdentitySentenceCase" + : "editItemHeaderIdentity" + : this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderIdentity" + : "newItemHeaderIdentity", + [CipherType.SecureNote]: isEditMode + ? this.btnTextAddCreateFeatureFlag() + ? "editItemHeaderNoteSentenceCase" + : "editItemHeaderNote" + : this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderNote" + : "newItemHeaderNote", + [CipherType.SshKey]: isEditMode + ? "editItemHeaderSshKey" + : this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderSshKey" + : "newItemHeaderSshKey", [CipherType.BankAccount]: isEditMode ? "editItemHeaderBankAccount" - : "newItemHeaderBankAccount", + : this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderBankAccount" + : "newItemHeaderBankAccount", [CipherType.DriversLicense]: isEditMode ? "editItemHeaderLicense" - : "newItemHeaderDriversLicense", - [CipherType.Passport]: isEditMode ? "editItemHeaderPassport" : "newItemHeaderPassport", + : this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderDriversLicense" + : "newItemHeaderDriversLicense", + [CipherType.Passport]: isEditMode + ? "editItemHeaderPassport" + : this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderPassport" + : "newItemHeaderPassport", }; return this.i18nService.t(translation[type]); } diff --git a/apps/browser/src/vault/popup/components/vault/new-item-dropdown/new-item-dropdown.component.html b/apps/browser/src/vault/popup/components/vault/new-item-dropdown/new-item-dropdown.component.html index 6e1a9ff9aded..e4fa0eca2ea2 100644 --- a/apps/browser/src/vault/popup/components/vault/new-item-dropdown/new-item-dropdown.component.html +++ b/apps/browser/src/vault/popup/components/vault/new-item-dropdown/new-item-dropdown.component.html @@ -6,7 +6,7 @@ (click)="navigateToNewItemPage()" startIcon="bwi-plus" > - {{ "new" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "add" : "new") | i18n }} } @else { @for (menuItem of cipherMenuItems$ | async; track menuItem.type) { diff --git a/apps/browser/src/vault/popup/components/vault/new-item-dropdown/new-item-dropdown.component.ts b/apps/browser/src/vault/popup/components/vault/new-item-dropdown/new-item-dropdown.component.ts index 3ce733d625d9..d03c22849be2 100644 --- a/apps/browser/src/vault/popup/components/vault/new-item-dropdown/new-item-dropdown.component.ts +++ b/apps/browser/src/vault/popup/components/vault/new-item-dropdown/new-item-dropdown.component.ts @@ -61,6 +61,11 @@ export class NewItemDropdownComponent implements OnInit { { initialValue: false }, ); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + constructor( private dialogService: DialogService, private restrictedItemTypeService: RestrictedItemTypesService, diff --git a/apps/browser/src/vault/popup/components/vault/view/view.component.ts b/apps/browser/src/vault/popup/components/vault/view/view.component.ts index c1c1a7bd7374..1d47e7a8df5d 100644 --- a/apps/browser/src/vault/popup/components/vault/view/view.component.ts +++ b/apps/browser/src/vault/popup/components/vault/view/view.component.ts @@ -1,7 +1,7 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { CommonModule } from "@angular/common"; -import { Component } from "@angular/core"; +import { Component, inject } from "@angular/core"; import { takeUntilDestroyed, toSignal } from "@angular/core/rxjs-interop"; import { FormsModule } from "@angular/forms"; import { ActivatedRoute, Router } from "@angular/router"; @@ -23,6 +23,8 @@ import { } from "@bitwarden/common/autofill/constants"; import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service"; import { EventCollectionService, EventType } from "@bitwarden/common/dirt/event-logs"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { UserId } from "@bitwarden/common/types/guid"; @@ -111,6 +113,12 @@ type LoadAction = ], }) export class ViewComponent { + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + private activeUserId: UserId; headerText: string; @@ -216,10 +224,18 @@ export class ViewComponent { setHeader(type: CipherType) { const translation = { - [CipherType.Login]: "viewItemHeaderLogin", - [CipherType.Card]: "viewItemHeaderCard", - [CipherType.Identity]: "viewItemHeaderIdentity", - [CipherType.SecureNote]: "viewItemHeaderNote", + [CipherType.Login]: this.btnTextAddCreateFeatureFlag() + ? "viewItemHeaderLoginSentenceCase" + : "viewItemHeaderLogin", + [CipherType.Card]: this.btnTextAddCreateFeatureFlag() + ? "viewItemHeaderCardSentenceCase" + : "viewItemHeaderCard", + [CipherType.Identity]: this.btnTextAddCreateFeatureFlag() + ? "viewItemHeaderIdentitySentenceCase" + : "viewItemHeaderIdentity", + [CipherType.SecureNote]: this.btnTextAddCreateFeatureFlag() + ? "viewItemHeaderNoteSentenceCase" + : "viewItemHeaderNote", [CipherType.SshKey]: "viewItemHeaderSshKey", [CipherType.BankAccount]: "viewItemHeaderBankAccount", [CipherType.DriversLicense]: "viewItemHeaderLicense", diff --git a/apps/desktop/src/locales/en/messages.json b/apps/desktop/src/locales/en/messages.json index 1c6db0197033..38a8200092ab 100644 --- a/apps/desktop/src/locales/en/messages.json +++ b/apps/desktop/src/locales/en/messages.json @@ -174,6 +174,42 @@ "message": "View passport", "description": "Header for view passport item type" }, + "addItemHeaderLogin": { + "message": "Add login", + "description": "Header for new login item type" + }, + "addItemHeaderCard": { + "message": "Add card", + "description": "Header for new card item type" + }, + "addItemHeaderIdentity": { + "message": "Add identity", + "description": "Header for new identity item type" + }, + "addItemHeaderNote": { + "message": "Add note", + "description": "Header for new note item type" + }, + "addItemHeaderSecureNote": { + "message": "Add secure note", + "description": "Header for new secure note item type" + }, + "addItemHeaderSshKey": { + "message": "Add SSH key", + "description": "Header for new SSH key item type" + }, + "addItemHeaderBankAccount": { + "message": "Add bank account", + "description": "Header for new bank account item type" + }, + "addItemHeaderDriversLicense": { + "message": "Add license", + "description": "Header for new license item type" + }, + "addItemHeaderPassport": { + "message": "Add passport", + "description": "Header for new passport item type" + }, "newItemHeaderLogin": { "message": "New Login", "description": "Header for new login item type" @@ -230,6 +266,22 @@ "message": "Edit secure note", "description": "Header for edit secure note item type" }, + "editItemHeaderLoginSentenceCase": { + "message": "Edit login", + "description": "Header for edit login item type" + }, + "editItemHeaderCardSentenceCase": { + "message": "Edit card", + "description": "Header for edit card item type" + }, + "editItemHeaderIdentitySentenceCase": { + "message": "Edit identity", + "description": "Header for edit identity item type" + }, + "editItemHeaderNoteSentenceCase": { + "message": "Edit note", + "description": "Header for edit note item type" + }, "editItemHeaderSshKey": { "message": "Edit SSH key", "description": "Header for edit SSH key item type" @@ -322,6 +374,29 @@ "message": "Are you sure you want to permanently delete this Send?", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, + "viewItemHeaderLoginSentenceCase": { + "message": "View login", + "description": "Header for view login item type" + }, + "viewItemHeaderCardSentenceCase": { + "message": "View card", + "description": "Header for view card item type" + }, + "viewItemHeaderIdentitySentenceCase": { + "message": "View identity", + "description": "Header for view identity item type" + }, + "viewItemHeaderNoteSentenceCase": { + "message": "View note", + "description": "Header for view note item type" + }, + "create": { + "message": "Create", + "description": "for adding new items" + }, + "addCollection": { + "message": "Add collection" + }, "new": { "message": "New", "description": "for adding new items" @@ -2779,6 +2854,10 @@ "message": "New Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, + "createSendV2": { + "message": "Create Send", + "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." + }, "sendTextDesc": { "message": "The text you want to send." }, diff --git a/apps/web/src/app/admin-console/organizations/collections/vault-v2.component.html b/apps/web/src/app/admin-console/organizations/collections/vault-v2.component.html index 1ec1810e0b45..9f523e6d6d7d 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault-v2.component.html +++ b/apps/web/src/app/admin-console/organizations/collections/vault-v2.component.html @@ -122,11 +122,11 @@ slot="button" bitButton (click)="addCipher()" - buttonType="primary" + [buttonType]="btnTextAddCreateFeatureFlag() ? 'secondary' : 'primary'" type="button" - startIcon="bwi-plus" + [startIcon]="btnTextAddCreateFeatureFlag() ? null : 'bwi-plus'" > - {{ "newItem" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "addItem" : "newItem") | i18n }} } diff --git a/apps/web/src/app/admin-console/organizations/collections/vault-v2.component.ts b/apps/web/src/app/admin-console/organizations/collections/vault-v2.component.ts index 39c628291bf0..682a7404c255 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault-v2.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/vault-v2.component.ts @@ -221,6 +221,11 @@ export class VaultV2Component implements OnInit, OnDestroy { protected readonly vaultItemsComponent = viewChild>("vaultItems"); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + constructor() { this.organizationId$ = this.filter$.pipe( map((f) => f.organizationId), diff --git a/apps/web/src/app/admin-console/organizations/collections/vault.component.html b/apps/web/src/app/admin-console/organizations/collections/vault.component.html index e03424a30a00..3253492c89d5 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault.component.html +++ b/apps/web/src/app/admin-console/organizations/collections/vault.component.html @@ -122,11 +122,11 @@ slot="button" bitButton (click)="addCipher()" - buttonType="primary" + [buttonType]="btnTextAddCreateFeatureFlag() ? 'secondary' : 'primary'" type="button" - startIcon="bwi-plus" + [startIcon]="btnTextAddCreateFeatureFlag() ? null : 'bwi-plus'" > - {{ "newItem" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "addItem" : "newItem") | i18n }} } diff --git a/apps/web/src/app/admin-console/organizations/collections/vault.component.ts b/apps/web/src/app/admin-console/organizations/collections/vault.component.ts index 03e0b8ccd872..e3766d71d856 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/vault.component.ts @@ -253,6 +253,11 @@ export class VaultComponent implements OnInit, OnDestroy { private readonly vaultBatchBarService = inject(VaultBatchBarService); private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + protected readonly vaultBatchBarFeatureFlag = toSignal( this.configService.getFeatureFlag$(FeatureFlag.PM37785_VaultBatchBar), { initialValue: false }, diff --git a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts index eb8f4cc0e76e..780870db4462 100644 --- a/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/group-add-edit.component.ts @@ -1,6 +1,7 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { FormBuilder, Validators } from "@angular/forms"; import { catchError, @@ -29,6 +30,7 @@ import { CollectionAdminView } from "@bitwarden/common/admin-console/models/coll import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @@ -115,6 +117,11 @@ export const openGroupAddEditDialog = ( standalone: false, }) export class GroupAddEditComponent implements OnInit, OnDestroy { + private readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + private organization$ = this.accountService.activeAccount$.pipe( switchMap((account) => this.organizationService @@ -261,7 +268,9 @@ export class GroupAddEditComponent implements OnInit, OnDestroy { ngOnInit() { this.loading = true; - this.title = this.i18nService.t(this.editMode ? "editGroup" : "newGroup"); + this.title = this.i18nService.t( + this.editMode ? "editGroup" : this.btnTextAddCreateFeatureFlag() ? "addGroup" : "newGroup", + ); combineLatest([ this.orgCollections$, diff --git a/apps/web/src/app/admin-console/organizations/manage/groups.component.html b/apps/web/src/app/admin-console/organizations/manage/groups.component.html index 44a614173555..4f83735ad010 100644 --- a/apps/web/src/app/admin-console/organizations/manage/groups.component.html +++ b/apps/web/src/app/admin-console/organizations/manage/groups.component.html @@ -5,7 +5,7 @@ class="tw-w-80" > diff --git a/apps/web/src/app/admin-console/organizations/manage/groups.component.ts b/apps/web/src/app/admin-console/organizations/manage/groups.component.ts index 7a103becfad1..20bed2668756 100644 --- a/apps/web/src/app/admin-console/organizations/manage/groups.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/groups.component.ts @@ -1,7 +1,7 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore -import { Component } from "@angular/core"; -import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; +import { Component, inject } from "@angular/core"; +import { takeUntilDestroyed, toSignal } from "@angular/core/rxjs-interop"; import { FormControl } from "@angular/forms"; import { ActivatedRoute } from "@angular/router"; import { @@ -28,7 +28,9 @@ import { } from "@bitwarden/common/admin-console/models/collections"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { ListResponse } from "@bitwarden/common/models/response/list.response"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { DialogService, TableDataSource, ToastService } from "@bitwarden/components"; @@ -97,6 +99,12 @@ export class GroupsComponent { protected ModalTabType = GroupAddEditTabType; private refreshGroups$ = new BehaviorSubject(null); + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + constructor( private apiService: ApiService, private groupService: GroupService, diff --git a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.html b/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.html index 717c2857e8f2..91d8a6061abe 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.html +++ b/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.html @@ -7,7 +7,7 @@ }} - {{ "newCollection" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "addCollection" : "newCollection") | i18n }}
diff --git a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts b/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts index ffe893a66da8..6f90f4bb145a 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts @@ -1,6 +1,7 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { AbstractControl, FormBuilder, Validators } from "@angular/forms"; import { combineLatest, @@ -36,6 +37,7 @@ import { import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { getById } from "@bitwarden/common/platform/misc"; @@ -149,6 +151,9 @@ export class CollectionDialogComponent implements OnInit, OnDestroy { protected showAddAccessWarning = false; protected buttonDisplayName: ButtonType = ButtonType.Save; protected initialPermission: CollectionPermission; + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + ); private orgExceedingCollectionLimit!: Organization; constructor( diff --git a/apps/web/src/app/settings/domain-rules.component.html b/apps/web/src/app/settings/domain-rules.component.html index 71405e3d277e..da2ecb81df27 100644 --- a/apps/web/src/app/settings/domain-rules.component.html +++ b/apps/web/src/app/settings/domain-rules.component.html @@ -41,9 +41,9 @@

{{ "customEqDomains" | i18n }}

(click)="add()" buttonType="secondary" class="tw-mb-2" - startIcon="bwi-plus" + [startIcon]="btnTextAddCreateFeatureFlag() ? null : 'bwi-plus'" > - {{ "newCustomDomain" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "addCustomDomain" : "newCustomDomain") | i18n }} {{ "newCustomDomainDesc" | i18n }} diff --git a/apps/web/src/app/settings/domain-rules.component.ts b/apps/web/src/app/settings/domain-rules.component.ts index 0e9d2f422d91..c843db8d109a 100644 --- a/apps/web/src/app/settings/domain-rules.component.ts +++ b/apps/web/src/app/settings/domain-rules.component.ts @@ -1,10 +1,13 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore -import { Component, OnInit } from "@angular/core"; +import { Component, inject, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { FormArray, FormBuilder, FormControl, FormGroup } from "@angular/forms"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { UpdateDomainsRequest } from "@bitwarden/common/models/request/update-domains.request"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @@ -20,6 +23,10 @@ import { SharedModule } from "../shared"; imports: [SharedModule, HeaderModule], }) export class DomainRulesComponent implements OnInit { + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + ); loading = true; custom: string[] = []; global: any[] = []; diff --git a/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.html b/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.html index 2e681cae12d4..2ff371fac2a1 100644 --- a/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.html +++ b/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.html @@ -1,8 +1,20 @@ - } diff --git a/apps/web/src/app/vault/individual-vault/vault.component.ts b/apps/web/src/app/vault/individual-vault/vault.component.ts index 5a6ca11f4e99..d93168257689 100644 --- a/apps/web/src/app/vault/individual-vault/vault.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault.component.ts @@ -219,6 +219,11 @@ export class VaultComponent implements OnInit, OnDestr { initialValue: false }, ); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + organizations$ = this.accountService.activeAccount$ .pipe(map((a) => a?.id)) .pipe(switchMap((id) => (id ? this.organizationService.organizations$(id) : of([])))); diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 1487e3503256..ac49ce495216 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -1190,6 +1190,42 @@ "viewItem": { "message": "View item" }, + "addItemHeaderLogin": { + "message": "Add login", + "description": "Header for new login item type" + }, + "addItemHeaderCard": { + "message": "Add card", + "description": "Header for new card item type" + }, + "addItemHeaderIdentity": { + "message": "Add identity", + "description": "Header for new identity item type" + }, + "addItemHeaderNote": { + "message": "Add note", + "description": "Header for new note item type" + }, + "addItemHeaderSecureNote": { + "message": "Add secure note", + "description": "Header for new secure note item type" + }, + "addItemHeaderSshKey": { + "message": "Add SSH key", + "description": "Header for new SSH key item type" + }, + "addItemHeaderBankAccount": { + "message": "Add bank account", + "description": "Header for new bank account item type" + }, + "addItemHeaderDriversLicense": { + "message": "Add license", + "description": "Header for new license item type" + }, + "addItemHeaderPassport": { + "message": "Add passport", + "description": "Header for new passport item type" + }, "newItemHeaderLogin": { "message": "New Login", "description": "Header for new login item type" @@ -1254,6 +1290,22 @@ "message": "Edit secure note", "description": "Header for edit secure note item type" }, + "editItemHeaderLoginSentenceCase": { + "message": "Edit login", + "description": "Header for edit login item type" + }, + "editItemHeaderCardSentenceCase": { + "message": "Edit card", + "description": "Header for edit card item type" + }, + "editItemHeaderIdentitySentenceCase": { + "message": "Edit identity", + "description": "Header for edit identity item type" + }, + "editItemHeaderNoteSentenceCase": { + "message": "Edit note", + "description": "Header for edit note item type" + }, "editItemHeaderSshKey": { "message": "Edit SSH key", "description": "Header for edit SSH key item type" @@ -1314,6 +1366,26 @@ "message": "View passport", "description": "Header for view passport item type" }, + "viewItemHeaderLoginSentenceCase": { + "message": "View login", + "description": "Header for view login item type" + }, + "viewItemHeaderCardSentenceCase": { + "message": "View card", + "description": "Header for view card item type" + }, + "viewItemHeaderIdentitySentenceCase": { + "message": "View identity", + "description": "Header for view identity item type" + }, + "viewItemHeaderNoteSentenceCase": { + "message": "View note", + "description": "Header for view note item type" + }, + "create":{ + "message": "Create", + "description": "for adding new items" + }, "new": { "message": "New", "description": "for adding new items" @@ -2904,6 +2976,9 @@ "newCustomDomain": { "message": "New custom domain" }, + "addCustomDomain": { + "message": "Add custom domain" + }, "newCustomDomainDesc": { "message": "Enter a list of domains separated by commas. Only \"base\" domains are allowed. Do not enter subdomains. For example, enter \"google.com\" instead of \"www.google.com\". You can also enter \"androidapp://package.name\" to associate an android app with other website domains." }, @@ -6622,6 +6697,10 @@ "message": "New Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." }, + "createSendV2": { + "message": "Create Send", + "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." + }, "editSend": { "message": "Edit Send", "description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated." @@ -9877,6 +9956,9 @@ "newDomain": { "message": "New domain" }, + "addDomain": { + "message": "Add domain" + }, "noDomains": { "message": "No domains" }, @@ -11561,6 +11643,10 @@ "message": "New machine account", "description": "Title for creating a new machine account." }, + "addMachineAccount": { + "message": "Add machine account", + "description": "Title for creating a new machine account." + }, "machineAccountsNoItemsMessage": { "message": "Create a new machine account to get started automating secret access.", "description": "Message to encourage the user to start creating machine accounts." diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.html b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.html index 3a2c4c3ceb0c..13afb1ed37d8 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.html +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.html @@ -6,7 +6,9 @@ [dialogSize]="'default'" > - {{ "newDomain" | i18n }} + {{ + (btnTextAddCreateFeatureFlag() ? "addDomain" : "newDomain") | i18n + }} {{ "claimDomain" | i18n }} diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts index 58c230fa6f55..b93afdf33625 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts @@ -1,6 +1,7 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { Component, Inject, OnDestroy, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from "@angular/forms"; import { Subject, takeUntil } from "rxjs"; @@ -9,7 +10,9 @@ import { OrgDomainServiceAbstraction } from "@bitwarden/common/admin-console/abs import { OrganizationDomainResponse } from "@bitwarden/common/admin-console/abstractions/organization-domain/responses/organization-domain.response"; import { OrganizationDomainRequest } from "@bitwarden/common/admin-console/services/organization-domain/requests/organization-domain.request"; import { HttpStatusCode } from "@bitwarden/common/enums"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; import { DialogRef, DIALOG_DATA, DialogService, ToastService } from "@bitwarden/components"; @@ -29,6 +32,11 @@ export interface DomainAddEditDialogData { standalone: false, }) export class DomainAddEditDialogComponent implements OnInit, OnDestroy { + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + private componentDestroyed$: Subject = new Subject(); domainForm: FormGroup; @@ -54,6 +62,7 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy { private validationService: ValidationService, private dialogService: DialogService, private toastService: ToastService, + private configService: ConfigService, ) {} // Angular Method Implementations diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.html b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.html index 27bfd6b13982..81ce6fb7a2aa 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.html +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.html @@ -7,7 +7,7 @@ (click)="addDomain()" startIcon="bwi-plus" > - {{ "newDomain" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "addDomain" : "newDomain") | i18n }} @@ -121,9 +121,9 @@ buttonType="secondary" bitButton (click)="addDomain()" - startIcon="bwi-plus" + [startIcon]="btnTextAddCreateFeatureFlag() ? null : 'bwi-plus'" > - {{ "newDomain" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "addDomain" : "newDomain") | i18n }}
diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts index bfe382f930ec..152ed8f42794 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts @@ -1,6 +1,7 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { Component, OnDestroy, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { ActivatedRoute, Params } from "@angular/router"; import { concatMap, @@ -22,6 +23,7 @@ import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; import { HttpStatusCode } from "@bitwarden/common/enums"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @@ -41,6 +43,11 @@ import { standalone: false, }) export class DomainVerificationComponent implements OnInit, OnDestroy { + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + private componentDestroyed$ = new Subject(); private singleOrgPolicyEnabled = false; protected domainIcon = DomainIcon; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-dialog.component.ts index c7bbece97469..5cd9af73e7d8 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/projects/dialog/project-dialog.component.ts @@ -1,9 +1,12 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore -import { Component, Inject, OnInit } from "@angular/core"; +import { Component, inject, Inject, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { FormControl, FormGroup, Validators } from "@angular/forms"; import { Router } from "@angular/router"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { DialogRef, DIALOG_DATA, BitValidators, ToastService } from "@bitwarden/components"; @@ -40,6 +43,12 @@ export class ProjectDialogComponent implements OnInit { }); protected loading = false; + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + constructor( public dialogRef: DialogRef, @Inject(DIALOG_DATA) private data: ProjectOperation, @@ -72,7 +81,11 @@ export class ProjectDialogComponent implements OnInit { } get title() { - return this.data.operation === OperationType.Add ? "newProject" : "editProject"; + return this.data.operation === OperationType.Add + ? this.btnTextAddCreateFeatureFlag() + ? "addProject" + : "newProject" + : "editProject"; } submit = async () => { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts index 77965f519f8f..a3a11b143b59 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/secrets/dialog/secret-dialog.component.ts @@ -1,6 +1,7 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore -import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from "@angular/core"; +import { ChangeDetectorRef, Component, inject, Inject, OnDestroy, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { FormControl, FormGroup, Validators } from "@angular/forms"; import { firstValueFrom, lastValueFrom, Subject, takeUntil } from "rxjs"; @@ -10,6 +11,8 @@ import { } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; @@ -105,6 +108,12 @@ export class SecretDialogComponent implements OnInit, OnDestroy { private destroy$ = new Subject(); private currentPeopleAccessPolicies: ApItemViewType[]; + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + constructor( public dialogRef: DialogRef, @Inject(DIALOG_DATA) private data: SecretOperation, @@ -122,7 +131,11 @@ export class SecretDialogComponent implements OnInit, OnDestroy { ) {} get title() { - return this.data.operation === OperationType.Add ? "newSecret" : "editSecret"; + return this.data.operation === OperationType.Add + ? this.btnTextAddCreateFeatureFlag() + ? "addSecret" + : "newSecret" + : "editSecret"; } get subtitle(): string | undefined { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts index f04dacd164d8..0d89541bfd24 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/dialog/service-account-dialog.component.ts @@ -1,9 +1,12 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { Component, Inject, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { FormControl, FormGroup, Validators } from "@angular/forms"; import { Router } from "@angular/router"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { DialogRef, DIALOG_DATA, BitValidators, ToastService } from "@bitwarden/components"; @@ -31,6 +34,10 @@ export interface ServiceAccountOperation { standalone: false, }) export class ServiceAccountDialogComponent implements OnInit { + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); protected formGroup = new FormGroup( { name: new FormControl("", { @@ -49,6 +56,7 @@ export class ServiceAccountDialogComponent implements OnInit { private serviceAccountService: ServiceAccountService, private i18nService: I18nService, private toastService: ToastService, + private configService: ConfigService, private router: Router, ) {} @@ -125,6 +133,10 @@ export class ServiceAccountDialogComponent implements OnInit { } get title() { - return this.data.operation === OperationType.Add ? "newMachineAccount" : "editMachineAccount"; + return this.data.operation === OperationType.Add + ? this.btnTextAddCreateFeatureFlag() + ? "addMachineAccount" + : "newMachineAccount" + : "editMachineAccount"; } } diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html index a982fb18faf0..943f2ceda013 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.html @@ -11,9 +11,9 @@ bitButton buttonType="secondary" (click)="newServiceAccountEvent.emit()" - startIcon="bwi-plus" + [startIcon]="btnTextAddCreateFeatureFlag() ? null : 'bwi-plus'" > - {{ "newMachineAccount" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "addMachineAccount" : "newMachineAccount") | i18n }} diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts index d97b66bf1854..d18642e2e98d 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/service-accounts-list.component.ts @@ -1,7 +1,8 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { SelectionModel } from "@angular/cdk/collections"; -import { Component, EventEmitter, Input, OnDestroy, Output, OnInit } from "@angular/core"; +import { Component, EventEmitter, Input, OnDestroy, Output, OnInit, inject } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { ActivatedRoute } from "@angular/router"; import { catchError, concatMap, map, Observable, of, Subject, switchMap, takeUntil } from "rxjs"; @@ -11,6 +12,8 @@ import { } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { DialogRef, DialogService, TableDataSource, ToastService } from "@bitwarden/components"; import { LogService } from "@bitwarden/logging"; @@ -29,6 +32,12 @@ import { standalone: false, }) export class ServiceAccountsListComponent implements OnDestroy, OnInit { + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + protected dataSource = new TableDataSource(); // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html index 4d12247080e3..74e684e33b39 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.html @@ -5,7 +5,7 @@ [bitMenuTriggerFor]="newMenu" startIcon="bwi-plus" > - {{ "new" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "add" : "new") | i18n }} diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.ts index 6c3d4228c063..72a02ead9bb9 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/new-menu.component.ts @@ -1,6 +1,7 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore -import { Component, OnDestroy, OnInit } from "@angular/core"; +import { Component, inject, OnDestroy, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { ActivatedRoute } from "@angular/router"; import { Subject, takeUntil, concatMap, firstValueFrom } from "rxjs"; @@ -10,6 +11,8 @@ import { } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { DialogService } from "@bitwarden/components"; import { @@ -34,6 +37,12 @@ import { standalone: false, }) export class NewMenuComponent implements OnInit, OnDestroy { + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + private organizationId: string; private organizationEnabled: boolean; private destroy$: Subject = new Subject(); diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.html index 366fa0b86038..aa967c569b39 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.html @@ -11,9 +11,9 @@ bitButton buttonType="secondary" (click)="newProjectEvent.emit()" - startIcon="bwi-plus" + [startIcon]="btnTextAddCreateFeatureFlag() ? null : 'bwi-plus'" > - {{ "newProject" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "addProject" : "newProject") | i18n }} diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts index ae31f0ec64ad..b244cd0c0c81 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/projects-list.component.ts @@ -1,7 +1,8 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { SelectionModel } from "@angular/cdk/collections"; -import { Component, EventEmitter, Input, Output, OnInit } from "@angular/core"; +import { Component, EventEmitter, Input, Output, OnInit, inject } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { ActivatedRoute } from "@angular/router"; import { catchError, concatMap, map, Observable, of, Subject, switchMap, takeUntil } from "rxjs"; @@ -11,6 +12,8 @@ import { } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { DialogRef, DialogService, TableDataSource, ToastService } from "@bitwarden/components"; @@ -44,6 +47,12 @@ export class ProjectsListComponent implements OnInit { protected isAdmin$: Observable; private destroy$: Subject = new Subject(); + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals // eslint-disable-next-line @angular-eslint/prefer-signals @Input() showMenus?: boolean = true; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html index 5d0ea620eeaa..0bb8fc6d825b 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html @@ -16,9 +16,9 @@ bitButton buttonType="secondary" (click)="newSecretEvent.emit()" - startIcon="bwi-plus" + [startIcon]="btnTextAddCreateFeatureFlag() ? null : 'bwi-plus'" > - {{ "newSecret" | i18n }} + {{ (btnTextAddCreateFeatureFlag() ? "addSecret" : "newSecret") | i18n }} diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts index 03a0d49134f3..40c494ce4ed2 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.ts @@ -1,7 +1,8 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { SelectionModel } from "@angular/cdk/collections"; -import { Component, EventEmitter, Input, OnDestroy, Output, OnInit } from "@angular/core"; +import { Component, EventEmitter, Input, OnDestroy, Output, OnInit, inject } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { ActivatedRoute } from "@angular/router"; import { catchError, concatMap, map, Observable, of, Subject, switchMap, takeUntil } from "rxjs"; @@ -11,6 +12,8 @@ import { } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; @@ -29,6 +32,12 @@ import { SecretService } from "../secrets/secret.service"; standalone: false, }) export class SecretsListComponent implements OnDestroy, OnInit { + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + protected dataSource = new TableDataSource(); // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index 82f8f856143b..f4812d35d465 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -102,6 +102,7 @@ export enum FeatureFlag { PM32016RemoveAtRiskCallout = "pm-32016-remove-at-risk-callout", PM37785_VaultBatchBar = "pm-37785-vault-batch-bar", PM37785_DesktopVaultBatchBar = "pm-37785-desktop-vault-batch-bar", + PM32380_BtnTextAddCreate = "pm-32380-btn-text-add-create", /* Platform */ FedRampGovRegion = "fedramp-gov-region", @@ -184,6 +185,7 @@ export const DefaultFeatureFlagValue = { [FeatureFlag.PM32016RemoveAtRiskCallout]: FALSE, [FeatureFlag.PM37785_VaultBatchBar]: FALSE, [FeatureFlag.PM37785_DesktopVaultBatchBar]: FALSE, + [FeatureFlag.PM32380_BtnTextAddCreate]: FALSE, /* Auth */ [FeatureFlag.SafariAccountSwitching]: FALSE, diff --git a/libs/tools/send/send-ui/src/new-send-dropdown-v2/new-send-dropdown-v2.component.html b/libs/tools/send/send-ui/src/new-send-dropdown-v2/new-send-dropdown-v2.component.html index 18592a5f6d6f..7802d1c59b02 100644 --- a/libs/tools/send/send-ui/src/new-send-dropdown-v2/new-send-dropdown-v2.component.html +++ b/libs/tools/send/send-ui/src/new-send-dropdown-v2/new-send-dropdown-v2.component.html @@ -5,7 +5,16 @@ type="button" [startIcon]="!hideIcon() ? 'bwi-plus' : undefined" > - {{ (hideIcon() ? "createSend" : "new") | i18n }} + {{ + (hideIcon() + ? btnTextAddCreateFeatureFlag() + ? "createSendV2" + : "createSend" + : btnTextAddCreateFeatureFlag() + ? "create" + : "new" + ) | i18n + }} diff --git a/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts b/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts index b5cbeced209c..b076fee7b691 100644 --- a/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts +++ b/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts @@ -1,5 +1,6 @@ import { CommonModule } from "@angular/common"; -import { Component, Input, OnInit } from "@angular/core"; +import { Component, inject, Input, OnInit } from "@angular/core"; +import { toSignal } from "@angular/core/rxjs-interop"; import { Router, RouterLink } from "@angular/router"; import { firstValueFrom } from "rxjs"; @@ -7,6 +8,8 @@ import { PremiumBadgeComponent } from "@bitwarden/angular/billing/components/pre import { JslibModule } from "@bitwarden/angular/jslib.module"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { SendType } from "@bitwarden/common/tools/send/types/send-type"; import { PremiumUpgradePromptService } from "@bitwarden/common/vault/abstractions/premium-upgrade-prompt.service"; import { ButtonModule, ButtonType, MenuModule } from "@bitwarden/components"; @@ -30,6 +33,13 @@ export class NewSendDropdownComponent implements OnInit { hasNoPremium = false; + private readonly configService = inject(ConfigService); + + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + constructor( private billingAccountProfileStateService: BillingAccountProfileStateService, private accountService: AccountService, diff --git a/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.html b/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.html index 618e0a48f65f..850129e59ea4 100644 --- a/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.html +++ b/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.html @@ -1,6 +1,13 @@
- {{ (variant === "add" ? "newFolder" : "editFolder") | i18n }} + {{ + (variant === "add" + ? btnTextAddCreateFeatureFlag() + ? "addFolder" + : "newFolder" + : "editFolder" + ) | i18n + }}
diff --git a/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.spec.ts b/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.spec.ts index a783bdc74068..096c0b2f691f 100644 --- a/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.spec.ts +++ b/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.spec.ts @@ -1,8 +1,9 @@ import { ComponentFixture, TestBed } from "@angular/core/testing"; import { NoopAnimationsModule } from "@angular/platform-browser/animations"; -import { BehaviorSubject } from "rxjs"; +import { BehaviorSubject, of } from "rxjs"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { mockAccountInfoWith } from "@bitwarden/common/spec"; @@ -70,6 +71,7 @@ describe("AddEditFolderDialogComponent", () => { { provide: ToastService, useValue: { showToast } }, { provide: DIALOG_DATA, useValue: dialogData }, { provide: DialogRef, useValue: dialogRef }, + { provide: ConfigService, useValue: { getFeatureFlag$: () => of(false) } }, ], }) .overrideProvider(DialogService, { useValue: { openSimpleDialog } }) diff --git a/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.ts b/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.ts index edce594559f0..a6bf79d61742 100644 --- a/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.ts +++ b/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.ts @@ -8,12 +8,14 @@ import { OnInit, ViewChild, } from "@angular/core"; -import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; +import { takeUntilDestroyed, toSignal } from "@angular/core/rxjs-interop"; import { FormBuilder, ReactiveFormsModule, Validators } from "@angular/forms"; import { firstValueFrom, map } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; @@ -64,6 +66,11 @@ export type AddEditFolderDialogData = { ], }) export class AddEditFolderDialogComponent implements AfterViewInit, OnInit { + private readonly configService = inject(ConfigService); + protected readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals // eslint-disable-next-line @angular-eslint/prefer-signals @ViewChild(BitSubmitDirective) private bitSubmit?: BitSubmitDirective; diff --git a/libs/vault/src/components/new-cipher-menu/new-cipher-menu.component.ts b/libs/vault/src/components/new-cipher-menu/new-cipher-menu.component.ts index a00e85f77a65..2b1ce51d5fe6 100644 --- a/libs/vault/src/components/new-cipher-menu/new-cipher-menu.component.ts +++ b/libs/vault/src/components/new-cipher-menu/new-cipher-menu.component.ts @@ -43,6 +43,11 @@ export class NewCipherMenuComponent { cipherAdded = output(); onAddItemDialog = output(); + private readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + protected readonly useNewItemDialog = toSignal( this.configService.getFeatureFlag$(FeatureFlag.PM32009NewItemTypes), { initialValue: false }, @@ -85,13 +90,22 @@ export class NewCipherMenuComponent { const canCreateCipher = this.canCreateCipher(); const canCreateFolder = this.canCreateFolder(); const canCreateCollection = this.canCreateCollection(); + const btnTextAddCreateFeatureFlag = this.btnTextAddCreateFeatureFlag(); // If only collections can be created, be specific if (!canCreateCipher && !canCreateFolder && canCreateCollection) { - return "newCollection"; + if (btnTextAddCreateFeatureFlag) { + return "addCollection"; + } else { + return "newCollection"; + } } - return "new"; + if (btnTextAddCreateFeatureFlag) { + return "add"; + } else { + return "new"; + } } /** diff --git a/libs/vault/src/vault-item-dialog/vault-item-dialog.component.ts b/libs/vault/src/vault-item-dialog/vault-item-dialog.component.ts index 1da690d307c4..97e8b1ff1fe9 100644 --- a/libs/vault/src/vault-item-dialog/vault-item-dialog.component.ts +++ b/libs/vault/src/vault-item-dialog/vault-item-dialog.component.ts @@ -314,6 +314,11 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy { protected confirmedPremiumUpgrade = false; + private readonly btnTextAddCreateFeatureFlag = toSignal( + this.configService.getFeatureFlag$(FeatureFlag.PM32380_BtnTextAddCreate), + { initialValue: false }, + ); + constructor( @Inject(DIALOG_DATA) protected params: VaultItemDialogParams, private dialogRef: DialogRef, @@ -669,36 +674,70 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy { private updateTitle(): void { const translation: { [key: string]: { [key: number]: string } } = { view: { - [CipherType.Login]: "viewItemHeaderLogin", - [CipherType.Card]: "viewItemHeaderCard", - [CipherType.Identity]: "viewItemHeaderIdentity", + [CipherType.Login]: this.btnTextAddCreateFeatureFlag() + ? "viewItemHeaderLoginSentenceCase" + : "viewItemHeaderLogin", + [CipherType.Card]: this.btnTextAddCreateFeatureFlag() + ? "viewItemHeaderCardSentenceCase" + : "viewItemHeaderCard", + [CipherType.Identity]: this.btnTextAddCreateFeatureFlag() + ? "viewItemHeaderIdentitySentenceCase" + : "viewItemHeaderIdentity", [CipherType.SecureNote]: this.pm32009NewItemTypes() ? "viewItemHeaderSecureNote" - : "viewItemHeaderNote", + : this.btnTextAddCreateFeatureFlag() + ? "viewItemHeaderNoteSentenceCase" + : "viewItemHeaderNote", [CipherType.SshKey]: "viewItemHeaderSshKey", [CipherType.BankAccount]: "viewItemHeaderBankAccount", [CipherType.DriversLicense]: "viewItemHeaderLicense", [CipherType.Passport]: "viewItemHeaderPassport", }, new: { - [CipherType.Login]: "newItemHeaderLogin", - [CipherType.Card]: "newItemHeaderCard", - [CipherType.Identity]: "newItemHeaderIdentity", + [CipherType.Login]: this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderLogin" + : "newItemHeaderLogin", + [CipherType.Card]: this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderCard" + : "newItemHeaderCard", + [CipherType.Identity]: this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderIdentity" + : "newItemHeaderIdentity", [CipherType.SecureNote]: this.pm32009NewItemTypes() - ? "newItemHeaderSecureNote" - : "newItemHeaderNote", - [CipherType.SshKey]: "newItemHeaderSshKey", - [CipherType.BankAccount]: "newItemHeaderBankAccount", - [CipherType.DriversLicense]: "newItemHeaderDriversLicense", - [CipherType.Passport]: "newItemHeaderPassport", + ? this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderSecureNote" + : "newItemHeaderSecureNote" + : this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderNote" + : "newItemHeaderNote", + [CipherType.SshKey]: this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderSshKey" + : "newItemHeaderSshKey", + [CipherType.BankAccount]: this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderBankAccount" + : "newItemHeaderBankAccount", + [CipherType.DriversLicense]: this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderDriversLicense" + : "newItemHeaderDriversLicense", + [CipherType.Passport]: this.btnTextAddCreateFeatureFlag() + ? "addItemHeaderPassport" + : "newItemHeaderPassport", }, edit: { - [CipherType.Login]: "editItemHeaderLogin", - [CipherType.Card]: "editItemHeaderCard", - [CipherType.Identity]: "editItemHeaderIdentity", + [CipherType.Login]: this.btnTextAddCreateFeatureFlag() + ? "editItemHeaderLoginSentenceCase" + : "editItemHeaderLogin", + [CipherType.Card]: this.btnTextAddCreateFeatureFlag() + ? "editItemHeaderCardSentenceCase" + : "editItemHeaderCard", + [CipherType.Identity]: this.btnTextAddCreateFeatureFlag() + ? "editItemHeaderIdentitySentenceCase" + : "editItemHeaderIdentity", [CipherType.SecureNote]: this.pm32009NewItemTypes() ? "editItemHeaderSecureNote" - : "editItemHeaderNote", + : this.btnTextAddCreateFeatureFlag() + ? "editItemHeaderNoteSentenceCase" + : "editItemHeaderNote", [CipherType.SshKey]: "editItemHeaderSshKey", [CipherType.BankAccount]: "editItemHeaderBankAccount", [CipherType.DriversLicense]: "editItemHeaderLicense",