-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(demo): added reset password component as example in the demo app #…
- Loading branch information
1 parent
265408f
commit ec33493
Showing
5 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
demo/src/app/examples/reset-psasword/reset-password.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<div class="jumbotron jumbotron-fluid"> | ||
<div class="container"> | ||
<h1>Disable reset password</h1> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
|
||
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutAlign="center"> | ||
|
||
<mat-card fxFlexAlign.gt-xs="center"> | ||
<mat-card-title> | ||
default - reset password enabled | ||
</mat-card-title> | ||
<mat-card-subtitle> | ||
<div fxLayout="row" fxLayoutAlign="space-between"> | ||
<pre><code [highlight]="firstTabHtml"></code></pre> | ||
<button mat-icon-button | ||
ngxClipboard | ||
[cbContent]="firstTabHtml" | ||
matTooltip="copy" | ||
(click)="showCopyMessage(firstTabHtml)"> | ||
<mat-icon aria-label="copy content" class="mat-18">content_copy</mat-icon> | ||
</button> | ||
</div> | ||
</mat-card-subtitle> | ||
<mat-card-content> | ||
<ngx-auth-firebaseui [resetPasswordEnabled]="true"></ngx-auth-firebaseui> | ||
</mat-card-content> | ||
</mat-card> | ||
|
||
<mat-card fxFlexAlign.gt-xs="center"> | ||
<mat-card-title> | ||
reset password disabled | ||
</mat-card-title> | ||
<mat-card-subtitle> | ||
<div fxLayout="row" fxLayoutAlign="space-between"> | ||
<pre><code [highlight]="secondTabHtml"></code></pre> | ||
<button mat-icon-button | ||
ngxClipboard | ||
[cbContent]="secondTabHtml" | ||
matTooltip="copy" | ||
(click)="showCopyMessage(secondTabHtml)"> | ||
<mat-icon aria-label="copy content" class="mat-18">content_copy</mat-icon> | ||
</button> | ||
</div> | ||
</mat-card-subtitle> | ||
<mat-card-content> | ||
<ngx-auth-firebaseui [resetPasswordEnabled]="false"></ngx-auth-firebaseui> | ||
</mat-card-content> | ||
</mat-card> | ||
|
||
</div> | ||
|
||
</div> |
5 changes: 5 additions & 0 deletions
5
demo/src/app/examples/reset-psasword/reset-password.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.mat-card { | ||
max-width: 480px; | ||
cursor: pointer; | ||
margin: 2rem; | ||
} |
25 changes: 25 additions & 0 deletions
25
demo/src/app/examples/reset-psasword/reset-password.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ResetPasswordComponent } from './reset-password.component'; | ||
|
||
describe('ResetPasswordComponent', () => { | ||
let component: ResetPasswordComponent; | ||
let fixture: ComponentFixture<ResetPasswordComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ResetPasswordComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ResetPasswordComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
demo/src/app/examples/reset-psasword/reset-password.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import {Component} from '@angular/core'; | ||
import {ExampleBaseComponent} from '../example.abstract'; | ||
import {MatSnackBar} from '@angular/material'; | ||
|
||
@Component({ | ||
selector: 'app-reset-psasword', | ||
templateUrl: './reset-password.component.html', | ||
styleUrls: ['./reset-password.component.scss'] | ||
}) | ||
export class ResetPasswordComponent extends ExampleBaseComponent { | ||
|
||
firstTabHtml = `<ngx-auth-firebaseui [resetPasswordEnabled]="true"></ngx-auth-firebaseui>`; | ||
secondTabHtml = `<ngx-auth-firebaseui [resetPasswordEnabled]="false"></ngx-auth-firebaseui>`; | ||
|
||
constructor(public snackBar: MatSnackBar) { | ||
super(snackBar); | ||
} | ||
} |