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.
Done changes related to improve performance
- Loading branch information
1 parent
18f19fa
commit fa0dd3e
Showing
22 changed files
with
1,963 additions
and
672 deletions.
There are no files selected for viewing
136 changes: 69 additions & 67 deletions
136
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,80 @@ | ||
<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
104 changes: 46 additions & 58 deletions
104
...shared-library/src/lib/shared/components/questions-search/questions-search.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,61 +1,49 @@ | ||
<div *ngIf="questions && categoryAggregation && tagsCount" class="question-table-form"> | ||
<div fxLayout="row" fxLayoutAlign="space-between"> | ||
<div class="filter-facet-column" fxLayout="column"> | ||
<mat-list dense> | ||
<h3 mdSubheader>Categories</h3> | ||
<mat-list-item *ngFor="let category of categoriesObs | async"> | ||
<mat-checkbox | ||
[disabled]="!categoryAggregation.hasOwnProperty(category.id) || categoryAggregation[category.id] === 0" | ||
[value]="category.id" | ||
(change)="categoryChanged($event, category)" | ||
> | ||
{{category.categoryName}} ({{categoryAggregation.hasOwnProperty(category.id) ? categoryAggregation[category.id] : 0}}) | ||
</mat-checkbox> | ||
</mat-list-item> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Tags</h3> | ||
<mat-list-item *ngFor="let tagCount of tagsCount"> | ||
<mat-checkbox | ||
[checked]="tagsChecked[tagCount.tag]" | ||
(change)="tagChanged($event, tagCount.tag)">{{tagCount.tag}} ({{tagCount.count}})</mat-checkbox> | ||
</mat-list-item> | ||
<mat-form-field> | ||
<input matInput placeholder="Enter Tag"> | ||
</mat-form-field> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Status</h3> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Updated By</h3> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Created By</h3> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Updated On</h3> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Created By</h3> | ||
</mat-list> | ||
</div> | ||
<div fxLayout="row" fxLayoutAlign="space-between"> | ||
<div class="filter-facet-column" fxLayout="column"> | ||
<mat-list dense> | ||
<h3 mdSubheader>Categories</h3> | ||
<mat-list-item *ngFor="let category of categoriesObs | async"> | ||
<mat-checkbox [disabled]="!categoryAggregation.hasOwnProperty(category.id) || categoryAggregation[category.id] === 0" [value]="category.id" | ||
(change)="categoryChanged($event, category)"> | ||
{{category.categoryName}} ({{categoryAggregation.hasOwnProperty(category.id) ? categoryAggregation[category.id] : 0}}) | ||
</mat-checkbox> | ||
</mat-list-item> | ||
<mat-divider></mat-divider> | ||
|
||
<div class="example-container mat-elevation-z8"> | ||
|
||
<question-table | ||
[showSort]="true" | ||
[showPaginator]="true" | ||
[questions]="questions" | ||
[totalCount]="totalCount" | ||
[categoryDictionary]="categoryDictionary" | ||
[showApproveButton]="false" | ||
[clientSidePagination]="false" | ||
(onApproveClicked)="approveClicked($event)" | ||
(onPageChanged)="pageChanged($event)" | ||
(onSortOrderChanged)="sortOrderChanged($event)"> | ||
</question-table> | ||
</div> | ||
<h3 mdSubheader>Tags</h3> | ||
<mat-list-item *ngFor="let tagCount of tagsCount"> | ||
<mat-checkbox [checked]="tagsChecked[tagCount.tag]" (change)="tagChanged($event, tagCount.tag)">{{tagCount.tag}} | ||
({{tagCount.count}})</mat-checkbox> | ||
</mat-list-item> | ||
<mat-form-field> | ||
<input matInput placeholder="Enter Tag" aria-label="tag"> | ||
</mat-form-field> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Status</h3> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Updated By</h3> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Created By</h3> | ||
<mat-divider></mat-divider> | ||
|
||
</div> | ||
</div> | ||
<h3 mdSubheader>Updated On</h3> | ||
<mat-divider></mat-divider> | ||
|
||
<h3 mdSubheader>Created By</h3> | ||
</mat-list> | ||
</div> | ||
|
||
<div class="example-container mat-elevation-z8"> | ||
|
||
<question-table [showSort]="true" [showPaginator]="true" [questions]="questions" [totalCount]="totalCount" [categoryDictionary]="categoryDictionary" | ||
[showApproveButton]="false" [clientSidePagination]="false" (onApproveClicked)="approveClicked($event)" (onPageChanged)="pageChanged($event)" | ||
(onSortOrderChanged)="sortOrderChanged($event)"> | ||
</question-table> | ||
</div> | ||
|
||
</div> | ||
</div> |
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.