aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-07-18 15:39:10 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-07-18 15:39:10 +0200
commitbddab65ae58e347693b777cccf791201fdbcff4d (patch)
tree9d3c35c8ab9ef7bfb99ebe95b79c5309a7025112 /client/src/app/app.component.ts
parent0629423ce335137ce77d1ee8fe30fc0eee36d83b (diff)
downloadPeerTube-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.ts17
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 @@
1import { Component } from '@angular/core'; 1import { Component } from '@angular/core';
2import { HTTP_PROVIDERS } from '@angular/http'; 2import { HTTP_PROVIDERS } from '@angular/http';
3import { Router, ROUTER_DIRECTIVES } from '@angular/router'; 3import { ActivatedRoute, Router, ROUTER_DIRECTIVES } from '@angular/router';
4 4
5import { FriendService } from './friends'; 5import { FriendService } from './friends';
6import { 6import {
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();