diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-22 13:48:09 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-02-22 13:48:09 +0100 |
commit | f7298d0dcc247fe3be94ec1e00351942a079a44b (patch) | |
tree | 6bcb9935ab00101115be003c988a8211fc260d8c /client/src/app/modal/confirm.component.ts | |
parent | 0d9a327df33e42a0f34caaf2cbff5f74e4d78426 (diff) | |
parent | ac5f679ad60fc48db6d9a9534a8ac5fd20eda36f (diff) | |
download | PeerTube-f7298d0dcc247fe3be94ec1e00351942a079a44b.tar.gz PeerTube-f7298d0dcc247fe3be94ec1e00351942a079a44b.tar.zst PeerTube-f7298d0dcc247fe3be94ec1e00351942a079a44b.zip |
Merge branch 'release/4.1.0' into develop
Diffstat (limited to 'client/src/app/modal/confirm.component.ts')
-rw-r--r-- | client/src/app/modal/confirm.component.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/app/modal/confirm.component.ts b/client/src/app/modal/confirm.component.ts index 457dd1f3f..ec4e1d60f 100644 --- a/client/src/app/modal/confirm.component.ts +++ b/client/src/app/modal/confirm.component.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' |
2 | import { HtmlRendererService } from '@app/core' | ||
2 | import { ConfirmService } from '@app/core/confirm/confirm.service' | 3 | import { ConfirmService } from '@app/core/confirm/confirm.service' |
3 | import { POP_STATE_MODAL_DISMISS } from '@app/helpers' | 4 | import { POP_STATE_MODAL_DISMISS } from '@app/helpers' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
@@ -24,6 +25,7 @@ export class ConfirmComponent implements OnInit { | |||
24 | 25 | ||
25 | constructor ( | 26 | constructor ( |
26 | private modalService: NgbModal, | 27 | private modalService: NgbModal, |
28 | private html: HtmlRendererService, | ||
27 | private confirmService: ConfirmService | 29 | private confirmService: ConfirmService |
28 | ) { } | 30 | ) { } |
29 | 31 | ||
@@ -31,14 +33,18 @@ export class ConfirmComponent implements OnInit { | |||
31 | this.confirmService.showConfirm.subscribe( | 33 | this.confirmService.showConfirm.subscribe( |
32 | ({ title, message, expectedInputValue, inputLabel, confirmButtonText }) => { | 34 | ({ title, message, expectedInputValue, inputLabel, confirmButtonText }) => { |
33 | this.title = title | 35 | this.title = title |
34 | this.message = message | ||
35 | 36 | ||
36 | this.inputLabel = inputLabel | 37 | this.inputLabel = inputLabel |
37 | this.expectedInputValue = expectedInputValue | 38 | this.expectedInputValue = expectedInputValue |
38 | 39 | ||
39 | this.confirmButtonText = confirmButtonText || $localize`Confirm` | 40 | this.confirmButtonText = confirmButtonText || $localize`Confirm` |
40 | 41 | ||
41 | this.showModal() | 42 | this.html.toSafeHtml(message) |
43 | .then(message => { | ||
44 | this.message = message | ||
45 | |||
46 | this.showModal() | ||
47 | }) | ||
42 | } | 48 | } |
43 | ) | 49 | ) |
44 | } | 50 | } |