diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-15 11:55:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-16 09:42:54 +0200 |
commit | db400f447a9f7aae1c56fa25396e93069744483f (patch) | |
tree | f45af832a5d3f4eebafd2f885b7413d9f84fa374 /client/src/app/core/confirm | |
parent | 54c3a22faa04bf13eea37f39be9149fc5eb95737 (diff) | |
download | PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.gz PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.tar.zst PeerTube-db400f447a9f7aae1c56fa25396e93069744483f.zip |
Upgrade to rxjs 6
Diffstat (limited to 'client/src/app/core/confirm')
-rw-r--r-- | client/src/app/core/confirm/confirm.service.ts | 9 |
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 @@ | |||
1 | import { first } from 'rxjs/operators' | ||
1 | import { Injectable } from '@angular/core' | 2 | import { Injectable } from '@angular/core' |
2 | import { Subject } from 'rxjs/Subject' | 3 | import { Subject } from 'rxjs' |
3 | import 'rxjs/add/operator/first' | ||
4 | import 'rxjs/add/operator/toPromise' | ||
5 | 4 | ||
6 | type ConfirmOptions = { | 5 | type 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 | } |