aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/confirm/confirm.service.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-15 11:55:51 +0200
committerChocobozzz <me@florianbigard.com>2018-05-16 09:42:54 +0200
commitdb400f447a9f7aae1c56fa25396e93069744483f (patch)
treef45af832a5d3f4eebafd2f885b7413d9f84fa374 /client/src/app/core/confirm/confirm.service.ts
parent54c3a22faa04bf13eea37f39be9149fc5eb95737 (diff)
downloadPeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.gz
PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.zst
PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.zip
Upgrade to rxjs 6
Diffstat (limited to 'client/src/app/core/confirm/confirm.service.ts')
-rw-r--r--client/src/app/core/confirm/confirm.service.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/app/core/confirm/confirm.service.ts b/client/src/app/core/confirm/confirm.service.ts
index d99226f05..8419f622b 100644
--- a/client/src/app/core/confirm/confirm.service.ts
+++ b/client/src/app/core/confirm/confirm.service.ts
@@ -1,7 +1,6 @@
1import { first } from 'rxjs/operators'
1import { Injectable } from '@angular/core' 2import { Injectable } from '@angular/core'
2import { Subject } from 'rxjs/Subject' 3import { Subject } from 'rxjs'
3import 'rxjs/add/operator/first'
4import 'rxjs/add/operator/toPromise'
5 4
6type ConfirmOptions = { 5type ConfirmOptions = {
7 title: string 6 title: string
@@ -19,12 +18,12 @@ export class ConfirmService {
19 confirm (message: string, title = '', confirmButtonText?: string) { 18 confirm (message: string, title = '', confirmButtonText?: string) {
20 this.showConfirm.next({ title, message, confirmButtonText }) 19 this.showConfirm.next({ title, message, confirmButtonText })
21 20
22 return this.confirmResponse.asObservable().first().toPromise() 21 return this.confirmResponse.asObservable().pipe(first()).toPromise()
23 } 22 }
24 23
25 confirmWithInput (message: string, inputLabel: string, expectedInputValue: string, title = '', confirmButtonText?: string) { 24 confirmWithInput (message: string, inputLabel: string, expectedInputValue: string, title = '', confirmButtonText?: string) {
26 this.showConfirm.next({ title, message, inputLabel, expectedInputValue, confirmButtonText }) 25 this.showConfirm.next({ title, message, inputLabel, expectedInputValue, confirmButtonText })
27 26
28 return this.confirmResponse.asObservable().first().toPromise() 27 return this.confirmResponse.asObservable().pipe(first()).toPromise()
29 } 28 }
30} 29}