aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-22 17:13:58 +0200
committerChocobozzz <me@florianbigard.com>2019-08-22 17:14:44 +0200
commit60c2bc80b82c71bd63bdb1fcf64d4d49491ce5c8 (patch)
treef9479065dc5d28bca46120ab0a29ed7074ab5fff /client/src/app/core
parent4334445d043252661e62cf97f76b67a2c43e3750 (diff)
downloadPeerTube-60c2bc80b82c71bd63bdb1fcf64d4d49491ce5c8.tar.gz
PeerTube-60c2bc80b82c71bd63bdb1fcf64d4d49491ce5c8.tar.zst
PeerTube-60c2bc80b82c71bd63bdb1fcf64d4d49491ce5c8.zip
Go back when cancel NSFW modal
Instead of redirecting on the homepage
Diffstat (limited to 'client/src/app/core')
-rw-r--r--client/src/app/core/confirm/confirm.service.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/core/confirm/confirm.service.ts b/client/src/app/core/confirm/confirm.service.ts
index 8419f622b..6e042c16b 100644
--- a/client/src/app/core/confirm/confirm.service.ts
+++ b/client/src/app/core/confirm/confirm.service.ts
@@ -18,12 +18,16 @@ export class ConfirmService {
18 confirm (message: string, title = '', confirmButtonText?: string) { 18 confirm (message: string, title = '', confirmButtonText?: string) {
19 this.showConfirm.next({ title, message, confirmButtonText }) 19 this.showConfirm.next({ title, message, confirmButtonText })
20 20
21 return this.confirmResponse.asObservable().pipe(first()).toPromise() 21 return this.confirmResponse.asObservable()
22 .pipe(first())
23 .toPromise()
22 } 24 }
23 25
24 confirmWithInput (message: string, inputLabel: string, expectedInputValue: string, title = '', confirmButtonText?: string) { 26 confirmWithInput (message: string, inputLabel: string, expectedInputValue: string, title = '', confirmButtonText?: string) {
25 this.showConfirm.next({ title, message, inputLabel, expectedInputValue, confirmButtonText }) 27 this.showConfirm.next({ title, message, inputLabel, expectedInputValue, confirmButtonText })
26 28
27 return this.confirmResponse.asObservable().pipe(first()).toPromise() 29 return this.confirmResponse.asObservable()
30 .pipe(first())
31 .toPromise()
28 } 32 }
29} 33}