Skip to content

Commit

Permalink
Merge pull request #17 from iobodianskyi/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
iobodianskyi authored Feb 4, 2019
2 parents 062c057 + 408e389 commit b27fafa
Show file tree
Hide file tree
Showing 7 changed files with 886 additions and 271 deletions.
1,035 changes: 798 additions & 237 deletions package-lock.json

Large diffs are not rendered by default.

41 changes: 21 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notes",
"version": "1.0.1",
"version": "1.0.2",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand All @@ -9,29 +9,30 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^7.0.4",
"@angular/common": "^7.0.4",
"@angular/compiler": "^7.0.4",
"@angular/core": "^7.0.4",
"@angular/fire": "^5.1.0",
"@angular/forms": "^7.0.4",
"@angular/http": "^7.0.4",
"@angular/platform-browser": "^7.0.4",
"@angular/platform-browser-dynamic": "^7.0.4",
"@angular/router": "^7.0.4",
"@ng-bootstrap/ng-bootstrap": "^4.0.0",
"bootstrap": "^4.1.3",
"core-js": "^2.5.4",
"firebase": "^5.5.9",
"@angular/animations": "^7.2.3",
"@angular/common": "^7.2.3",
"@angular/compiler": "^7.2.3",
"@angular/core": "^7.2.3",
"@angular/fire": "^5.1.1",
"@angular/forms": "^7.2.3",
"@angular/http": "^7.2.3",
"@angular/platform-browser": "^7.2.3",
"@angular/platform-browser-dynamic": "^7.2.3",
"@angular/router": "^7.2.3",
"@ng-bootstrap/ng-bootstrap": "^4.0.2",
"bootstrap": "^4.2.1",
"core-js": "^2.6.3",
"firebase": "^5.8.2",
"ngx-toastr": "^9.1.1",
"rxjs": "~6.3.3",
"zone.js": "~0.8.26"
"zone.js": "^0.8.29"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.13.0",
"@angular/cli": "^7.0.6",
"@angular/compiler-cli": "^7.0.4",
"@angular/language-service": "^7.0.4",
"@types/node": "^10.12.10",
"@angular/cli": "^7.3.0",
"@angular/compiler-cli": "^7.2.3",
"@angular/language-service": "^7.2.3",
"@types/node": "^10.12.21",
"codelyzer": "^4.5.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
Expand Down
9 changes: 8 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ToastrModule } from 'ngx-toastr';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
Expand Down Expand Up @@ -37,7 +39,12 @@ import { FooterComponent } from './home/footer/footer.component';
NgbModule,
AngularFireModule.initializeApp(environment.firebase),
AngularFireAuthModule,
AngularFirestoreModule
AngularFirestoreModule,
BrowserAnimationsModule,
ToastrModule.forRoot({
positionClass: 'toast-bottom-center',
preventDuplicates: true
})
],
providers: [],
bootstrap: [AppComponent]
Expand Down
9 changes: 5 additions & 4 deletions src/app/services/account.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import { User } from 'firebase';
import { AppUser } from '../models/user';
import { Observable, of } from 'rxjs';
import { UtilsService } from './utils.service';
import { ToastrService } from 'ngx-toastr';

@Injectable({ providedIn: 'root' })
export class AccountService {
constructor(
private router: Router,
private firebaseAuth: AngularFireAuth,
private firebaseStore: AngularFirestore,
private utils: UtilsService) {
private utils: UtilsService,
private toastr: ToastrService) {
this.firebaseAuth.authState
.subscribe((user) => {
if (!user) { this.router.navigate([this.utils.routes.root]); }
Expand Down Expand Up @@ -47,9 +49,8 @@ export class AccountService {
if (result.user) {
this.updateAppUser(result.user);
}
}).catch(function (error) {
const errorMessage = error.message;
console.log(error.message);
}).catch((error) => {
this.toastr.info(error.message);
});
}

Expand Down
11 changes: 11 additions & 0 deletions src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const environment = {
production: true,
firebase: {
apiKey: '',
authDomain: '',
databaseURL: '',
projectId: '',
storageBucket: '',
messagingSenderId: ''
}
};
24 changes: 24 additions & 0 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false,
firebase: {
apiKey: '',
authDomain: '',
databaseURL: '',
projectId: '',
storageBucket: '',
messagingSenderId: ''
}
};

/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeNote`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
28 changes: 19 additions & 9 deletions src/styles.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import '~ngx-toastr/toastr.css';
// common
$gray: #C6C2C2
Expand Down Expand Up @@ -41,7 +42,7 @@ a

.boxed
background-color: #fff
border-radius: $radius
border-radius: $radius

.btn
border-radius: $radius
Expand All @@ -68,7 +69,7 @@ input::placeholder

.animated
transition: $transition

.pointer
cursor: pointer

Expand Down Expand Up @@ -182,9 +183,9 @@ header
color: #fff
font-size: 22px
letter-spacing: 2px

&::placeholder
color: #fff !important
color: #fff !important

.color-option
max-width: 140px
Expand Down Expand Up @@ -218,7 +219,7 @@ header
top: -35px
font-size: 25px

&.collapsed
&.collapsed
transform: translateY(40px)

.nav-content
Expand Down Expand Up @@ -256,7 +257,7 @@ header
height: 25px
margin-right: 10px

&:last-child
&:last-child
margin-right: 0

.color
Expand Down Expand Up @@ -300,7 +301,7 @@ header
border-top: none
border-radius: 20px

&:hover
&:hover
.options-container
top: 5px

Expand Down Expand Up @@ -398,10 +399,19 @@ header

&:hover
opacity: 1

.undo-box
font-size: 14px

.toast-container
.toast
width: 400px
border-radius: 22px
background-color: #7b7b7b

&.toast-bottom-center
bottom: 14px

// media
// Extra small devices (portrait phones, less than 576px)
Expand Down Expand Up @@ -483,4 +493,4 @@ header
// @media (min-width: 992px) and (max-width: 1199.98px)
// // Extra large devices (large desktops, 1200px and up)
// @media (min-width: 1200px)
// @media (min-width: 1200px)

0 comments on commit b27fafa

Please sign in to comment.