]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/modal/confirm.component.ts
Redesign register steps
[github/Chocobozzz/PeerTube.git] / client / src / app / modal / confirm.component.ts
index 457dd1f3f5eaae74671f7d513d4dc6f7e7ad7c7e..ec4e1d60fbf9e392ead3fadcc18971b20dbd0035 100644 (file)
@@ -1,4 +1,5 @@
 import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
+import { HtmlRendererService } from '@app/core'
 import { ConfirmService } from '@app/core/confirm/confirm.service'
 import { POP_STATE_MODAL_DISMISS } from '@app/helpers'
 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
@@ -24,6 +25,7 @@ export class ConfirmComponent implements OnInit {
 
   constructor (
     private modalService: NgbModal,
+    private html: HtmlRendererService,
     private confirmService: ConfirmService
   ) { }
 
@@ -31,14 +33,18 @@ export class ConfirmComponent implements OnInit {
     this.confirmService.showConfirm.subscribe(
       ({ title, message, expectedInputValue, inputLabel, confirmButtonText }) => {
         this.title = title
-        this.message = message
 
         this.inputLabel = inputLabel
         this.expectedInputValue = expectedInputValue
 
         this.confirmButtonText = confirmButtonText || $localize`Confirm`
 
-        this.showModal()
+        this.html.toSafeHtml(message)
+          .then(message => {
+            this.message = message
+
+            this.showModal()
+          })
       }
     )
   }