2024-03-08 11:22:23 +01:00
|
|
|
import { Component, Input, booleanAttribute } from '@angular/core'
|
2023-07-31 14:34:36 +02:00
|
|
|
import { User, UserRegistration } from '@peertube/peertube-models'
|
2024-03-04 10:01:52 +01:00
|
|
|
import { NgIf } from '@angular/common'
|
2023-01-19 09:29:47 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'my-user-email-info',
|
|
|
|
templateUrl: './user-email-info.component.html',
|
2024-03-04 10:01:52 +01:00
|
|
|
styleUrls: [ './user-email-info.component.scss' ],
|
|
|
|
standalone: true,
|
|
|
|
imports: [ NgIf ]
|
2023-01-19 09:29:47 +01:00
|
|
|
})
|
|
|
|
export class UserEmailInfoComponent {
|
|
|
|
@Input() entry: User | UserRegistration
|
2024-03-08 11:22:23 +01:00
|
|
|
@Input({ transform: booleanAttribute }) showEmailVerifyInformation: boolean
|
2023-01-19 09:29:47 +01:00
|
|
|
|
|
|
|
getTitle () {
|
|
|
|
if (this.entry.emailVerified) {
|
|
|
|
return $localize`User email has been verified`
|
|
|
|
}
|
|
|
|
|
|
|
|
return $localize`User email hasn't been verified`
|
|
|
|
}
|
|
|
|
}
|