Skip to content

Commit

Permalink
inline email message into markup
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-livefront committed Dec 18, 2024
1 parent 072c58f commit 2ac259d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
'md:tw-flex md:tw-flex-col md:tw-items-center md:!tw-rounded-b-none': !isDesktop,
}"
>
<p bitTypography="body2" class="text-muted md:tw-w-9/12">{{ formMessage }}</p>
<p bitTypography="body2" class="text-muted md:tw-w-9/12">
{{ "newDeviceVerificationNoticePageOneFormContent" | i18n: this.currentEmail }}
</p>

<bit-radio-group formControlName="hasEmailAccess" class="md:tw-w-9/12">
<bit-radio-button id="option_A" [value]="0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { firstValueFrom, Observable } from "rxjs";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { Account, AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { ClientType } from "@bitwarden/common/enums";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { UserId } from "@bitwarden/common/types/guid";
import {
Expand Down Expand Up @@ -38,17 +37,15 @@ import { NewDeviceVerificationNoticeService } from "./../../services/new-device-
],
})
export class NewDeviceVerificationNoticePageOneComponent implements OnInit {
protected formMessage: string | null = "";
protected formGroup = this.formBuilder.group({

Check warning on line 40 in libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.ts

View check run for this annotation

Codecov / codecov/patch

libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.ts#L40

Added line #L40 was not covered by tests
hasEmailAccess: new FormControl(0),
});
protected isDesktop: boolean;
readonly currentAcct$: Observable<Account | null> = this.accountService.activeAccount$;
private currentEmail: string = "";
protected currentEmail: string = "";
private currentUserId: UserId | null = null;

Check warning on line 46 in libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.ts

View check run for this annotation

Codecov / codecov/patch

libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.ts#L44-L46

Added lines #L44 - L46 were not covered by tests

constructor(
private i18nService: I18nService,
private formBuilder: FormBuilder,
private router: Router,
private accountService: AccountService,
Expand All @@ -65,10 +62,6 @@ export class NewDeviceVerificationNoticePageOneComponent implements OnInit {
}
this.currentEmail = currentAcct.email;
this.currentUserId = currentAcct.id;

Check warning on line 64 in libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.ts

View check run for this annotation

Codecov / codecov/patch

libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.ts#L63-L64

Added lines #L63 - L64 were not covered by tests
this.formMessage = this.i18nService.t(
"newDeviceVerificationNoticePageOneFormContent",
this.currentEmail,
);
}

submit = async () => {

Check warning on line 67 in libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.ts

View check run for this annotation

Codecov / codecov/patch

libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.ts#L67

Added line #L67 was not covered by tests
Expand Down

0 comments on commit 2ac259d

Please sign in to comment.