mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
updating packages
This commit is contained in:
parent
2f193b5477
commit
e1b54d1ff2
@ -7,7 +7,7 @@ import {AuthenticationService} from "./model/authentication.service";
|
||||
import {GalleryComponent} from "./gallery/gallery.component";
|
||||
import {OnInit} from "angular2/core";
|
||||
import {User} from "../../common/entities/User";
|
||||
import {Router, Location} from "angular2/router";
|
||||
import {Router} from "angular2/router";
|
||||
import {HTTP_PROVIDERS} from "angular2/http";
|
||||
import {UserService} from "./model/user.service";
|
||||
import {GalleryService} from "./gallery/gallery.service";
|
||||
@ -51,7 +51,7 @@ import {ViewportHelper} from "ng2-material/core/util/viewport";
|
||||
])
|
||||
export class AppComponent implements OnInit{
|
||||
|
||||
constructor(private _router: Router, private _location:Location, private _authenticationService: AuthenticationService){
|
||||
constructor(private _router: Router, private _authenticationService: AuthenticationService){
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
import {Component, OnInit} from 'angular2/core';
|
||||
import {AuthenticationService} from "../model/authentication.service";
|
||||
import {Router, Location, RouteParams} from "angular2/router";
|
||||
import {Router, RouteParams} from "angular2/router";
|
||||
import {GalleryService} from "./gallery.service";
|
||||
import {Directory} from "../../../common/entities/Directory";
|
||||
import {Message} from "../../../common/entities/Message";
|
||||
@ -33,7 +33,6 @@ export class GalleryComponent implements OnInit{
|
||||
|
||||
ngOnInit(){
|
||||
if (!this._authService.isAuthenticated()) {
|
||||
// this._location.replaceState('/'); // clears browser history so they can't navigate with back button
|
||||
this._router.navigate(['Login']);
|
||||
return;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
import {Component, OnInit} from 'angular2/core';
|
||||
import {LoginCredential} from '../../../common/entities/LoginCredential';
|
||||
import {AuthenticationService} from "../model/authentication.service";
|
||||
import {Router, Location} from "angular2/router";
|
||||
import {Router} from "angular2/router";
|
||||
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
|
||||
import {FORM_DIRECTIVES} from "angular2/common";
|
||||
import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all";
|
||||
@ -18,13 +18,12 @@ import {ViewportHelper} from "ng2-material/all";
|
||||
})
|
||||
export class LoginComponent implements OnInit{
|
||||
loginCredential: LoginCredential;
|
||||
constructor(private _authService: AuthenticationService, private _router: Router, private _location:Location) {
|
||||
constructor(private _authService: AuthenticationService, private _router: Router) {
|
||||
this.loginCredential = new LoginCredential();
|
||||
}
|
||||
|
||||
ngOnInit(){
|
||||
if (this._authService.isAuthenticated()) {
|
||||
// this._location.replaceState('/'); // clears browser history so they can't navigate with back button
|
||||
this._router.navigate(['Gallery']);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
"url": "https://github.com/bpatrik/PiGallery2/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"angular2": "^2.0.0-beta.15",
|
||||
"angular2": "^2.0.0-beta.16",
|
||||
"body-parser": "^1.15.0",
|
||||
"core-js": "^2.3.0",
|
||||
"debug": "^2.2.0",
|
||||
@ -39,14 +39,15 @@
|
||||
"ng2-cookies": "^0.1.5",
|
||||
"ng2-material": "^0.3.7",
|
||||
"optimist": "^0.6.1",
|
||||
"protractor": "^3.3.0",
|
||||
"remap-istanbul": "^0.6.3",
|
||||
"rxjs": "5.0.0-beta.2",
|
||||
"style-loader": "^0.13.1",
|
||||
"ts-loader": "^0.8.2",
|
||||
"tslint": "^3.8.0",
|
||||
"tslint": "^3.8.1",
|
||||
"tslint-loader": "^2.1.4",
|
||||
"typescript": "^1.8.10",
|
||||
"typings": "^0.7.9",
|
||||
"typings": "^0.8.1",
|
||||
"webpack": "^1.13.0",
|
||||
"zone.js": "^0.6.12"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user