aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/following-add
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-22 15:29:32 +0100
committerChocobozzz <me@florianbigard.com>2018-02-22 15:29:32 +0100
commit1f30a1853e38c20a45722dbd6d38aaaec63839e8 (patch)
treecdce8cc9fcc62d9b3343c9478b1dbcefedcea972 /client/src/app/+admin/follows/following-add
parent78967fca4cacbc247fa6fb62d64b2d6825a10804 (diff)
downloadPeerTube-1f30a1853e38c20a45722dbd6d38aaaec63839e8.tar.gz
PeerTube-1f30a1853e38c20a45722dbd6d38aaaec63839e8.tar.zst
PeerTube-1f30a1853e38c20a45722dbd6d38aaaec63839e8.zip
Add confirm when admin use custom js/css
Diffstat (limited to 'client/src/app/+admin/follows/following-add')
-rw-r--r--client/src/app/+admin/follows/following-add/following-add.component.ts21
1 files changed, 9 insertions, 12 deletions
diff --git a/client/src/app/+admin/follows/following-add/following-add.component.ts b/client/src/app/+admin/follows/following-add/following-add.component.ts
index bf842129d..c296c8852 100644
--- a/client/src/app/+admin/follows/following-add/following-add.component.ts
+++ b/client/src/app/+admin/follows/following-add/following-add.component.ts
@@ -43,7 +43,7 @@ export class FollowingAddComponent {
43 } 43 }
44 } 44 }
45 45
46 addFollowing () { 46 async addFollowing () {
47 this.error = '' 47 this.error = ''
48 48
49 const hosts = this.getNotEmptyHosts() 49 const hosts = this.getNotEmptyHosts()
@@ -57,20 +57,17 @@ export class FollowingAddComponent {
57 } 57 }
58 58
59 const confirmMessage = 'If you confirm, you will send a follow request to:<br /> - ' + hosts.join('<br /> - ') 59 const confirmMessage = 'If you confirm, you will send a follow request to:<br /> - ' + hosts.join('<br /> - ')
60 this.confirmService.confirm(confirmMessage, 'Follow new server(s)').subscribe( 60 const res = await this.confirmService.confirm(confirmMessage, 'Follow new server(s)')
61 res => { 61 if (res === false) return
62 if (res === false) return
63 62
64 this.followService.follow(hosts).subscribe( 63 this.followService.follow(hosts).subscribe(
65 status => { 64 () => {
66 this.notificationsService.success('Success', 'Follow request(s) sent!') 65 this.notificationsService.success('Success', 'Follow request(s) sent!')
67 66
68 setTimeout(() => this.router.navigate([ '/admin/follows/following-list' ]), 500) 67 setTimeout(() => this.router.navigate([ '/admin/follows/following-list' ]), 500)
69 }, 68 },
70 69
71 err => this.notificationsService.error('Error', err.message) 70 err => this.notificationsService.error('Error', err.message)
72 )
73 }
74 ) 71 )
75 } 72 }
76 73