aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/admin/friends
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-09-06 22:40:57 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-09-06 22:40:57 +0200
commitab32b0fc805b92c5a1d7ac5901cb1a38e94622ca (patch)
tree1749a7390cf0a726a179c5fa554053f5c0f0e51c /client/src/app/admin/friends
parent088a967fe0bc285aa7811515f6a9655e1144b9f9 (diff)
downloadPeerTube-ab32b0fc805b92c5a1d7ac5901cb1a38e94622ca.tar.gz
PeerTube-ab32b0fc805b92c5a1d7ac5901cb1a38e94622ca.tar.zst
PeerTube-ab32b0fc805b92c5a1d7ac5901cb1a38e94622ca.zip
Dirty update to Angular RC6
Diffstat (limited to 'client/src/app/admin/friends')
-rw-r--r--client/src/app/admin/friends/friend-add/friend-add.component.ts14
-rw-r--r--client/src/app/admin/friends/friend-list/friend-list.component.ts4
-rw-r--r--client/src/app/admin/friends/friends.component.ts7
-rw-r--r--client/src/app/admin/friends/friends.routes.ts4
-rw-r--r--client/src/app/admin/friends/index.ts1
5 files changed, 12 insertions, 18 deletions
diff --git a/client/src/app/admin/friends/friend-add/friend-add.component.ts b/client/src/app/admin/friends/friend-add/friend-add.component.ts
index 2b2aceb8a..55aed9156 100644
--- a/client/src/app/admin/friends/friend-add/friend-add.component.ts
+++ b/client/src/app/admin/friends/friend-add/friend-add.component.ts
@@ -1,5 +1,5 @@
1import { Component, OnInit } from '@angular/core'; 1import { Component, OnInit } from '@angular/core';
2import { FormControl, FormGroup, REACTIVE_FORM_DIRECTIVES } from '@angular/forms'; 2import { FormControl, FormGroup } from '@angular/forms';
3import { Router } from '@angular/router'; 3import { Router } from '@angular/router';
4 4
5import { validateUrl } from '../../../shared'; 5import { validateUrl } from '../../../shared';
@@ -8,8 +8,7 @@ import { FriendService } from '../shared';
8@Component({ 8@Component({
9 selector: 'my-friend-add', 9 selector: 'my-friend-add',
10 template: require('./friend-add.component.html'), 10 template: require('./friend-add.component.html'),
11 styles: [ require('./friend-add.component.scss') ], 11 styles: [ require('./friend-add.component.scss') ]
12 directives: [ REACTIVE_FORM_DIRECTIVES ]
13}) 12})
14export class FriendAddComponent implements OnInit { 13export class FriendAddComponent implements OnInit {
15 friendAddForm: FormGroup; 14 friendAddForm: FormGroup;
@@ -80,12 +79,13 @@ export class FriendAddComponent implements OnInit {
80 79
81 this.friendService.makeFriends(notEmptyUrls).subscribe( 80 this.friendService.makeFriends(notEmptyUrls).subscribe(
82 status => { 81 status => {
83 if (status === 409) { 82 // TODO: extractdatastatus
84 alert('Already made friends!'); 83 // if (status === 409) {
85 } else { 84 // alert('Already made friends!');
85 // } else {
86 alert('Make friends request sent!'); 86 alert('Make friends request sent!');
87 this.router.navigate([ '/admin/friends/list' ]); 87 this.router.navigate([ '/admin/friends/list' ]);
88 } 88 // }
89 }, 89 },
90 error => alert(error) 90 error => alert(error)
91 ); 91 );
diff --git a/client/src/app/admin/friends/friend-list/friend-list.component.ts b/client/src/app/admin/friends/friend-list/friend-list.component.ts
index 38d4799a6..c76fc4df2 100644
--- a/client/src/app/admin/friends/friend-list/friend-list.component.ts
+++ b/client/src/app/admin/friends/friend-list/friend-list.component.ts
@@ -1,13 +1,11 @@
1import { Component, OnInit } from '@angular/core'; 1import { Component, OnInit } from '@angular/core';
2import { ROUTER_DIRECTIVES } from '@angular/router';
3 2
4import { Friend, FriendService } from '../shared'; 3import { Friend, FriendService } from '../shared';
5 4
6@Component({ 5@Component({
7 selector: 'my-friend-list', 6 selector: 'my-friend-list',
8 template: require('./friend-list.component.html'), 7 template: require('./friend-list.component.html'),
9 styles: [ require('./friend-list.component.scss') ], 8 styles: [ require('./friend-list.component.scss') ]
10 directives: [ ROUTER_DIRECTIVES ]
11}) 9})
12export class FriendListComponent implements OnInit { 10export class FriendListComponent implements OnInit {
13 friends: Friend[]; 11 friends: Friend[];
diff --git a/client/src/app/admin/friends/friends.component.ts b/client/src/app/admin/friends/friends.component.ts
index e66280f01..bc3f54158 100644
--- a/client/src/app/admin/friends/friends.component.ts
+++ b/client/src/app/admin/friends/friends.component.ts
@@ -1,12 +1,7 @@
1import { Component } from '@angular/core'; 1import { Component } from '@angular/core';
2import { ROUTER_DIRECTIVES } from '@angular/router';
3
4import { FriendService } from './shared';
5 2
6@Component({ 3@Component({
7 template: '<router-outlet></router-outlet>', 4 template: '<router-outlet></router-outlet>'
8 directives: [ ROUTER_DIRECTIVES ],
9 providers: [ FriendService ]
10}) 5})
11 6
12export class FriendsComponent { 7export class FriendsComponent {
diff --git a/client/src/app/admin/friends/friends.routes.ts b/client/src/app/admin/friends/friends.routes.ts
index 42b4a6c14..7fdef68f9 100644
--- a/client/src/app/admin/friends/friends.routes.ts
+++ b/client/src/app/admin/friends/friends.routes.ts
@@ -1,10 +1,10 @@
1import { RouterConfig } from '@angular/router'; 1import { Routes } from '@angular/router';
2 2
3import { FriendsComponent } from './friends.component'; 3import { FriendsComponent } from './friends.component';
4import { FriendAddComponent } from './friend-add'; 4import { FriendAddComponent } from './friend-add';
5import { FriendListComponent } from './friend-list'; 5import { FriendListComponent } from './friend-list';
6 6
7export const FriendsRoutes: RouterConfig = [ 7export const FriendsRoutes: Routes = [
8 { 8 {
9 path: 'friends', 9 path: 'friends',
10 component: FriendsComponent, 10 component: FriendsComponent,
diff --git a/client/src/app/admin/friends/index.ts b/client/src/app/admin/friends/index.ts
index f3110e31d..dd4df2538 100644
--- a/client/src/app/admin/friends/index.ts
+++ b/client/src/app/admin/friends/index.ts
@@ -1,4 +1,5 @@
1export * from './friend-add'; 1export * from './friend-add';
2export * from './friend-list'; 2export * from './friend-list';
3export * from './shared'; 3export * from './shared';
4export * from './friends.component';
4export * from './friends.routes'; 5export * from './friends.routes';