forked from anihalaney/rwa-trivia
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
74 changed files
with
2,349 additions
and
905 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
exports.ssr = require('./server/functions/ssr').ssr; | ||
exports.app = require('./server/functions/app').app; | ||
exports.onFirestoreQuestionWrite = require('./server/functions/db/firebase-functions').onQuestionWrite; | ||
exports.onFirestoreInvitationWrite = require('./server/functions/db/firebase-functions').onInvitationWrite; | ||
exports.onFirestoreGameCreate = require('./server/functions/db/firebase-functions').onGameCreate; | ||
exports.onFirestoreGameUpdate = require('./server/functions/db/firebase-functions').onGameUpdate; | ||
exports.onFirestoreUserCreate = require('./server/functions/db/firebase-functions').onUserCreate; | ||
exports.onFirestoreUserUpdate = require('./server/functions/db/firebase-functions').onUserUpdate; |
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
139 changes: 72 additions & 67 deletions
139
projects/shared-library/src/lib/core/components/login/login.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 |
---|---|---|
@@ -1,78 +1,83 @@ | ||
<div *ngIf="false"> | ||
<h1 mat-dialog-title>Choose Login Method</h1> | ||
<h1 mat-dialog-title>Choose Login Method</h1> | ||
|
||
<mat-dialog-actions class="flex-container" | ||
fxLayout="column" | ||
fxLayoutAlign="space-around"> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="googleLogin()">Google</button> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="fbLogin()">facebook</button> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="twitterLogin()">Twitter</button> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="githubLogin()">Github</button> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="passwordLogin()">Email/Password</button> | ||
</mat-dialog-actions> | ||
<mat-dialog-actions class="flex-container" fxLayout="column" fxLayoutAlign="space-around"> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="googleLogin()">Google</button> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="fbLogin()">facebook</button> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="twitterLogin()">Twitter</button> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="githubLogin()">Github</button> | ||
<button class="flex-item" mat-raised-button mat-dialog-close color="primary" (click)="passwordLogin()">Email/Password</button> | ||
</mat-dialog-actions> | ||
|
||
<mat-dialog-actions> | ||
<button mat-dialog-close>Cancel</button> | ||
</mat-dialog-actions> | ||
<mat-dialog-actions> | ||
<button mat-dialog-close>Cancel</button> | ||
</mat-dialog-actions> | ||
</div> | ||
|
||
<mat-dialog-content> | ||
<div class="logininner textleft"> | ||
<div class="card"> | ||
<div class="row"> | ||
<div class="col-sm-7 col-xs-12"> | ||
<form (ngSubmit)="onSubmit()" class="sign-in-form" [formGroup]="loginForm" novalidate> | ||
<input type="hidden" formControlName="mode" [(ngModel)]="mode"> | ||
<div class="heading" [ngSwitch]="mode"> | ||
<span *ngSwitchCase="0">Login to your account</span> | ||
<span *ngSwitchCase="1">Get a bit wiser - Sign up</span> | ||
<span *ngSwitchCase="2">Forgot Password</span> | ||
</div> | ||
<mat-form-field class="full-width required"> | ||
<input matInput placeholder="Email *" formControlName="email" class="required"> | ||
<mat-hint align="end" *ngIf="loginForm.controls.email.errors && !loginForm.controls.email.pristine" class="error">Invalid Email!</mat-hint> | ||
</mat-form-field> | ||
<mat-form-field [class.hide]="mode === 2" class="full-width required"> | ||
<input type="password" matInput placeholder="Password *" class="required" formControlName="password"> | ||
<mat-hint align="end" *ngIf="mode !== 2 && (loginForm.controls.password.errors && !loginForm.controls.password.pristine)" class="error">Password must be atleast 6 characters</mat-hint> | ||
</mat-form-field> | ||
<mat-form-field [class.hide]="mode !== 1" class="full-width required"> | ||
<input type="password" matInput placeholder="Confirm Password" class="required" formControlName="confirmPassword"> | ||
<mat-hint align="end" *ngIf="mode === 1 && (loginForm.controls.password.valid && loginForm.hasError('passwordmismatch'))" class="error">Must match Password</mat-hint> | ||
</mat-form-field> | ||
<ng-container [ngSwitch]="mode"> | ||
<ng-container *ngSwitchCase="0"> | ||
<div class="formfield"> | ||
<label> | ||
<input type="checkbox" name="" >Keep me logged in | ||
</label> | ||
</div> | ||
<button mat-raised-button class="btn signup" type="submit" [disabled]="!loginForm.valid">Login</button> | ||
<div class="row loginlink"> | ||
<div class="col-xs-6"><a (click)="this.mode=2" title="Forgot Password?">Forgot Password?</a></div> | ||
<div class="col-xs-6 textrigth"><a (click)="this.mode=1" title="New Signup">New Signup</a></div> | ||
</div> | ||
<div class="logininner textleft"> | ||
<div class="card"> | ||
<div class="row"> | ||
<div class="col-sm-7 col-xs-12"> | ||
<form (ngSubmit)="onSubmit()" class="sign-in-form" [formGroup]="loginForm" novalidate> | ||
<input type="hidden" formControlName="mode" [(ngModel)]="mode" aria-label="hidden"> | ||
<div class="heading" [ngSwitch]="mode"> | ||
<span *ngSwitchCase="0">Login to your account</span> | ||
<span *ngSwitchCase="1">Get a bit wiser - Sign up</span> | ||
<span *ngSwitchCase="2">Forgot Password</span> | ||
</div> | ||
<mat-form-field class="full-width required"> | ||
<input matInput placeholder="Email *" formControlName="email" class="required" aria-label="email"> | ||
<mat-hint align="end" *ngIf="loginForm.controls.email.errors && !loginForm.controls.email.pristine" class="error">Invalid | ||
Email! | ||
</mat-hint> | ||
</mat-form-field> | ||
<mat-form-field [class.hide]="mode === 2" class="full-width required"> | ||
<input type="password" matInput placeholder="Password *" class="required" formControlName="password" | ||
aria-label="password"> | ||
<mat-hint align="end" *ngIf="mode !== 2 && (loginForm.controls.password.errors && !loginForm.controls.password.pristine)" | ||
class="error">Password must be atleast 6 characters</mat-hint> | ||
</mat-form-field> | ||
<mat-form-field [class.hide]="mode !== 1" class="full-width required"> | ||
<input type="password" matInput placeholder="Confirm Password *" class="required" formControlName="confirmPassword" | ||
aria-label="confirm-password"> | ||
<mat-hint align="end" *ngIf="mode === 1 && (loginForm.controls.password.valid && loginForm.hasError('passwordmismatch'))" | ||
class="error">Must match Password</mat-hint> | ||
</mat-form-field> | ||
<ng-container [ngSwitch]="mode"> | ||
<ng-container *ngSwitchCase="0"> | ||
<div class="formfield"> | ||
<label> | ||
<input type="checkbox" name="">Keep me logged in | ||
</label> | ||
</div> | ||
<button mat-raised-button class="btn signup" type="submit" [disabled]="!loginForm.valid">Login</button> | ||
<div class="row loginlink"> | ||
<div class="col-xs-6"><a (click)="this.mode=2" title="Forgot Password?">Forgot Password?</a></div> | ||
<div class="col-xs-6 textrigth"><a (click)="this.mode=1" title="New Signup">New Signup</a></div> | ||
</div> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="1"> | ||
<button mat-raised-button class="btn signup" type="submit" [disabled]="!loginForm.valid">Sign Up</button> | ||
<div class="signupfree">by clicking "Sign Up" I agree to bitWiser's Terms & Conditions</div> | ||
<div class="textcenter loginlink"><a (click)="this.mode=0" title="Login">Already have an account? Login</a></div> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="2"> | ||
<button mat-raised-button class="btn signup" type="submit" [disabled]="!loginForm.valid">Forgot | ||
Password</button> | ||
<div class="textcenter loginlink"><a (click)="this.mode=0" title="Login">No. I remember it now!</a></div> | ||
</ng-container> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="1"> | ||
<button mat-raised-button class="btn signup" type="submit" [disabled]="!loginForm.valid">Sign Up</button> | ||
<div class="signupfree">by clicking "Sign Up" I agree to bitWiser's Terms & Conditions</div> | ||
<div class="textcenter loginlink"><a (click)="this.mode=0" title="Login">Already have an account? Login</a></div> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="2"> | ||
<button mat-raised-button class="btn signup" type="submit" [disabled]="!loginForm.valid">Forgot Password</button> | ||
<div class="textcenter loginlink"><a (click)="this.mode=0" title="Login">No. I remember it now!</a></div> | ||
</ng-container> | ||
</ng-container> | ||
</form> | ||
</div> | ||
<div class="col-sm-5 col-xs-12 withsocial"> | ||
<h3>You can also login with your social account</h3> | ||
<a (click)="twitterLogin()"><img src="/assets/images/twitbtn.png" alt="Twitter" /></a> | ||
<a (click)="fbLogin()"><img src="/assets/images/faceboockbtn.png" alt="facebook" /></a> | ||
<a (click)="googleLogin()"><img src="/assets/images/gpulsebtn.png" alt="Google Plus" /></a> | ||
<a (click)="githubLogin()"><img src="/assets/images/githubbtn.png" alt="Github" /></a> | ||
</form> | ||
</div> | ||
<div class="col-sm-5 col-xs-12 withsocial"> | ||
<h3>You can also login with your social account</h3> | ||
<a (click)="twitterLogin()"><img src="/assets/images/twitbtn.png" alt="Twitter" /></a> | ||
<a (click)="fbLogin()"><img src="/assets/images/faceboockbtn.png" alt="facebook" /></a> | ||
<a (click)="googleLogin()"><img src="/assets/images/gpulsebtn.png" alt="Google Plus" /></a> | ||
<a (click)="githubLogin()"><img src="/assets/images/githubbtn.png" alt="Github" /></a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</mat-dialog-content> |
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
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
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
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
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
Oops, something went wrong.