Skip to content

Commit a1f4062

Browse files
committed
Optimizing and removing unnecessary code
1 parent 542b4ad commit a1f4062

26 files changed

+54
-189
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"core-js": "^2.4.1",
4444
"firebase": "^4.2.0",
4545
"hammerjs": "^2.0.8",
46-
"primeng": "^4.1.2",
4746
"rxjs": "^5.4.2",
4847
"ts-helpers": "*",
4948
"zone.js": "^0.8.16"
@@ -54,7 +53,7 @@
5453
"@types/jasmine": "^2.5.53",
5554
"@types/node": "^8.0.17",
5655
"codelyzer": "^3.1.2",
57-
"jasmine-core": "^2.6.4",
56+
"jasmine-core": "^2.7.0",
5857
"jasmine-spec-reporter": "^4.1.1",
5958
"karma": "^1.7.0",
6059
"karma-chrome-launcher": "^2.2.0",

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class AppComponent implements OnInit {
2020
messagingSenderId: '136985605193'
2121
});
2222

23-
// See users and messages in console log
23+
// See users, messages and keep in touch in console log
2424
const preUsers = document.getElementById('users')
2525
const dbRefUsers = firebase.database().ref().child('users');
2626
dbRefUsers.on('value', snap => console.log(snap.val()));

src/app/app.module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
FooterComponent,
2424
HeaderComponent,
2525
UserService,
26-
DataStorageService,
2726
AlertService,
2827
AuthGuardService,
2928
AuthService,
@@ -75,7 +74,6 @@ import { EmailMeComponent } from './components/email-me/email-me.component';
7574
],
7675
providers: [
7776
UserService,
78-
DataStorageService,
7977
AlertService,
8078
AuthGuardService,
8179
AuthService,

src/app/app.routing.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const appRoutes: Routes = [
4444
{ path: '**', component: PageNotFoundComponent }
4545
];
4646

47-
// Don't declare components here
4847
@NgModule({
4948
imports: [RouterModule.forRoot(appRoutes)],
5049
exports: [RouterModule]

src/app/components/about-me/about-me.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ <h1>About me</h1>
66
Maecenas dapibus nisl quis nulla tristique, vitae laoreet tellus convallis. Interdum et malesuada fames ac ante ipsum primis in faucibus.
77
In ultricies mattis rhoncus. Duis vestibulum tristique massa a fringilla. Suspendisse ut purus at massa elementum sollicitudin eu sit amet lacus.
88
Nullam sit amet nisi risus. In diam dui, aliquet a lectus eu, suscipit finibus lorem. Interdum et malesuada fames ac ante ipsum primis in faucibus.
9-
Integer vitae facilisis felis, quis cursus velit. Suspendisse nec consectetur mauris, ut placerat ex. Duis eu consectetur eros. Nulla facilisi.</p>
9+
Integer vitae facilisis felis, quis cursus velit. Suspendisse nec consectetur mauris, ut placerat ex. Duis eu consectetur eros. Nulla facilisi.
10+
</p>
1011

1112
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eleifend metus vel imperdiet cursus.
1213
Etiam pretium sem a metus tristique, ut luctus quam rutrum. Vivamus commodo venenatis nunc ut placerat.
@@ -15,7 +16,8 @@ <h1>About me</h1>
1516
Aliquam sem libero, mollis et leo id, semper finibus leo. Sed convallis leo ac tempor luctus. Integer metus arcu,
1617
imperdiet nec tincidunt at, sodales nec nulla. Nam suscipit urna eu vulputate aliquet. Vestibulum consequat nisl vel erat congue sollicitudin.
1718
Proin mattis ultrices blandit. Vivamus accumsan vulputate sem vel tincidunt. Etiam imperdiet imperdiet ante, sit amet suscipit tortor finibus maximus.
18-
Maecenas euismod pulvinar lorem.</p>
19+
Maecenas euismod pulvinar lorem.
20+
</p>
1921
</md-card>
2022
</div>
2123

src/app/components/about-me/about-me.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { Component, OnInit } from '@angular/core';
77
})
88
export class AboutMeComponent implements OnInit {
99

10-
answer: string;
11-
1210
constructor() { }
1311

1412
ngOnInit() {

src/app/components/auth/auth.module.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { CommonModule } from '@angular/common';
44
import { BrowserModule } from '@angular/platform-browser';
55
import { FormsModule } from '@angular/forms';
66
import { HttpModule } from '@angular/http';
7-
import { MdButtonModule, MdCheckboxModule, MdMenuModule, MdInputModule,
8-
MdToolbarModule, MdDialogModule, MdProgressBarModule, MaterialModule } from '@angular/material';
7+
import { MdButtonModule, MdInputModule, MdProgressBarModule, MaterialModule } from '@angular/material';
98
import { UsersRouting } from './users.routing'
109

1110
// Components
@@ -24,8 +23,7 @@ import { PhoneSigninComponent } from './phone-signin/phone-signin.component';
2423
BrowserModule,
2524
FormsModule,
2625
HttpModule,
27-
MdButtonModule, MdCheckboxModule, MdMenuModule, MdInputModule,
28-
MdToolbarModule, MdDialogModule, MdProgressBarModule, MaterialModule,
26+
MdButtonModule, MdInputModule, MdProgressBarModule, MaterialModule,
2927
UsersRouting
3028
],
3129
providers: [

src/app/components/auth/signin.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ <h3>Login</h3>
3333
<form (ngSubmit)="onSignin(f)" #f="ngForm">
3434
<md-input-container class="full-width">
3535
<!--<label for ="email">Mail</label>-->
36-
<input mdInput placeholder="Email" type="email" id="email" name="email" ngModel>
36+
<input mdInput placeholder="Email" type="email" id="email" name="email" ngModel required>
3737
</md-input-container>
3838
<md-input-container class="form-group">
3939
<!--<label for ="password">Password</label>-->
40-
<input mdInput placeholder="Password" type="password" id="password" name="password" ngModel>
40+
<input mdInput placeholder="Password" type="password" id="password" name="password" ngModel required>
4141
</md-input-container>
4242
<md-card-actions class="button">
4343
<button md-raised-button class="primary" type="submit" [disabled]="!f.valid">Login</button>

src/app/components/auth/signin.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
md-card {
22
width: 400px;
3-
height: 660px;
3+
height: 540px;
4+
// Height with Anonymous login:
5+
// height: 660px;
46
margin: 100px auto;
57
}
68

src/app/components/auth/signup.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ <h3>Or sign up with your email</h3>
3232
<form (ngSubmit)="onSignup(f)" #f="ngForm">
3333
<md-input-container class="full-width">
3434
<!--<label for ="email">Mail</label>-->
35-
<input mdInput placeholder="Email" type="email" id="email" name="email" ngModel>
35+
<input mdInput placeholder="Email" type="email" id="email" name="email" ngModel required>
3636
</md-input-container>
3737
<md-input-container class="form-group">
3838
<!--<label for ="password">Password</label>-->
39-
<input mdInput placeholder="Password" type="password" id="password" name="password" ngModel>
39+
<input mdInput placeholder="Password" type="password" id="password" name="password" ngModel required>
4040
</md-input-container>
4141
<md-card-actions class="button">
4242
<button md-raised-button class="primary" type="submit" [disabled]="!f.valid">Register</button>

0 commit comments

Comments
 (0)