From e3c75b3c1b4ec36c13b5fe2387ab1941eb6e56fb Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:07:29 +0100 Subject: [PATCH 1/8] Resolve the payment display (#11219) --- .../organizations/change-plan-dialog.component.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/web/src/app/billing/organizations/change-plan-dialog.component.ts b/apps/web/src/app/billing/organizations/change-plan-dialog.component.ts index 63ac3afb930..42a987664f0 100644 --- a/apps/web/src/app/billing/organizations/change-plan-dialog.component.ts +++ b/apps/web/src/app/billing/organizations/change-plan-dialog.component.ts @@ -403,11 +403,13 @@ export class ChangePlanDialogComponent implements OnInit, OnDestroy { } get upgradeRequiresPaymentMethod() { - return ( - this.organization?.productTierType === ProductTierType.Free && - !this.showFree && - !this.billing?.paymentSource - ); + const isFreeTier = this.organization?.productTierType === ProductTierType.Free; + const shouldHideFree = !this.showFree; + const hasNoPaymentSource = this.deprecateStripeSourcesAPI + ? !this.paymentSource + : !this.billing?.paymentSource; + + return isFreeTier && shouldHideFree && hasNoPaymentSource; } get selectedSecretsManagerPlan() { From 3646214a0f8ea069fd01a982a0fdd86035c38646 Mon Sep 17 00:00:00 2001 From: SmithThe4th Date: Tue, 24 Sep 2024 14:13:27 -0400 Subject: [PATCH 2/8] Made allCiphers$ depend on the refresh subject$ (#11225) --- apps/web/src/app/vault/org-vault/vault.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index 0a8e8769715..f378e171e78 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -318,8 +318,8 @@ export class VaultComponent implements OnInit, OnDestroy { shareReplay({ refCount: true, bufferSize: 1 }), ); - const allCiphers$ = organization$.pipe( - concatMap(async (organization) => { + const allCiphers$ = combineLatest([organization$, this.refresh$]).pipe( + switchMap(async ([organization]) => { // If user swaps organization reset the addAccessToggle if (!this.showAddAccessToggle || organization) { this.addAccessToggle(0); From bdcf920e624981612d39945e283beb66c2c1c14d Mon Sep 17 00:00:00 2001 From: Todd Martin <106564991+trmartin4@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:47:10 -0400 Subject: [PATCH 3/8] Remove references to device-trust-logging feature flag (#11183) --- .../src/auth/services/device-trust.service.implementation.ts | 4 ---- libs/common/src/enums/feature-flag.enum.ts | 2 -- 2 files changed, 6 deletions(-) diff --git a/libs/common/src/auth/services/device-trust.service.implementation.ts b/libs/common/src/auth/services/device-trust.service.implementation.ts index fe0f2cff0ab..c1cf871e257 100644 --- a/libs/common/src/auth/services/device-trust.service.implementation.ts +++ b/libs/common/src/auth/services/device-trust.service.implementation.ts @@ -2,7 +2,6 @@ import { firstValueFrom, map, Observable } from "rxjs"; import { UserDecryptionOptionsServiceAbstraction } from "@bitwarden/auth/common"; -import { FeatureFlag } from "../../enums/feature-flag.enum"; import { AppIdService } from "../../platform/abstractions/app-id.service"; import { ConfigService } from "../../platform/abstractions/config/config.service"; import { CryptoFunctionService } from "../../platform/abstractions/crypto-function.service"; @@ -334,9 +333,6 @@ export class DeviceTrustService implements DeviceTrustServiceAbstraction { } async recordDeviceTrustLoss(): Promise { - if (!(await this.configService.getFeatureFlag(FeatureFlag.DeviceTrustLogging))) { - return; - } const deviceIdentifier = await this.appIdService.getAppId(); await this.devicesApiService.postDeviceTrustLoss(deviceIdentifier); } diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index 3d426aee3b7..aeefa98b5dc 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -24,7 +24,6 @@ export enum FeatureFlag { VaultBulkManagementAction = "vault-bulk-management-action", AC2828_ProviderPortalMembersPage = "AC-2828_provider-portal-members-page", IdpAutoSubmitLogin = "idp-auto-submit-login", - DeviceTrustLogging = "pm-8285-device-trust-logging", AuthenticatorTwoFactorToken = "authenticator-2fa-token", UnauthenticatedExtensionUIRefresh = "unauth-ui-refresh", EnableUpgradePasswordManagerSub = "AC-2708-upgrade-password-manager-sub", @@ -69,7 +68,6 @@ export const DefaultFeatureFlagValue = { [FeatureFlag.VaultBulkManagementAction]: FALSE, [FeatureFlag.AC2828_ProviderPortalMembersPage]: FALSE, [FeatureFlag.IdpAutoSubmitLogin]: FALSE, - [FeatureFlag.DeviceTrustLogging]: FALSE, [FeatureFlag.AuthenticatorTwoFactorToken]: FALSE, [FeatureFlag.UnauthenticatedExtensionUIRefresh]: FALSE, [FeatureFlag.EnableUpgradePasswordManagerSub]: FALSE, From 85b97d930481f2c35c4de14feefb1041277fa2a3 Mon Sep 17 00:00:00 2001 From: Todd Martin <106564991+trmartin4@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:02:39 -0400 Subject: [PATCH 4/8] Remove authenticator-token feature flag (#11182) --- .../auth/settings/two-factor-authenticator.component.ts | 8 -------- libs/common/src/enums/feature-flag.enum.ts | 2 -- 2 files changed, 10 deletions(-) diff --git a/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts b/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts index fdd595b7fcd..da5378f4790 100644 --- a/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts +++ b/apps/web/src/app/auth/settings/two-factor-authenticator.component.ts @@ -11,7 +11,6 @@ import { DisableTwoFactorAuthenticatorRequest } from "@bitwarden/common/auth/mod import { UpdateTwoFactorAuthenticatorRequest } from "@bitwarden/common/auth/models/request/update-two-factor-authenticator.request"; import { TwoFactorAuthenticatorResponse } from "@bitwarden/common/auth/models/response/two-factor-authenticator.response"; import { AuthResponse } from "@bitwarden/common/auth/types/auth-response"; -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"; @@ -127,13 +126,6 @@ export class TwoFactorAuthenticatorComponent } protected override async disableMethod() { - const twoFactorAuthenticatorTokenFeatureFlag = await this.configService.getFeatureFlag( - FeatureFlag.AuthenticatorTwoFactorToken, - ); - if (twoFactorAuthenticatorTokenFeatureFlag === false) { - return super.disableMethod(); - } - const confirmed = await this.dialogService.openSimpleDialog({ title: { key: "disable" }, content: { key: "twoStepDisableDesc" }, diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index aeefa98b5dc..7ac473ff6ab 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -24,7 +24,6 @@ export enum FeatureFlag { VaultBulkManagementAction = "vault-bulk-management-action", AC2828_ProviderPortalMembersPage = "AC-2828_provider-portal-members-page", IdpAutoSubmitLogin = "idp-auto-submit-login", - AuthenticatorTwoFactorToken = "authenticator-2fa-token", UnauthenticatedExtensionUIRefresh = "unauth-ui-refresh", EnableUpgradePasswordManagerSub = "AC-2708-upgrade-password-manager-sub", GenerateIdentityFillScriptRefactor = "generate-identity-fill-script-refactor", @@ -68,7 +67,6 @@ export const DefaultFeatureFlagValue = { [FeatureFlag.VaultBulkManagementAction]: FALSE, [FeatureFlag.AC2828_ProviderPortalMembersPage]: FALSE, [FeatureFlag.IdpAutoSubmitLogin]: FALSE, - [FeatureFlag.AuthenticatorTwoFactorToken]: FALSE, [FeatureFlag.UnauthenticatedExtensionUIRefresh]: FALSE, [FeatureFlag.EnableUpgradePasswordManagerSub]: FALSE, [FeatureFlag.GenerateIdentityFillScriptRefactor]: FALSE, From 4269489548d739dcff7829b21bba1baf119fc6c6 Mon Sep 17 00:00:00 2001 From: Jonathan Prusik Date: Tue, 24 Sep 2024 17:07:17 -0400 Subject: [PATCH 5/8] pin regedit dependency (#11228) --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2058de0dc8..57b3aa028fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -164,7 +164,7 @@ "prettier": "3.3.3", "prettier-plugin-tailwindcss": "0.6.6", "process": "0.11.10", - "regedit": "^3.0.3", + "regedit": "3.0.3", "remark-gfm": "4.0.0", "rimraf": "6.0.1", "sass": "1.74.1", diff --git a/package.json b/package.json index aafc92bbd3d..b073cd27d87 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "prettier": "3.3.3", "prettier-plugin-tailwindcss": "0.6.6", "process": "0.11.10", - "regedit": "^3.0.3", + "regedit": "3.0.3", "remark-gfm": "4.0.0", "rimraf": "6.0.1", "sass": "1.74.1", From e6c3de9f47b3ffe3cb8a5fa9e24df04683e9eee4 Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Tue, 24 Sep 2024 14:30:06 -0700 Subject: [PATCH 6/8] [PM-12609] Use shareReplay for allCiphers$ observable (#11229) --- apps/web/src/app/vault/org-vault/vault.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index f378e171e78..31f981b4898 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -343,6 +343,7 @@ export class VaultComponent implements OnInit, OnDestroy { await this.searchService.indexCiphers(ciphers, organization.id); return ciphers; }), + shareReplay({ refCount: true, bufferSize: 1 }), ); const allCipherMap$ = allCiphers$.pipe( From d587be1831601ec6482a00ad6647579ab90a31ad Mon Sep 17 00:00:00 2001 From: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com> Date: Wed, 25 Sep 2024 04:07:01 -0700 Subject: [PATCH 7/8] [PM-12403] - Implement Remove Send policy on Add/edit screen (#11178) * disable edit send if policy requires * remove unused var * don't display free bitwarden families button * Revert "don't display free bitwarden families button" This reverts commit 832564d705e082efcd6c7938cc7c1d9c6b23def4. * use config instead of policy service * Revert "don't display free bitwarden families button" This reverts commit 832564d705e082efcd6c7938cc7c1d9c6b23def4. * remove unnecessary code * Use short when transforming deletionDate instead of fixed format --------- Co-authored-by: Daniel James Smith --- .../options/send-options.component.ts | 4 + .../base-send-details.component.ts | 107 ------------------ .../send-details/send-details.component.ts | 105 ++++++++++++++--- .../send-file-details.component.ts | 4 + .../send-text-details.component.ts | 4 + 5 files changed, 104 insertions(+), 120 deletions(-) delete mode 100644 libs/tools/send/send-ui/src/send-form/components/send-details/base-send-details.component.ts diff --git a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts index 89ab9d19ba2..a73a3a6ad88 100644 --- a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts @@ -97,6 +97,7 @@ export class SendOptionsComponent implements OnInit { }); }); } + ngOnInit() { if (this.sendFormContainer.originalSendView) { this.sendOptionsForm.patchValue({ @@ -107,5 +108,8 @@ export class SendOptionsComponent implements OnInit { notes: this.sendFormContainer.originalSendView.notes, }); } + if (!this.config.areSendsAllowed) { + this.sendOptionsForm.disable(); + } } } diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/base-send-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/base-send-details.component.ts deleted file mode 100644 index b5cf8ee0c76..00000000000 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/base-send-details.component.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { DatePipe } from "@angular/common"; -import { Component, Input, OnInit } from "@angular/core"; -import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; -import { FormBuilder, FormControl, Validators } from "@angular/forms"; - -import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; - -import { SendFormConfig } from "../../abstractions/send-form-config.service"; -import { SendFormContainer } from "../../send-form-container"; - -// Value = hours -export enum DatePreset { - OneHour = 1, - OneDay = 24, - TwoDays = 48, - ThreeDays = 72, - SevenDays = 168, - FourteenDays = 336, - ThirtyDays = 720, -} - -export interface DatePresetSelectOption { - name: string; - value: DatePreset | string; -} - -@Component({ - selector: "base-send-details-behavior", - template: "", -}) -export class BaseSendDetailsComponent implements OnInit { - @Input() config: SendFormConfig; - @Input() originalSendView?: SendView; - - customDeletionDateOption: DatePresetSelectOption | null = null; - datePresetOptions: DatePresetSelectOption[] = []; - - sendDetailsForm = this.formBuilder.group({ - name: new FormControl("", Validators.required), - selectedDeletionDatePreset: new FormControl(DatePreset.SevenDays || "", Validators.required), - }); - - constructor( - protected sendFormContainer: SendFormContainer, - protected formBuilder: FormBuilder, - protected i18nService: I18nService, - protected datePipe: DatePipe, - ) { - this.sendDetailsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => { - this.sendFormContainer.patchSend((send) => { - return Object.assign(send, { - name: value.name, - deletionDate: new Date(this.formattedDeletionDate), - expirationDate: new Date(this.formattedDeletionDate), - } as SendView); - }); - }); - - this.sendFormContainer.registerChildForm("sendDetailsForm", this.sendDetailsForm); - } - - async ngOnInit() { - this.setupDeletionDatePresets(); - - if (this.originalSendView) { - this.sendDetailsForm.patchValue({ - name: this.originalSendView.name, - selectedDeletionDatePreset: this.originalSendView.deletionDate.toString(), - }); - - if (this.originalSendView.deletionDate) { - this.customDeletionDateOption = { - name: this.datePipe.transform(this.originalSendView.deletionDate, "MM/dd/yyyy, hh:mm a"), - value: this.originalSendView.deletionDate.toString(), - }; - this.datePresetOptions.unshift(this.customDeletionDateOption); - } - } - } - - setupDeletionDatePresets() { - const defaultSelections: DatePresetSelectOption[] = [ - { name: this.i18nService.t("oneHour"), value: DatePreset.OneHour }, - { name: this.i18nService.t("oneDay"), value: DatePreset.OneDay }, - { name: this.i18nService.t("days", "2"), value: DatePreset.TwoDays }, - { name: this.i18nService.t("days", "3"), value: DatePreset.ThreeDays }, - { name: this.i18nService.t("days", "7"), value: DatePreset.SevenDays }, - { name: this.i18nService.t("days", "14"), value: DatePreset.FourteenDays }, - { name: this.i18nService.t("days", "30"), value: DatePreset.ThirtyDays }, - ]; - - this.datePresetOptions = defaultSelections; - } - - get formattedDeletionDate(): string { - const now = new Date(); - const selectedValue = this.sendDetailsForm.controls.selectedDeletionDatePreset.value; - - if (typeof selectedValue === "string") { - return selectedValue; - } - - const milliseconds = now.setTime(now.getTime() + (selectedValue as number) * 60 * 60 * 1000); - return new Date(milliseconds).toString(); - } -} diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts index 0b287205be4..68a5e40a575 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts @@ -1,12 +1,14 @@ import { CommonModule, DatePipe } from "@angular/common"; -import { Component, OnInit } from "@angular/core"; -import { FormBuilder, ReactiveFormsModule } from "@angular/forms"; +import { Component, OnInit, Input } from "@angular/core"; +import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; +import { FormBuilder, FormControl, ReactiveFormsModule, Validators } from "@angular/forms"; import { firstValueFrom } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; +import { SendView } from "@bitwarden/common/tools/send/models/view/send.view"; import { SectionComponent, SectionHeaderComponent, @@ -18,13 +20,29 @@ import { SelectModule, } from "@bitwarden/components"; +import { SendFormConfig } from "../../abstractions/send-form-config.service"; import { SendFormContainer } from "../../send-form-container"; import { SendOptionsComponent } from "../options/send-options.component"; -import { BaseSendDetailsComponent } from "./base-send-details.component"; import { SendFileDetailsComponent } from "./send-file-details.component"; import { SendTextDetailsComponent } from "./send-text-details.component"; +// Value = hours +export enum DatePreset { + OneHour = 1, + OneDay = 24, + TwoDays = 48, + ThreeDays = 72, + SevenDays = 168, + FourteenDays = 336, + ThirtyDays = 720, +} + +export interface DatePresetSelectOption { + name: string; + value: DatePreset | string; +} + @Component({ selector: "tools-send-details", templateUrl: "./send-details.component.html", @@ -46,10 +64,20 @@ import { SendTextDetailsComponent } from "./send-text-details.component"; SelectModule, ], }) -export class SendDetailsComponent extends BaseSendDetailsComponent implements OnInit { +export class SendDetailsComponent implements OnInit { + @Input() config: SendFormConfig; + @Input() originalSendView?: SendView; + FileSendType = SendType.File; TextSendType = SendType.Text; sendLink: string | null = null; + customDeletionDateOption: DatePresetSelectOption | null = null; + datePresetOptions: DatePresetSelectOption[] = []; + + sendDetailsForm = this.formBuilder.group({ + name: new FormControl("", Validators.required), + selectedDeletionDatePreset: new FormControl(DatePreset.SevenDays || "", Validators.required), + }); constructor( protected sendFormContainer: SendFormContainer, @@ -58,18 +86,69 @@ export class SendDetailsComponent extends BaseSendDetailsComponent implements On protected datePipe: DatePipe, protected environmentService: EnvironmentService, ) { - super(sendFormContainer, formBuilder, i18nService, datePipe); - } + this.sendDetailsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => { + this.sendFormContainer.patchSend((send) => { + return Object.assign(send, { + name: value.name, + deletionDate: new Date(this.formattedDeletionDate), + expirationDate: new Date(this.formattedDeletionDate), + } as SendView); + }); + }); - async getSendLink() {} + this.sendFormContainer.registerChildForm("sendDetailsForm", this.sendDetailsForm); + } async ngOnInit() { - await super.ngOnInit(); - if (!this.originalSendView) { - return; + this.setupDeletionDatePresets(); + + if (this.originalSendView) { + this.sendDetailsForm.patchValue({ + name: this.originalSendView.name, + selectedDeletionDatePreset: this.originalSendView.deletionDate.toString(), + }); + + if (this.originalSendView.deletionDate) { + this.customDeletionDateOption = { + name: this.datePipe.transform(this.originalSendView.deletionDate, "short"), + value: this.originalSendView.deletionDate.toString(), + }; + this.datePresetOptions.unshift(this.customDeletionDateOption); + } + + const env = await firstValueFrom(this.environmentService.environment$); + this.sendLink = + env.getSendUrl() + this.originalSendView.accessId + "/" + this.originalSendView.urlB64Key; } - const env = await firstValueFrom(this.environmentService.environment$); - this.sendLink = - env.getSendUrl() + this.originalSendView.accessId + "/" + this.originalSendView.urlB64Key; + + if (!this.config.areSendsAllowed) { + this.sendDetailsForm.disable(); + } + } + + setupDeletionDatePresets() { + const defaultSelections: DatePresetSelectOption[] = [ + { name: this.i18nService.t("oneHour"), value: DatePreset.OneHour }, + { name: this.i18nService.t("oneDay"), value: DatePreset.OneDay }, + { name: this.i18nService.t("days", "2"), value: DatePreset.TwoDays }, + { name: this.i18nService.t("days", "3"), value: DatePreset.ThreeDays }, + { name: this.i18nService.t("days", "7"), value: DatePreset.SevenDays }, + { name: this.i18nService.t("days", "14"), value: DatePreset.FourteenDays }, + { name: this.i18nService.t("days", "30"), value: DatePreset.ThirtyDays }, + ]; + + this.datePresetOptions = defaultSelections; + } + + get formattedDeletionDate(): string { + const now = new Date(); + const selectedValue = this.sendDetailsForm.controls.selectedDeletionDatePreset.value; + + if (typeof selectedValue === "string") { + return selectedValue; + } + + const milliseconds = now.setTime(now.getTime() + (selectedValue as number) * 60 * 60 * 1000); + return new Date(milliseconds).toString(); } } diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts index 7739ca26528..447256cacdf 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts @@ -73,5 +73,9 @@ export class SendFileDetailsComponent implements OnInit { file: this.originalSendView.file, }); } + + if (!this.config.areSendsAllowed) { + this.sendFileDetailsForm.disable(); + } } } diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts index 85fc324f2f7..873f85c9e38 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts @@ -57,5 +57,9 @@ export class SendTextDetailsComponent implements OnInit { hidden: this.originalSendView.text?.hidden || false, }); } + + if (!this.config.areSendsAllowed) { + this.sendTextDetailsForm.disable(); + } } } From cd9045483bc31768698b197d9452b5b01da68c99 Mon Sep 17 00:00:00 2001 From: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com> Date: Wed, 25 Sep 2024 05:03:42 -0700 Subject: [PATCH 8/8] [PM-12561] - add data attrs for send form (#11209) * add data attrs for send form * Add data-testid for toggle view password * Revert "Add data-testid for toggle view password" This reverts commit bd6fcc8c1bf6d4d61888ace8480d34b3098d0770. * move dataid to component --------- Co-authored-by: Daniel James Smith --- .../components/options/send-options.component.html | 9 ++++++++- .../components/send-details/send-details.component.html | 2 +- .../send-details/send-file-details.component.html | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.html b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.html index 53483065b73..01b96e3bc5a 100644 --- a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.html +++ b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.html @@ -15,12 +15,19 @@ {{ "password" | i18n }} {{ "newPassword" | i18n }} - + {{ "sendPasswordDescV2" | i18n }} diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.html b/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.html index 98f399760be..d4c253303bd 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.html +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.html @@ -23,7 +23,7 @@ {{ "sendLink" | i18n }} - +