aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts9
-rw-r--r--client/src/app/modal/confirm.component.ts10
2 files changed, 15 insertions, 4 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts
index 4a46f1ad9..2bae3499e 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts
@@ -19,8 +19,13 @@ export class MyAccountDangerZoneComponent {
19 19
20 async deleteMe () { 20 async deleteMe () {
21 const res = await this.confirmService.confirmWithInput( 21 const res = await this.confirmService.confirmWithInput(
22 // eslint-disable-next-line max-len 22 $localize`Are you sure you want to delete your account?` +
23 $localize`Are you sure you want to delete your account? This will delete all your data, including channels, videos and comments. Content cached by other servers and other third-parties might make longer to be deleted.`, 23 '<br /><br />' +
24 // eslint-disable-next-line max-len
25 $localize`This will delete all your data, including channels, videos, comments and you won't be able to create another user on this instance with "${this.user.username}" username.` +
26 '<br /><br />' +
27 $localize`Content cached by other servers and other third-parties might make longer to be deleted.`,
28
24 $localize`Type your username to confirm`, 29 $localize`Type your username to confirm`,
25 this.user.username, 30 this.user.username,
26 $localize`Delete your account`, 31 $localize`Delete your account`,
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 @@
1import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' 1import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
2import { HtmlRendererService } from '@app/core'
2import { ConfirmService } from '@app/core/confirm/confirm.service' 3import { ConfirmService } from '@app/core/confirm/confirm.service'
3import { POP_STATE_MODAL_DISMISS } from '@app/helpers' 4import { POP_STATE_MODAL_DISMISS } from '@app/helpers'
4import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 5import { 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 }