mirror of https://github.com/Chocobozzz/PeerTube
Improve account removal message for users
parent
bdb54e6f8c
commit
4edee628a0
|
@ -19,8 +19,13 @@ export class MyAccountDangerZoneComponent {
|
||||||
|
|
||||||
async deleteMe () {
|
async deleteMe () {
|
||||||
const res = await this.confirmService.confirmWithInput(
|
const res = await this.confirmService.confirmWithInput(
|
||||||
// eslint-disable-next-line max-len
|
$localize`Are you sure you want to delete your account?` +
|
||||||
$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.`,
|
'<br /><br />' +
|
||||||
|
// eslint-disable-next-line max-len
|
||||||
|
$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.` +
|
||||||
|
'<br /><br />' +
|
||||||
|
$localize`Content cached by other servers and other third-parties might make longer to be deleted.`,
|
||||||
|
|
||||||
$localize`Type your username to confirm`,
|
$localize`Type your username to confirm`,
|
||||||
this.user.username,
|
this.user.username,
|
||||||
$localize`Delete your account`,
|
$localize`Delete your account`,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
|
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
|
||||||
|
import { HtmlRendererService } from '@app/core'
|
||||||
import { ConfirmService } from '@app/core/confirm/confirm.service'
|
import { ConfirmService } from '@app/core/confirm/confirm.service'
|
||||||
import { POP_STATE_MODAL_DISMISS } from '@app/helpers'
|
import { POP_STATE_MODAL_DISMISS } from '@app/helpers'
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
||||||
|
@ -24,6 +25,7 @@ export class ConfirmComponent implements OnInit {
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private modalService: NgbModal,
|
private modalService: NgbModal,
|
||||||
|
private html: HtmlRendererService,
|
||||||
private confirmService: ConfirmService
|
private confirmService: ConfirmService
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
|
@ -31,14 +33,18 @@ export class ConfirmComponent implements OnInit {
|
||||||
this.confirmService.showConfirm.subscribe(
|
this.confirmService.showConfirm.subscribe(
|
||||||
({ title, message, expectedInputValue, inputLabel, confirmButtonText }) => {
|
({ title, message, expectedInputValue, inputLabel, confirmButtonText }) => {
|
||||||
this.title = title
|
this.title = title
|
||||||
this.message = message
|
|
||||||
|
|
||||||
this.inputLabel = inputLabel
|
this.inputLabel = inputLabel
|
||||||
this.expectedInputValue = expectedInputValue
|
this.expectedInputValue = expectedInputValue
|
||||||
|
|
||||||
this.confirmButtonText = confirmButtonText || $localize`Confirm`
|
this.confirmButtonText = confirmButtonText || $localize`Confirm`
|
||||||
|
|
||||||
this.showModal()
|
this.html.toSafeHtml(message)
|
||||||
|
.then(message => {
|
||||||
|
this.message = message
|
||||||
|
|
||||||
|
this.showModal()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue