1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

Merge Feature/trial initiation (#3036)

* [SG-74] Trial Initiation Component with Vertical Stepper (#2913)

* Vertical stepper PoC

* Convert stepper css to tailwind

* trial component start

* trial component params

* tailwind-ify header

* Support teams, enterprise, and families layout param and more layout ui work

* Some more theming fixes

* Rename TrialModule to TrialInitiationModule

* Stepper fixes, plus more functionality demo

* Cleanup

* layout params and placeholders

* Only allow trial route to be hit if not logged in

* fix typo

* Use background-alt2 color for header

* Move vertical stepper out of trial-initiation

* Create components for the different plan types

* Remove width on steps

* Remove content projection for label

* Tailwind style fixes

* Extract step content into a component

* Remove layout param for now

* Remove step tags

* remove pointer classes from step button

* Remove most tailwind important designations

* Update apps/web/src/app/modules/vertical-stepper/vertical-step.component.ts

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Tailwind and layout fixes

* Remove container

* lint & prettier fixes

* Remove extra CdkStep declaration

* Styles fixes

* Style logo directly

* Remove 0 margin on image

* Fix tiling and responsiveness

* Minor padding fixes for org pages

* Update apps/web/src/app/modules/trial-initiation/trial-initiation.component.html

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* prettier fix

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* [SG-65] Reusable Registration Form (#2946)

* created reusable registration form

* fixed conflicts

* replicated reactive form changes in other clients

* removed comments

* client template cleanup

* client template cleanup

* removed comments in template file

* changed to component suffix

* switched show password to use component

* comments resolution

* comments resolution

* added toast disable functionality

* removed unused locale

* mode custom input validator generic

* fixed button

* fixed linter

* removed horizontal rule

* switched to button component

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: gbubemismith <gsmithwalter@gmail.com>
This commit is contained in:
Robyn MacCallum
2022-07-05 15:25:14 -04:00
committed by GitHub
parent 9d1312f2af
commit fb70d8a2d3
38 changed files with 834 additions and 314 deletions

View File

@@ -1,19 +1,17 @@
<form id="register-page" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
<form
id="register-page"
#form
(ngSubmit)="submit()"
[appApiAction]="formPromise"
[formGroup]="formGroup"
>
<div class="content">
<h1>{{ "createAccount" | i18n }}</h1>
<div class="box">
<div class="box-content">
<div class="box-content-row" appBoxRow>
<label for="email">{{ "emailAddress" | i18n }}</label>
<input
id="email"
type="text"
name="Email"
[(ngModel)]="email"
required
[appAutofocus]="email === ''"
appInputVerbatim
/>
<input id="email" type="email" formControlName="email" appInputVerbatim />
</div>
<div class="box-content-row" appBoxRow>
<div class="box-content-row-flex">
@@ -30,11 +28,8 @@
<input
id="masterPassword"
type="{{ showPassword ? 'text' : 'password' }}"
name="MasterPassword"
class="monospaced"
[(ngModel)]="masterPassword"
required
[appAutofocus]="email !== ''"
formControlName="masterPassword"
(input)="updatePasswordStrength()"
appInputVerbatim
/>
@@ -46,7 +41,7 @@
appStopClick
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
[attr.aria-pressed]="showPassword"
(click)="togglePassword(false)"
(click)="togglePassword()"
>
<i
class="bwi bwi-lg"
@@ -81,10 +76,8 @@
<input
id="masterPasswordRetype"
type="{{ showPassword ? 'text' : 'password' }}"
name="MasterPasswordRetype"
class="monospaced"
[(ngModel)]="confirmMasterPassword"
required
formControlName="confirmMasterPassword"
appInputVerbatim
/>
</div>
@@ -95,7 +88,7 @@
appStopClick
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
[attr.aria-pressed]="showPassword"
(click)="togglePassword(true)"
(click)="togglePassword()"
>
<i
class="bwi bwi-lg"
@@ -107,7 +100,7 @@
</div>
<div class="box-content-row" appBoxRow>
<label for="hint">{{ "masterPassHint" | i18n }}</label>
<input id="hint" type="text" name="Hint" [(ngModel)]="hint" />
<input id="hint" type="text" formControlName="hint" />
</div>
<div class="box last" [hidden]="!showCaptcha()">
<div class="box-content">
@@ -127,12 +120,7 @@
</div>
<div class="box last" *ngIf="showTerms">
<div class="box-footer checkbox">
<input
type="checkbox"
id="acceptPolicies"
[(ngModel)]="acceptPolicies"
name="AcceptPolicies"
/>
<input type="checkbox" id="acceptPolicies" formControlName="acceptPolicies" />
<label for="acceptPolicies">
{{ "acceptPolicies" | i18n }}<br />
<a href="https://bitwarden.com/terms/" target="_blank" rel="noopener">{{

View File

@@ -1,4 +1,5 @@
import { Component, NgZone, OnDestroy, OnInit } from "@angular/core";
import { FormBuilder } from "@angular/forms";
import { Router } from "@angular/router";
import { RegisterComponent as BaseRegisterComponent } from "@bitwarden/angular/components/register.component";
@@ -7,6 +8,7 @@ import { AuthService } from "@bitwarden/common/abstractions/auth.service";
import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service";
import { CryptoService } from "@bitwarden/common/abstractions/crypto.service";
import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service";
import { FormValidationErrorsService } from "@bitwarden/common/abstractions/formValidationErrors.service";
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/abstractions/log.service";
import { PasswordGenerationService } from "@bitwarden/common/abstractions/passwordGeneration.service";
@@ -21,6 +23,8 @@ const BroadcasterSubscriptionId = "RegisterComponent";
})
export class RegisterComponent extends BaseRegisterComponent implements OnInit, OnDestroy {
constructor(
formValidationErrorService: FormValidationErrorsService,
formBuilder: FormBuilder,
authService: AuthService,
router: Router,
i18nService: I18nService,
@@ -35,6 +39,8 @@ export class RegisterComponent extends BaseRegisterComponent implements OnInit,
logService: LogService
) {
super(
formValidationErrorService,
formBuilder,
authService,
router,
i18nService,

View File

@@ -532,10 +532,13 @@
"invalidEmail": {
"message": "Invalid email address."
},
"masterPassRequired": {
"masterPasswordRequired": {
"message": "Master password is required."
},
"masterPassLength": {
"confirmMasterPasswordRequired": {
"message": "Master password retype is required."
},
"masterPasswordMinLength": {
"message": "Master password must be at least 8 characters long."
},
"masterPassDoesntMatch": {
@@ -1543,7 +1546,7 @@
"acceptPolicies": {
"message": "By checking this box you agree to the following:"
},
"acceptPoliciesError": {
"acceptPoliciesRequired": {
"message": "Terms of Service and Privacy Policy have not been acknowledged."
},
"enableBrowserIntegration": {