From e23bc6b77be8944618b4dd666946c49d38719dd5 Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Fri, 2 May 2025 16:50:50 +0100 Subject: [PATCH 001/166] [PM-21073] No error when submitting empty form (#14597) * Resolve the space in note and colon issue * Resolve the max length for Note * Revert the changes --- .../billing/members/add-sponsorship-dialog.component.html | 5 ++--- .../app/billing/members/add-sponsorship-dialog.component.ts | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/web/src/app/billing/members/add-sponsorship-dialog.component.html b/apps/web/src/app/billing/members/add-sponsorship-dialog.component.html index 405211d6ecb..5bcfe9a15e1 100644 --- a/apps/web/src/app/billing/members/add-sponsorship-dialog.component.html +++ b/apps/web/src/app/billing/members/add-sponsorship-dialog.component.html @@ -7,7 +7,7 @@
- {{ "email" | i18n }}: + {{ "email" | i18n }}
- {{ "notes" | i18n }}: + {{ "notes" | i18n }}
diff --git a/apps/web/src/app/billing/members/add-sponsorship-dialog.component.ts b/apps/web/src/app/billing/members/add-sponsorship-dialog.component.ts index 1b044e66257..7e6c0d464c3 100644 --- a/apps/web/src/app/billing/members/add-sponsorship-dialog.component.ts +++ b/apps/web/src/app/billing/members/add-sponsorship-dialog.component.ts @@ -74,7 +74,9 @@ export class AddSponsorshipDialogComponent { asyncValidators: [this.isOrganizationMember.bind(this)], updateOn: "change", }), - sponsorshipNote: new FormControl("", {}), + sponsorshipNote: new FormControl("", { + validators: [Validators.maxLength(1000)], + }), }); } @@ -86,6 +88,8 @@ export class AddSponsorshipDialogComponent { } protected async save() { + this.sponsorshipEmailControl.markAllAsTouched(); + if (this.sponsorshipForm.invalid) { return; } From 93d4fe6d471dd2b4df607440d2a403647245c9fb Mon Sep 17 00:00:00 2001 From: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com> Date: Fri, 2 May 2025 12:18:19 -0400 Subject: [PATCH 002/166] Pass correct parameter to endpoint (#14607) --- .../app/billing/members/free-bitwarden-families.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/app/billing/members/free-bitwarden-families.component.ts b/apps/web/src/app/billing/members/free-bitwarden-families.component.ts index c141eaebd78..3fde4ded405 100644 --- a/apps/web/src/app/billing/members/free-bitwarden-families.component.ts +++ b/apps/web/src/app/billing/members/free-bitwarden-families.component.ts @@ -176,7 +176,7 @@ export class FreeBitwardenFamiliesComponent implements OnInit { return; } - await this.apiService.deleteRevokeSponsorship(sponsorship.sponsoringOrganizationUserId); + await this.apiService.deleteRevokeSponsorship(this.organizationId); this.toastService.showToast({ variant: "success", From fdfb0196d09989ee86067fe7c27c8595d90dd3bc Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Fri, 2 May 2025 18:51:01 +0200 Subject: [PATCH 003/166] [PM-20108] Update account recovery trust prompt, delete organization trust prompt (#14218) * Update trust prompt and move to shared km module * Delete organization trust component * Update org trust warning message --- apps/browser/src/_locales/en/messages.json | 24 +++++++ apps/desktop/src/locales/en/messages.json | 24 +++++++ .../manage/organization-trust.component.html | 23 ------- .../manage/organization-trust.component.ts | 69 ------------------- .../enroll-master-password-reset.component.ts | 4 +- .../src/app/shared/loose-components.module.ts | 3 - apps/web/src/locales/en/messages.json | 6 ++ .../account-recovery-trust.component.html | 4 +- 8 files changed, 59 insertions(+), 98 deletions(-) delete mode 100644 apps/web/src/app/admin-console/organizations/manage/organization-trust.component.html delete mode 100644 apps/web/src/app/admin-console/organizations/manage/organization-trust.component.ts diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index 6e1e2ef57ac..2b6adfdd7e8 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -3564,6 +3564,30 @@ "deviceTrusted": { "message": "Device trusted" }, + "trustOrganization": { + "message": "Trust organization" + }, + "trust": { + "message": "Trust" + }, + "doNotTrust": { + "message": "Do not trust" + }, + "organizationNotTrusted": { + "message": "Organization is not trusted" + }, + "emergencyAccessTrustWarning": { + "message": "For the security of your account, only confirm if you have granted emergency access to this user and their fingerprint matches what is displayed in their account" + }, + "orgTrustWarning": { + "message": "For the security of your account, only proceed if you are a member of this organization, have account recovery enabled, and the fingerprint displayed below matches the organization's fingerprint." + }, + "orgTrustWarning1": { + "message": "This organization has an Enterprise policy that will enroll you in account recovery. Enrollment will allow organization administrators to change your password. Only proceed if you recognize this organization and the fingerprint phrase displayed below matches the organization's fingerprint." + }, + "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." diff --git a/apps/desktop/src/locales/en/messages.json b/apps/desktop/src/locales/en/messages.json index 2350e0df4c7..7dee2c111d9 100644 --- a/apps/desktop/src/locales/en/messages.json +++ b/apps/desktop/src/locales/en/messages.json @@ -3152,6 +3152,30 @@ "deviceTrusted": { "message": "Device trusted" }, + "trustOrganization": { + "message": "Trust organization" + }, + "trust": { + "message": "Trust" + }, + "doNotTrust": { + "message": "Do not trust" + }, + "organizationNotTrusted": { + "message": "Organization is not trusted" + }, + "emergencyAccessTrustWarning": { + "message": "For the security of your account, only confirm if you have granted emergency access to this user and their fingerprint matches what is displayed in their account" + }, + "orgTrustWarning": { + "message": "For the security of your account, only proceed if you are a member of this organization, have account recovery enabled, and the fingerprint displayed below matches the organization's fingerprint." + }, + "orgTrustWarning1": { + "message": "This organization has an Enterprise policy that will enroll you in account recovery. Enrollment will allow organization administrators to change your password. Only proceed if you recognize this organization and the fingerprint phrase displayed below matches the organization's fingerprint." + }, + "trustUser":{ + "message": "Trust user" + }, "inputRequired": { "message": "Input is required." }, diff --git a/apps/web/src/app/admin-console/organizations/manage/organization-trust.component.html b/apps/web/src/app/admin-console/organizations/manage/organization-trust.component.html deleted file mode 100644 index 9a0310fde2a..00000000000 --- a/apps/web/src/app/admin-console/organizations/manage/organization-trust.component.html +++ /dev/null @@ -1,23 +0,0 @@ -
- - - {{ "orgTrustWarning" | i18n }} -

- {{ "fingerprintPhrase" | i18n }} {{ fingerprint }} -

-
- - - - -
-
diff --git a/apps/web/src/app/admin-console/organizations/manage/organization-trust.component.ts b/apps/web/src/app/admin-console/organizations/manage/organization-trust.component.ts deleted file mode 100644 index 3f013c9fc74..00000000000 --- a/apps/web/src/app/admin-console/organizations/manage/organization-trust.component.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog"; -import { Component, OnInit, Inject } from "@angular/core"; -import { FormBuilder } from "@angular/forms"; - -import { OrganizationManagementPreferencesService } from "@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service"; -import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; -import { DialogService } from "@bitwarden/components"; -import { KeyService } from "@bitwarden/key-management"; - -type OrganizationTrustDialogData = { - /** display name of the organization */ - name: string; - /** identifies the organization */ - orgId: string; - /** org public key */ - publicKey: Uint8Array; -}; -@Component({ - selector: "organization-trust", - templateUrl: "organization-trust.component.html", -}) -export class OrganizationTrustComponent implements OnInit { - loading = true; - fingerprint: string = ""; - confirmForm = this.formBuilder.group({}); - - constructor( - @Inject(DIALOG_DATA) protected params: OrganizationTrustDialogData, - private formBuilder: FormBuilder, - private keyService: KeyService, - protected organizationManagementPreferencesService: OrganizationManagementPreferencesService, - private logService: LogService, - private dialogRef: DialogRef, - ) {} - - async ngOnInit() { - try { - const fingerprint = await this.keyService.getFingerprint( - this.params.orgId, - this.params.publicKey, - ); - if (fingerprint != null) { - this.fingerprint = fingerprint.join("-"); - } - } catch (e) { - this.logService.error(e); - } - this.loading = false; - } - - submit = async () => { - if (this.loading) { - return; - } - - this.dialogRef.close(true); - }; - - /** - * Strongly typed helper to open a OrganizationTrustComponent - * @param dialogService Instance of the dialog service that will be used to open the dialog - * @param data The data to pass to the dialog - */ - static open(dialogService: DialogService, data: OrganizationTrustDialogData) { - return dialogService.open(OrganizationTrustComponent, { - data, - }); - } -} diff --git a/apps/web/src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts b/apps/web/src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts index 15e7af1cd2d..b63171ae6e6 100644 --- a/apps/web/src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts +++ b/apps/web/src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts @@ -18,8 +18,8 @@ import { Utils } from "@bitwarden/common/platform/misc/utils"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; import { DialogService, ToastService } from "@bitwarden/components"; import { KeyService } from "@bitwarden/key-management"; +import { AccountRecoveryTrustComponent } from "@bitwarden/key-management-ui"; -import { OrganizationTrustComponent } from "../manage/organization-trust.component"; import { OrganizationUserResetPasswordService } from "../members/services/organization-user-reset-password/organization-user-reset-password.service"; interface EnrollMasterPasswordResetData { @@ -62,7 +62,7 @@ export class EnrollMasterPasswordReset { await userVerificationService.buildRequest( secret, ); - const dialogRef = OrganizationTrustComponent.open(dialogService, { + const dialogRef = AccountRecoveryTrustComponent.open(dialogService, { name: data.organization.name, orgId: data.organization.id, publicKey, diff --git a/apps/web/src/app/shared/loose-components.module.ts b/apps/web/src/app/shared/loose-components.module.ts index 90e4c6ba9c3..e43c73cc3fb 100644 --- a/apps/web/src/app/shared/loose-components.module.ts +++ b/apps/web/src/app/shared/loose-components.module.ts @@ -9,7 +9,6 @@ import { LayoutComponent, NavigationModule } from "@bitwarden/components"; import { OrganizationLayoutComponent } from "../admin-console/organizations/layouts/organization-layout.component"; import { EventsComponent as OrgEventsComponent } from "../admin-console/organizations/manage/events.component"; -import { OrganizationTrustComponent } from "../admin-console/organizations/manage/organization-trust.component"; import { UserConfirmComponent as OrgUserConfirmComponent } from "../admin-console/organizations/manage/user-confirm.component"; import { VerifyRecoverDeleteOrgComponent } from "../admin-console/organizations/manage/verify-recover-delete-org.component"; import { AcceptFamilySponsorshipComponent } from "../admin-console/organizations/sponsorships/accept-family-sponsorship.component"; @@ -111,7 +110,6 @@ import { SharedModule } from "./shared.module"; OrgReusedPasswordsReportComponent, OrgUnsecuredWebsitesReportComponent, OrgUserConfirmComponent, - OrganizationTrustComponent, OrgWeakPasswordsReportComponent, PreferencesComponent, PremiumBadgeComponent, @@ -157,7 +155,6 @@ import { SharedModule } from "./shared.module"; OrgReusedPasswordsReportComponent, OrgUnsecuredWebsitesReportComponent, OrgUserConfirmComponent, - OrganizationTrustComponent, OrgWeakPasswordsReportComponent, PreferencesComponent, PremiumBadgeComponent, diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 8a37db4afda..a1d8d794f03 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -10397,12 +10397,18 @@ "doNotTrust": { "message": "Do not trust" }, + "organizationNotTrusted": { + "message": "Organization is not trusted" + }, "emergencyAccessTrustWarning": { "message": "For the security of your account, only confirm if you have granted emergency access to this user and their fingerprint matches what is displayed in their account" }, "orgTrustWarning": { "message": "For the security of your account, only proceed if you are a member of this organization, have account recovery enabled, and the fingerprint displayed below matches the organization's fingerprint." }, + "orgTrustWarning1": { + "message": "This organization has an Enterprise policy that will enroll you in account recovery. Enrollment will allow organization administrators to change your password. Only proceed if you recognize this organization and the fingerprint phrase displayed below matches the organization's fingerprint." + }, "trustUser":{ "message": "Trust user" }, diff --git a/libs/key-management-ui/src/trust/account-recovery-trust.component.html b/libs/key-management-ui/src/trust/account-recovery-trust.component.html index 5829558dd69..6d4c5b34dc2 100644 --- a/libs/key-management-ui/src/trust/account-recovery-trust.component.html +++ b/libs/key-management-ui/src/trust/account-recovery-trust.component.html @@ -5,8 +5,10 @@ [subtitle]="params.name" > - {{ "orgTrustWarning" | i18n }}

+ {{ "orgTrustWarning1" | i18n }} +
+
{{ "fingerprintPhrase" | i18n }} {{ fingerprint }}

From 237002b6332165f40664e767c6886b993fd2a2eb Mon Sep 17 00:00:00 2001 From: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com> Date: Fri, 2 May 2025 14:21:08 -0700 Subject: [PATCH 004/166] [PM-20988][PM-20986][PM-20983][PM-20971][PM-21019] - Multiple defect fixes for desktop cipher form update (#14559) * multiple bug fixes * favor getters to local state * fix tests --- apps/desktop/src/locales/en/messages.json | 15 ++++++++++++++ .../app/vault/item-footer.component.html | 2 +- .../src/vault/app/vault/vault-v2.component.ts | 10 +++++++--- .../view-identity-sections.component.html | 6 +++--- .../view-identity-sections.component.spec.ts | 7 ------- .../view-identity-sections.component.ts | 20 +++++-------------- 6 files changed, 31 insertions(+), 29 deletions(-) diff --git a/apps/desktop/src/locales/en/messages.json b/apps/desktop/src/locales/en/messages.json index 7dee2c111d9..e685c053529 100644 --- a/apps/desktop/src/locales/en/messages.json +++ b/apps/desktop/src/locales/en/messages.json @@ -2007,6 +2007,21 @@ "message": "Premium", "description": "Premium membership" }, + "freeOrgsCannotUseAttachments": { + "message": "Free organizations cannot use attachments" + }, + "singleFieldNeedsAttention": { + "message": "1 field needs your attention." + }, + "multipleFieldsNeedAttention": { + "message": "$COUNT$ fields need your attention.", + "placeholders": { + "count": { + "content": "$1", + "example": "2" + } + } + }, "cardExpiredTitle": { "message": "Expired card" }, diff --git a/apps/desktop/src/vault/app/vault/item-footer.component.html b/apps/desktop/src/vault/app/vault/item-footer.component.html index 6915555c08b..824a2d481cf 100644 --- a/apps/desktop/src/vault/app/vault/item-footer.component.html +++ b/apps/desktop/src/vault/app/vault/item-footer.component.html @@ -44,7 +44,7 @@
+
+ + + {{ + "sshAgentPromptBehaviorDesc" | i18n + }} +
@@ -88,30 +73,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the inline menu with
@@ -139,30 +109,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the inline menu with
@@ -190,30 +145,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the inline menu with @@ -248,13 +188,19 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f aria-hidden="true" fill="none" height="24" - viewBox="0 0 23 24" - width="23" + viewBox="0 0 24 24" + width="24" xmlns="http://www.w3.org/2000/svg" > + @@ -283,29 +229,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -323,30 +263,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -404,29 +329,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -473,29 +392,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -528,29 +441,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -575,15 +482,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -613,29 +520,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -683,29 +584,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -753,29 +648,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -876,29 +765,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -958,29 +841,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1027,29 +904,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1082,29 +953,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1129,15 +994,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1167,29 +1032,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1237,29 +1096,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1307,29 +1160,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1389,29 +1236,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1458,29 +1299,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1513,29 +1348,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1560,15 +1389,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1598,29 +1427,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1668,29 +1491,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1738,29 +1555,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1814,19 +1625,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1842,29 +1649,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1903,19 +1704,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1931,29 +1728,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -1992,19 +1783,15 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -2026,29 +1813,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -2099,29 +1880,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -2169,29 +1944,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -2239,29 +2008,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -2287,10 +2050,10 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f > @@ -2407,29 +2170,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -2525,29 +2282,23 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the list of ciphers f @@ -2578,29 +2329,21 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the locked inline men unlockAccount @@ -2623,17 +2366,22 @@ exports[`AutofillInlineMenuList initAutofillInlineMenuList the password generato diff --git a/apps/browser/src/autofill/popup/fido2/fido2.component.html b/apps/browser/src/autofill/popup/fido2/fido2.component.html index 80ea6726cb9..8d8394641e9 100644 --- a/apps/browser/src/autofill/popup/fido2/fido2.component.html +++ b/apps/browser/src/autofill/popup/fido2/fido2.component.html @@ -14,7 +14,7 @@ (click)="addCipher()" slot="end" > - + {{ "new" | i18n }} diff --git a/apps/browser/src/autofill/utils/svg-icons.ts b/apps/browser/src/autofill/utils/svg-icons.ts index b04d18608ec..343acc00b06 100644 --- a/apps/browser/src/autofill/utils/svg-icons.ts +++ b/apps/browser/src/autofill/utils/svg-icons.ts @@ -5,34 +5,34 @@ export const logoLockedIcon = ''; export const globeIcon = - ''; + ''; export const creditCardIcon = - ''; + ''; export const idCardIcon = - ''; + ''; export const lockIcon = - ''; + ''; export const plusIcon = - ''; + ''; export const viewCipherIcon = - ''; + ''; export const passkeyIcon = - ''; + ''; export const circleCheckIcon = - ''; + ''; export const spinnerIcon = - ''; + ''; export const keyIcon = - ''; + ''; export const refreshIcon = - ''; + ''; diff --git a/apps/browser/src/platform/popup/layout/popup-header.component.html b/apps/browser/src/platform/popup/layout/popup-header.component.html index ac52a630900..c58bc258bf6 100644 --- a/apps/browser/src/platform/popup/layout/popup-header.component.html +++ b/apps/browser/src/platform/popup/layout/popup-header.component.html @@ -11,7 +11,7 @@
`, @@ -405,26 +406,26 @@ const navButtons = (showBerry = false) => [ { label: "vault", page: "/tabs/vault", - iconKey: "lock", - iconKeyActive: "lock-f", + icon: Icons.VaultInactive, + iconActive: Icons.VaultActive, }, { label: "generator", page: "/tabs/generator", - iconKey: "generate", - iconKeyActive: "generate-f", + icon: Icons.GeneratorInactive, + iconActive: Icons.GeneratorActive, }, { label: "send", page: "/tabs/send", - iconKey: "send", - iconKeyActive: "send-f", + icon: Icons.SendInactive, + iconActive: Icons.SendActive, }, { label: "settings", page: "/tabs/settings", - iconKey: "cog", - iconKeyActive: "cog-f", + icon: Icons.SettingsInactive, + iconActive: Icons.SettingsActive, showBerry: showBerry, }, ]; diff --git a/apps/browser/src/platform/popup/layout/popup-tab-navigation.component.html b/apps/browser/src/platform/popup/layout/popup-tab-navigation.component.html index 27b546738c3..1170725a4b7 100644 --- a/apps/browser/src/platform/popup/layout/popup-tab-navigation.component.html +++ b/apps/browser/src/platform/popup/layout/popup-tab-navigation.component.html @@ -7,7 +7,7 @@
  • diff --git a/apps/browser/src/platform/popup/layout/popup-tab-navigation.component.ts b/apps/browser/src/platform/popup/layout/popup-tab-navigation.component.ts index f4b82dc56fc..4984d3749a1 100644 --- a/apps/browser/src/platform/popup/layout/popup-tab-navigation.component.ts +++ b/apps/browser/src/platform/popup/layout/popup-tab-navigation.component.ts @@ -4,13 +4,13 @@ import { RouterModule } from "@angular/router"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { LinkModule } from "@bitwarden/components"; +import { Icon, IconModule, LinkModule } from "@bitwarden/components"; export type NavButton = { label: string; page: string; - iconKey: string; - iconKeyActive: string; + icon: Icon; + iconActive: Icon; showBerry?: boolean; }; @@ -18,7 +18,7 @@ export type NavButton = { selector: "popup-tab-navigation", templateUrl: "popup-tab-navigation.component.html", standalone: true, - imports: [CommonModule, LinkModule, RouterModule, JslibModule], + imports: [CommonModule, LinkModule, RouterModule, JslibModule, IconModule], host: { class: "tw-block tw-h-full tw-w-full tw-flex tw-flex-col", }, diff --git a/apps/browser/src/popup/tabs-v2.component.ts b/apps/browser/src/popup/tabs-v2.component.ts index f5b56cf829f..63b539fddce 100644 --- a/apps/browser/src/popup/tabs-v2.component.ts +++ b/apps/browser/src/popup/tabs-v2.component.ts @@ -1,70 +1,60 @@ -import { Component, OnInit } from "@angular/core"; -import { combineLatest, firstValueFrom, map, Observable } from "rxjs"; +import { Component } from "@angular/core"; +import { combineLatest, map, Observable, switchMap } from "rxjs"; 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 { UserId } from "@bitwarden/common/types/guid"; +import { Icons } from "@bitwarden/components"; import { VaultNudgesService } from "@bitwarden/vault"; +import { NavButton } from "../platform/popup/layout/popup-tab-navigation.component"; + @Component({ selector: "app-tabs-v2", templateUrl: "./tabs-v2.component.html", }) -export class TabsV2Component implements OnInit { - private activeUserId: UserId | null = null; - protected navButtons$: Observable< - { - label: string; - page: string; - iconKey: string; - iconKeyActive: string; - showBerry?: boolean; - }[] - > = new Observable(); +export class TabsV2Component { + private hasActiveBadges$ = this.accountService.activeAccount$ + .pipe(getUserId) + .pipe(switchMap((userId) => this.vaultNudgesService.hasActiveBadges$(userId))); + protected navButtons$: Observable = combineLatest([ + this.configService.getFeatureFlag$(FeatureFlag.PM8851_BrowserOnboardingNudge), + this.hasActiveBadges$, + ]).pipe( + map(([onboardingFeatureEnabled, hasBadges]) => { + return [ + { + label: "vault", + page: "/tabs/vault", + icon: Icons.VaultInactive, + iconActive: Icons.VaultActive, + }, + { + label: "generator", + page: "/tabs/generator", + icon: Icons.GeneratorInactive, + iconActive: Icons.GeneratorActive, + }, + { + label: "send", + page: "/tabs/send", + icon: Icons.SendInactive, + iconActive: Icons.SendActive, + }, + { + label: "settings", + page: "/tabs/settings", + icon: Icons.SettingsInactive, + iconActive: Icons.SettingsActive, + showBerry: onboardingFeatureEnabled && hasBadges, + }, + ]; + }), + ); constructor( private vaultNudgesService: VaultNudgesService, private accountService: AccountService, private readonly configService: ConfigService, ) {} - - async ngOnInit() { - this.activeUserId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId)); - - this.navButtons$ = combineLatest([ - this.configService.getFeatureFlag$(FeatureFlag.PM8851_BrowserOnboardingNudge), - this.vaultNudgesService.hasActiveBadges$(this.activeUserId), - ]).pipe( - map(([onboardingFeatureEnabled, hasBadges]) => { - return [ - { - label: "vault", - page: "/tabs/vault", - iconKey: "lock", - iconKeyActive: "lock-f", - }, - { - label: "generator", - page: "/tabs/generator", - iconKey: "generate", - iconKeyActive: "generate-f", - }, - { - label: "send", - page: "/tabs/send", - iconKey: "send", - iconKeyActive: "send-f", - }, - { - label: "settings", - page: "/tabs/settings", - iconKey: "cog", - iconKeyActive: "cog-f", - showBerry: onboardingFeatureEnabled && hasBadges, - }, - ]; - }), - ); - } } diff --git a/apps/browser/src/tools/popup/settings/settings-v2.component.html b/apps/browser/src/tools/popup/settings/settings-v2.component.html index 6189221942c..ab61e5b10f8 100644 --- a/apps/browser/src/tools/popup/settings/settings-v2.component.html +++ b/apps/browser/src/tools/popup/settings/settings-v2.component.html @@ -54,7 +54,7 @@ - + {{ "appearance" | i18n }} diff --git a/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.html b/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.html index af627e22ef2..6b6e8728f19 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.html +++ b/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.html @@ -1,5 +1,5 @@ diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-list-filters/vault-list-filters.component.html b/apps/browser/src/vault/popup/components/vault-v2/vault-list-filters/vault-list-filters.component.html index c61562f9f90..ba4cbf71251 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-list-filters/vault-list-filters.component.html +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-list-filters/vault-list-filters.component.html @@ -20,7 +20,7 @@ *ngIf="collections.length" fullWidth formControlName="collection" - placeholderIcon="bwi-collection" + placeholderIcon="bwi-collection-shared" [placeholderText]="'collection' | i18n" [options]="collections" > diff --git a/apps/browser/src/vault/popup/services/vault-popup-list-filters.service.spec.ts b/apps/browser/src/vault/popup/services/vault-popup-list-filters.service.spec.ts index f9785bccd00..9498d953808 100644 --- a/apps/browser/src/vault/popup/services/vault-popup-list-filters.service.spec.ts +++ b/apps/browser/src/vault/popup/services/vault-popup-list-filters.service.spec.ts @@ -362,7 +362,7 @@ describe("VaultPopupListFiltersService", () => { it("sets collection icon", (done) => { service.collections$.subscribe((collections) => { - expect(collections.every(({ icon }) => icon === "bwi-collection")).toBeTruthy(); + expect(collections.every(({ icon }) => icon === "bwi-collection-shared")).toBeTruthy(); done(); }); }); diff --git a/apps/browser/src/vault/popup/services/vault-popup-list-filters.service.ts b/apps/browser/src/vault/popup/services/vault-popup-list-filters.service.ts index f11fa0f63f0..c726678c973 100644 --- a/apps/browser/src/vault/popup/services/vault-popup-list-filters.service.ts +++ b/apps/browser/src/vault/popup/services/vault-popup-list-filters.service.ts @@ -461,7 +461,7 @@ export class VaultPopupListFiltersService { }); }), map((collections) => - collections.nestedList.map((c) => this.convertToChipSelectOption(c, "bwi-collection")), + collections.nestedList.map((c) => this.convertToChipSelectOption(c, "bwi-collection-shared")), ), shareReplay({ refCount: true, bufferSize: 1 }), ); diff --git a/apps/browser/src/vault/popup/settings/folders-v2.component.html b/apps/browser/src/vault/popup/settings/folders-v2.component.html index 552547c0230..8cea05f9c17 100644 --- a/apps/browser/src/vault/popup/settings/folders-v2.component.html +++ b/apps/browser/src/vault/popup/settings/folders-v2.component.html @@ -8,7 +8,7 @@ type="button" (click)="openAddEditFolderDialog()" > - + {{ "new" | i18n }} @@ -47,7 +47,7 @@ (click)="openAddEditFolderDialog()" data-testid="empty-new-folder-button" > - + {{ "newFolder" | i18n }} diff --git a/apps/desktop/src/app/layout/nav.component.ts b/apps/desktop/src/app/layout/nav.component.ts index dff35ec12c3..dbc399c051d 100644 --- a/apps/desktop/src/app/layout/nav.component.ts +++ b/apps/desktop/src/app/layout/nav.component.ts @@ -14,12 +14,12 @@ export class NavComponent { items: any[] = [ { link: "/vault", - icon: "bwi-lock-f", + icon: "bwi-vault", label: this.i18nService.translate("myVault"), }, { link: "/send", - icon: "bwi-send-f", + icon: "bwi-send", label: "Send", }, ]; diff --git a/apps/desktop/src/vault/app/vault/add-edit-custom-fields.component.html b/apps/desktop/src/vault/app/vault/add-edit-custom-fields.component.html index c7efaad70ba..bc0c3876b71 100644 --- a/apps/desktop/src/vault/app/vault/add-edit-custom-fields.component.html +++ b/apps/desktop/src/vault/app/vault/add-edit-custom-fields.component.html @@ -110,7 +110,7 @@ *ngIf="!(!cipher.edit && editMode)" cdkDragHandle > - +
diff --git a/apps/desktop/src/vault/app/vault/add-edit.component.html b/apps/desktop/src/vault/app/vault/add-edit.component.html index 7904d7b7f34..8457e72bdc1 100644 --- a/apps/desktop/src/vault/app/vault/add-edit.component.html +++ b/apps/desktop/src/vault/app/vault/add-edit.component.html @@ -519,7 +519,7 @@ appA11yTitle="{{ 'importSshKeyFromClipboard' | i18n }}" (click)="importSshKeyFromClipboard()" > - + diff --git a/apps/desktop/src/vault/app/vault/vault-filter/filters/collection-filter.component.html b/apps/desktop/src/vault/app/vault/vault-filter/filters/collection-filter.component.html index 667cdf6798c..e123f4400c7 100644 --- a/apps/desktop/src/vault/app/vault/vault-filter/filters/collection-filter.component.html +++ b/apps/desktop/src/vault/app/vault/vault-filter/filters/collection-filter.component.html @@ -55,7 +55,7 @@ >  {{ c.node.name }} diff --git a/apps/desktop/src/vault/app/vault/vault-items.component.html b/apps/desktop/src/vault/app/vault/vault-items.component.html index b64bdaa1c80..8a869cd2a32 100644 --- a/apps/desktop/src/vault/app/vault/vault-items.component.html +++ b/apps/desktop/src/vault/app/vault/vault-items.component.html @@ -28,7 +28,7 @@ {{ c.name }} diff --git a/apps/web/src/app/admin-console/organizations/collections/vault-filter/vault-filter.component.ts b/apps/web/src/app/admin-console/organizations/collections/vault-filter/vault-filter.component.ts index 384390d738e..13e90d5275c 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault-filter/vault-filter.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/vault-filter/vault-filter.component.ts @@ -105,14 +105,14 @@ export class VaultFilterComponent id: "AllCollections", name: "collections", type: "all", - icon: "bwi-collection", + icon: "bwi-collection-shared", }, [ { id: "AllCollections", name: "Collections", type: "all", - icon: "bwi-collection", + icon: "bwi-collection-shared", }, ], ), diff --git a/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.html b/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.html index c2e80b7524f..3ef48ff9015 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.html +++ b/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.html @@ -14,7 +14,7 @@ - + {{ "new" | i18n }} @@ -140,7 +140,7 @@ diff --git a/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.ts b/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.ts index 7efb79ebdb6..4c129e325c5 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.ts @@ -117,7 +117,7 @@ export class VaultHeaderComponent { } get icon() { - return this.filter.collectionId !== undefined ? "bwi-collection" : ""; + return this.filter.collectionId !== undefined ? "bwi-collection-shared" : ""; } protected get showBreadcrumbs() { diff --git a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html index ad3879b3659..4e7c2403893 100644 --- a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html +++ b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html @@ -13,7 +13,7 @@ >