From 99b028fbcdf7b19c55d44e862dc6a373fb2fde57 Mon Sep 17 00:00:00 2001 From: Nick Krantz <125900171+nick-livefront@users.noreply.github.com> Date: Mon, 28 Apr 2025 11:23:47 -0500 Subject: [PATCH 1/3] [PM-17514] Remove old add-edit components (#13984) * remove old add-edit-custom-fields component - Also removes the individual vault add-edit-component where the custom fields component was used - All of these components were unused * remove unused translations for web --- .../src/app/shared/loose-components.module.ts | 5 - .../add-edit-custom-fields.component.html | 177 ------------------ .../add-edit-custom-fields.component.ts | 20 -- apps/web/src/locales/en/messages.json | 9 - 4 files changed, 211 deletions(-) delete mode 100644 apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.html delete mode 100644 apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.ts diff --git a/apps/web/src/app/shared/loose-components.module.ts b/apps/web/src/app/shared/loose-components.module.ts index eb63b9f798c..bec06888c57 100644 --- a/apps/web/src/app/shared/loose-components.module.ts +++ b/apps/web/src/app/shared/loose-components.module.ts @@ -56,7 +56,6 @@ import { UnsecuredWebsitesReportComponent as OrgUnsecuredWebsitesReportComponent import { WeakPasswordsReportComponent as OrgWeakPasswordsReportComponent } from "../tools/reports/pages/organizations/weak-passwords-report.component"; /* eslint no-restricted-imports: "error" */ import { PremiumBadgeComponent } from "../vault/components/premium-badge.component"; -import { AddEditCustomFieldsComponent } from "../vault/individual-vault/add-edit-custom-fields.component"; import { FolderAddEditComponent } from "../vault/individual-vault/folder-add-edit.component"; import { OrganizationBadgeModule } from "../vault/individual-vault/organization-badge/organization-badge.module"; import { PipesModule } from "../vault/individual-vault/pipes/pipes.module"; @@ -96,8 +95,6 @@ import { SharedModule } from "./shared.module"; declarations: [ AcceptFamilySponsorshipComponent, AccountComponent, - AddEditCustomFieldsComponent, - AddEditCustomFieldsComponent, ApiKeyComponent, ChangeEmailComponent, DeauthorizeSessionsComponent, @@ -144,8 +141,6 @@ import { SharedModule } from "./shared.module"; UserVerificationModule, PremiumBadgeComponent, AccountComponent, - AddEditCustomFieldsComponent, - AddEditCustomFieldsComponent, ApiKeyComponent, ChangeEmailComponent, DeauthorizeSessionsComponent, diff --git a/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.html b/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.html deleted file mode 100644 index 759cc1b3b0f..00000000000 --- a/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.html +++ /dev/null @@ -1,177 +0,0 @@ - -

{{ "customFields" | i18n }}

-
-
-
-
- - - - -
- -
-
- -
- -
- -
- -
-
- -
- -
- - -
-
- -
- -
-
- - -
- - -
-
-
-
- - - {{ "newCustomField" | i18n }} - -
-
- - -
-
-
diff --git a/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.ts b/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.ts deleted file mode 100644 index b492de85caa..00000000000 --- a/apps/web/src/app/vault/individual-vault/add-edit-custom-fields.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -// FIXME: Update this file to be type safe and remove this and next line -// @ts-strict-ignore -import { Component, Input } from "@angular/core"; - -import { AddEditCustomFieldsComponent as BaseAddEditCustomFieldsComponent } from "@bitwarden/angular/vault/components/add-edit-custom-fields.component"; -import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service"; -import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; - -@Component({ - selector: "app-vault-add-edit-custom-fields", - templateUrl: "add-edit-custom-fields.component.html", -}) -export class AddEditCustomFieldsComponent extends BaseAddEditCustomFieldsComponent { - @Input() viewOnly: boolean; - @Input() copy: (value: string, typeI18nKey: string, aType: string) => void; - - constructor(i18nService: I18nService, eventCollectionService: EventCollectionService) { - super(i18nService, eventCollectionService); - } -} diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 05d29071731..bc87ec05fbd 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -422,18 +422,9 @@ "folder": { "message": "Folder" }, - "newCustomField": { - "message": "New custom field" - }, "value": { "message": "Value" }, - "dragToSort": { - "message": "Drag to sort" - }, - "dragToReorder": { - "message": "Drag to reorder" - }, "cfTypeText": { "message": "Text" }, From 17bc3e6501ef0def424c7d746c288f7ab5d0d276 Mon Sep 17 00:00:00 2001 From: Daniel Riera Date: Mon, 28 Apr 2025 14:00:31 -0400 Subject: [PATCH 2/3] PM-20546 pass folder to openAddEditVaultItemPopout (#14524) --- .../src/autofill/background/notification.background.ts | 3 ++- apps/browser/src/autofill/notification/bar.ts | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/browser/src/autofill/background/notification.background.ts b/apps/browser/src/autofill/background/notification.background.ts index 4e2a99d4a7a..339b033809d 100644 --- a/apps/browser/src/autofill/background/notification.background.ts +++ b/apps/browser/src/autofill/background/notification.background.ts @@ -801,7 +801,7 @@ export default class NotificationBackground { message: NotificationBackgroundExtensionMessage, senderTab: chrome.tabs.Tab, ) { - const { cipherId, organizationId } = message; + const { cipherId, organizationId, folder } = message; const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(getOptionalUserId)); if (cipherId) { await this.openAddEditVaultItemPopout(senderTab, { cipherId }); @@ -813,6 +813,7 @@ export default class NotificationBackground { if (queueItem?.type === NotificationQueueMessageType.AddLogin) { const cipherView = this.convertAddLoginQueueMessageToCipherView(queueItem); cipherView.organizationId = organizationId; + cipherView.folderId = folder; if (userId) { await this.cipherService.setAddEditCipherInfo({ cipher: cipherView }, userId); diff --git a/apps/browser/src/autofill/notification/bar.ts b/apps/browser/src/autofill/notification/bar.ts index 14d9bcd6d0f..d9a5c937f9c 100644 --- a/apps/browser/src/autofill/notification/bar.ts +++ b/apps/browser/src/autofill/notification/bar.ts @@ -263,16 +263,16 @@ function handleCloseNotification(e: Event) { function handleSaveAction(e: Event) { const selectedVault = selectedVaultSignal.get(); + const selectedFolder = selectedFolderSignal.get(); + if (selectedVault.length > 1) { - openAddEditVaultItemPopout(e, { organizationId: selectedVault }); + openAddEditVaultItemPopout(e, { organizationId: selectedVault, folder: selectedFolder }); handleCloseNotification(e); return; } e.preventDefault(); - const selectedFolder = selectedFolderSignal.get(); - sendSaveCipherMessage(removeIndividualVault(), selectedFolder); if (removeIndividualVault()) { return; @@ -370,7 +370,7 @@ function handleSaveCipherAttemptCompletedMessage(message: NotificationBarWindowM function openAddEditVaultItemPopout( e: Event, - options: { cipherId?: string; organizationId?: string }, + options: { cipherId?: string; organizationId?: string; folder?: string }, ) { e.preventDefault(); sendPlatformMessage({ From ff846d2fab12ae6c6425fafef4e7a5fc473a55af Mon Sep 17 00:00:00 2001 From: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com> Date: Mon, 28 Apr 2025 14:38:48 -0400 Subject: [PATCH 3/3] [PM-20300] Fix self-serve resubscribe bugs (#14296) * Address bugs * Cy's feedback * Cy's feedback --- .../billing/organizations/change-plan-dialog.component.html | 2 +- .../billing/organizations/change-plan-dialog.component.ts | 2 +- .../organization-subscription-cloud.component.ts | 6 +++++- apps/web/src/locales/en/messages.json | 3 +++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/billing/organizations/change-plan-dialog.component.html b/apps/web/src/app/billing/organizations/change-plan-dialog.component.html index 64a694cdef0..464890809f5 100644 --- a/apps/web/src/app/billing/organizations/change-plan-dialog.component.html +++ b/apps/web/src/app/billing/organizations/change-plan-dialog.component.html @@ -983,7 +983,7 @@