]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/core/confirm/confirm.service.ts
Client: Fix Javascript OOM error during webpack compilation (#89)
[github/Chocobozzz/PeerTube.git] / client / src / app / core / confirm / confirm.service.ts
CommitLineData
df98563e
C
1import { Injectable } from '@angular/core'
2import { Subject } from 'rxjs/Subject'
3import 'rxjs/add/operator/first'
5769e1db
C
4
5@Injectable()
6export class ConfirmService {
df98563e
C
7 showConfirm = new Subject<{ title, message }>()
8 confirmResponse = new Subject<boolean>()
5769e1db 9
df98563e
C
10 confirm (message = '', title = '') {
11 this.showConfirm.next({ title, message })
5769e1db 12
df98563e 13 return this.confirmResponse.asObservable().first()
5769e1db
C
14 }
15}