diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-07-18 15:39:10 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-07-18 15:39:10 +0200 |
commit | bddab65ae58e347693b777cccf791201fdbcff4d (patch) | |
tree | 9d3c35c8ab9ef7bfb99ebe95b79c5309a7025112 /client/src/app/app.component.ts | |
parent | 0629423ce335137ce77d1ee8fe30fc0eee36d83b (diff) | |
download | PeerTube-bddab65ae58e347693b777cccf791201fdbcff4d.tar.gz PeerTube-bddab65ae58e347693b777cccf791201fdbcff4d.tar.zst PeerTube-bddab65ae58e347693b777cccf791201fdbcff4d.zip |
Client: save page params as well
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r-- | client/src/app/app.component.ts | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 88b181f9c..354d00a7a 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -1,12 +1,11 @@ | |||
1 | import { Component } from '@angular/core'; | 1 | import { Component } from '@angular/core'; |
2 | import { HTTP_PROVIDERS } from '@angular/http'; | 2 | import { HTTP_PROVIDERS } from '@angular/http'; |
3 | import { Router, ROUTER_DIRECTIVES } from '@angular/router'; | 3 | import { ActivatedRoute, Router, ROUTER_DIRECTIVES } from '@angular/router'; |
4 | 4 | ||
5 | import { FriendService } from './friends'; | 5 | import { FriendService } from './friends'; |
6 | import { | 6 | import { |
7 | AuthService, | 7 | AuthService, |
8 | AuthStatus, | 8 | AuthStatus, |
9 | Search, | ||
10 | SearchComponent, | 9 | SearchComponent, |
11 | SearchService | 10 | SearchService |
12 | } from './shared'; | 11 | } from './shared'; |
@@ -27,6 +26,7 @@ export class AppComponent { | |||
27 | constructor( | 26 | constructor( |
28 | private authService: AuthService, | 27 | private authService: AuthService, |
29 | private friendService: FriendService, | 28 | private friendService: FriendService, |
29 | private route: ActivatedRoute, | ||
30 | private router: Router | 30 | private router: Router |
31 | ) { | 31 | ) { |
32 | this.isLoggedIn = this.authService.isLoggedIn(); | 32 | this.isLoggedIn = this.authService.isLoggedIn(); |
@@ -40,19 +40,6 @@ export class AppComponent { | |||
40 | ); | 40 | ); |
41 | } | 41 | } |
42 | 42 | ||
43 | onSearch(search: Search) { | ||
44 | if (search.value !== '') { | ||
45 | const params = { | ||
46 | field: search.field, | ||
47 | search: search.value | ||
48 | }; | ||
49 | |||
50 | this.router.navigate(['/videos/list', params]); | ||
51 | } else { | ||
52 | this.router.navigate(['/videos/list']); | ||
53 | } | ||
54 | } | ||
55 | |||
56 | // FIXME | 43 | // FIXME |
57 | logout() { | 44 | logout() { |
58 | // this._authService.logout(); | 45 | // this._authService.logout(); |