mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 19:53:43 +00:00
handle browser routing and basic browser template
This commit is contained in:
@@ -1,4 +1,20 @@
|
||||
<form [bitSubmit]="submit.bind(null, false)" [formGroup]="formGroup">
|
||||
<!-- Web Template -->
|
||||
|
||||
<!--
|
||||
TODO-rr-bw: Clarify this comment if necessary.
|
||||
|
||||
Why not use <form *ngIf="clientType === ClientType.Web"> to display this section?
|
||||
Because this file contains 3 separate templates for Web, Browser, and Desktop. For Web,
|
||||
we want access to the masterPasswordInput reference in the class file.
|
||||
- If we used *ngIf, we would not be able to access the reference initially.
|
||||
- Using a hidden form allows us to access the reference, because it ensures that the element
|
||||
reference does exist (it's just potentially hidden instead of non-existent).
|
||||
-->
|
||||
<form
|
||||
[ngClass]="{ 'tw-hidden': clientType !== ClientType.Web }"
|
||||
[bitSubmit]="submit.bind(null, false)"
|
||||
[formGroup]="formGroup"
|
||||
>
|
||||
<!-------------------------
|
||||
UI STATE 1: Email Entry
|
||||
-------------------------->
|
||||
@@ -141,3 +157,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Browser Template -->
|
||||
<form *ngIf="clientType === ClientType.Browser" [bitSubmit]="submit" [formGroup]="formGroup">
|
||||
<main tabindex="-1"></main>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user