-
Notifications
You must be signed in to change notification settings - Fork 0
added and incorporated basic presentation components #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f1768cb
added and incorporated basic presentation components
mhelmstadter e805945
Merge remote-tracking branch 'origin/master' into CreateLoginScreen
mhelmstadter 7194573
CreateLoginScreen- added to overall login screen UI
mhelmstadter 5cd5366
CreateLoginScreen- added models/eventemitters to components, modified UI
mhelmstadter 090d7df
CreateLoginScreen- just adding new lines
mhelmstadter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,8 +1,14 @@ | ||
| <!--The whole content below can be removed with the new code.--> | ||
| <div style="text-align:center"> | ||
| <h1> | ||
| {{title}}!! | ||
| </h1> | ||
| <app-login></app-login> | ||
| </div> | ||
|
|
||
| <div class="page"> | ||
| <app-toolbar title="UltiCar"></app-toolbar> | ||
| <div class="main"> | ||
| <div class="navLinks"> | ||
| <a [routerLink]="['']">Register</a> | ||
| <a [routerLink]="['/login']">Sign In</a> | ||
| </div> | ||
| <div id="routing"> | ||
| <div class="container"> | ||
| <router-outlet></router-outlet> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
This file contains hidden or 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,6 @@ | ||
| .page { | ||
| background-color: rgb(31, 95, 121); | ||
| } | ||
| .main { | ||
| text-align: center; | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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,15 +1,21 @@ | ||
| import { NgModule } from '@angular/core'; | ||
| import { CommonModule } from '@angular/common'; | ||
| import { FormsModule } from '@angular/forms'; | ||
| import { TextBoxComponent } from './components/presentation/text-box/text-box.component'; | ||
| import { LoginComponent } from './components/smart/login/login.component'; | ||
| import { CheckBoxComponent } from './components/presentation/check-box/check-box.component'; | ||
| import { ToolbarComponent } from './components/presentation/toolbar/toolbar.component'; | ||
| import { RaisedButtonComponent } from './components/presentation/raised-button/raised-button.component'; | ||
| import { BasicButtonComponent } from './components/presentation/basic-button/basic-button.component'; | ||
| import { IconButtonComponent } from './components/presentation/icon-button/icon-button.component'; | ||
| import { MatToolbarModule, MatCheckboxModule, MatButtonModule, MatFormFieldModule, MatFormFieldControl, MatInputModule, MatIconModule, MatCardModule } from '@angular/material'; | ||
|
|
||
| @NgModule({ | ||
| imports: [ | ||
| CommonModule | ||
| CommonModule, MatToolbarModule, MatCheckboxModule, MatButtonModule, MatFormFieldModule, MatInputModule, MatIconModule, MatCardModule, FormsModule | ||
| ], | ||
| declarations: [TextBoxComponent, LoginComponent, CheckBoxComponent], | ||
| exports: [ | ||
| LoginComponent, TextBoxComponent, CheckBoxComponent] | ||
| declarations: [TextBoxComponent, LoginComponent, CheckBoxComponent, ToolbarComponent, RaisedButtonComponent, BasicButtonComponent, IconButtonComponent], | ||
| exports: [ToolbarComponent], | ||
| }) | ||
|
|
||
| export class FeCommonModule { } |
1 change: 1 addition & 0 deletions
1
src/app/common/components/presentation/basic-button/basic-button.component.html
This file contains hidden or 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 @@ | ||
| <button mat-button [color]="color" (click)="click($event)">{{label}}</button> |
3 changes: 3 additions & 0 deletions
3
src/app/common/components/presentation/basic-button/basic-button.component.scss
This file contains hidden or 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,3 @@ | ||
| .mat-button { | ||
| min-width: 200px; | ||
| } |
24 changes: 24 additions & 0 deletions
24
src/app/common/components/presentation/basic-button/basic-button.component.ts
This file contains hidden or 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,24 @@ | ||
| import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-basic-button', | ||
| templateUrl: './basic-button.component.html', | ||
| styleUrls: ['./basic-button.component.scss'] | ||
| }) | ||
| export class BasicButtonComponent implements OnInit { | ||
|
|
||
| @Input() private label:string | ||
| @Input() private color:string | ||
|
|
||
| @Output() public clickEvent:EventEmitter<any> = new EventEmitter(); | ||
|
|
||
| constructor() { } | ||
|
|
||
| ngOnInit() { | ||
| } | ||
|
|
||
| click(event) { | ||
| this.clickEvent.emit(event); | ||
| } | ||
|
|
||
| } |
4 changes: 1 addition & 3 deletions
4
src/app/common/components/presentation/check-box/check-box.component.html
This file contains hidden or 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,3 +1 @@ | ||
| <p> | ||
| DRIVER-CHECKBOX | ||
| </p> | ||
| <mat-checkbox [color]="color" [(ngModel)]="checkboxValue" (ngModelChange)="onChange($event)">{{label}}</mat-checkbox> |
25 changes: 0 additions & 25 deletions
25
src/app/common/components/presentation/check-box/check-box.component.spec.ts
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
3 changes: 3 additions & 0 deletions
3
src/app/common/components/presentation/icon-button/icon-button.component.html
This file contains hidden or 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,3 @@ | ||
| <button mat-icon-button> | ||
| <mat-icon aria-label="icon-button" (click)="click($event)">{{icon}}</mat-icon> | ||
| </button> | ||
Empty file.
23 changes: 23 additions & 0 deletions
23
src/app/common/components/presentation/icon-button/icon-button.component.ts
This file contains hidden or 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,23 @@ | ||
| import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-icon-button', | ||
| templateUrl: './icon-button.component.html', | ||
| styleUrls: ['./icon-button.component.scss'] | ||
| }) | ||
| export class IconButtonComponent implements OnInit { | ||
|
|
||
| @Input() private icon:string; | ||
|
|
||
| @Output() public clickEvent:EventEmitter<any> = new EventEmitter(); | ||
|
|
||
| constructor() { } | ||
|
|
||
| ngOnInit() { | ||
| } | ||
|
|
||
| click($event) { | ||
| this.clickEvent.emit(event); | ||
| } | ||
|
|
||
| } |
1 change: 1 addition & 0 deletions
1
src/app/common/components/presentation/raised-button/raised-button.component.html
This file contains hidden or 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 @@ | ||
| <button mat-raised-button [color]="color" (click)="click($event)" [disabled]="disabled">{{label}}</button> |
3 changes: 3 additions & 0 deletions
3
src/app/common/components/presentation/raised-button/raised-button.component.scss
This file contains hidden or 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,3 @@ | ||
| .mat-raised-button { | ||
| min-width: 200px; | ||
| } |
26 changes: 26 additions & 0 deletions
26
src/app/common/components/presentation/raised-button/raised-button.component.ts
This file contains hidden or 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,26 @@ | ||
| import { Component, OnInit, Input, Output, HostListener, EventEmitter } from '@angular/core'; | ||
| import { RouterModule, Routes} from '@angular/router'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-raised-button', | ||
| templateUrl: './raised-button.component.html', | ||
| styleUrls: ['./raised-button.component.scss'] | ||
| }) | ||
| export class RaisedButtonComponent implements OnInit { | ||
|
|
||
| @Input() private label:string | ||
| @Input() private color:string | ||
| @Input() private disabled:string | ||
|
|
||
| @Output() public clickEvent:EventEmitter<any> = new EventEmitter(); | ||
|
|
||
| constructor() { } | ||
|
|
||
| ngOnInit() { | ||
| } | ||
|
|
||
| click(event) { | ||
| this.clickEvent.emit(event); | ||
| } | ||
|
|
||
| } |
8 changes: 7 additions & 1 deletion
8
src/app/common/components/presentation/text-box/text-box.component.html
This file contains hidden or 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 @@ | ||
| <input type="text" [id]="id" [placeholder]="placeholder" [value]="value" (click)="click($event)" /> | ||
| <div class="form-template"> | ||
| <mat-form-field [color]="primary"> | ||
| <input matInput placeholder={{placeholder}} [(ngModel)]="textboxValue" (ngModelChange)="onChange($event)" [type]="hide ? 'password' : 'text'"> | ||
| <mat-icon *ngIf="encryption" matSuffix (click)="hide = !hide">{{hide ? 'lock_outline' : 'lock_open'}}</mat-icon> | ||
| <mat-icon *ngIf="icon" matSuffix>{{icon}}</mat-icon> | ||
| </mat-form-field> | ||
| </div> |
25 changes: 0 additions & 25 deletions
25
src/app/common/components/presentation/text-box/text-box.component.spec.ts
This file was deleted.
Oops, something went wrong.
20 changes: 14 additions & 6 deletions
20
src/app/common/components/presentation/text-box/text-box.component.ts
This file contains hidden or 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,18 +1,26 @@ | ||
| import { Component, OnInit, Input } from '@angular/core'; | ||
| import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; | ||
| import { FormControl, Validators } from '@angular/forms'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-text-box', | ||
| templateUrl: './text-box.component.html', | ||
| styleUrls: ['./text-box.component.scss'] | ||
| }) | ||
| export class TextBoxComponent implements OnInit { | ||
| @Input() private id: string | ||
| @Input() private placeholder: string | ||
| private value: string | ||
| @Input() private id:string | ||
| @Input() private placeholder:string | ||
| @Input() private encryption:string | ||
| @Input() private icon:string | ||
| @Input() private textboxValue:string | ||
|
|
||
| @Output() textboxChange:EventEmitter<String> = new EventEmitter<String>(); | ||
|
|
||
| constructor() { } | ||
|
|
||
| ngOnInit() { | ||
| this.value = 'hello' | ||
| ngOnInit() {} | ||
|
|
||
| onChange(event) { | ||
| console.log(this.textboxValue); | ||
| } | ||
|
|
||
| } |
4 changes: 4 additions & 0 deletions
4
src/app/common/components/presentation/toolbar/toolbar.component.html
This file contains hidden or 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,4 @@ | ||
| <mat-toolbar color="primary"> | ||
| <app-icon-button icon="home" (click)="goHome($event)"></app-icon-button> | ||
| <span>{{title}}</span> | ||
| </mat-toolbar> |
11 changes: 11 additions & 0 deletions
11
src/app/common/components/presentation/toolbar/toolbar.component.scss
This file contains hidden or 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,11 @@ | ||
| .my-sidenav { | ||
| padding: 10px; | ||
| background-color:#00BCD4; | ||
| } | ||
|
|
||
| .sidenav-content { | ||
| display: flex; | ||
| height: 100%; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } |
21 changes: 21 additions & 0 deletions
21
src/app/common/components/presentation/toolbar/toolbar.component.ts
This file contains hidden or 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,21 @@ | ||
| import { Component, OnInit, Input } from '@angular/core'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-toolbar', | ||
| templateUrl: './toolbar.component.html', | ||
| styleUrls: ['./toolbar.component.scss'] | ||
| }) | ||
| export class ToolbarComponent implements OnInit { | ||
|
|
||
| @Input() private title:string | ||
|
|
||
| constructor() { } | ||
|
|
||
| ngOnInit() { | ||
| } | ||
|
|
||
| goHome(event) { | ||
| console.log("Clicked home: " + event); | ||
| } | ||
|
|
||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need a click event emitter