mirror of https://github.com/Chocobozzz/PeerTube
Clearer public email if email is not verified
parent
10e78bb778
commit
7e573616d9
|
@ -687,9 +687,9 @@
|
||||||
<label for="servicesTwitterUsername" i18n>Your Twitter/X username</label>
|
<label for="servicesTwitterUsername" i18n>Your Twitter/X username</label>
|
||||||
|
|
||||||
<div class="label-small-info">
|
<div class="label-small-info">
|
||||||
<p class="mb-0">Indicates the Twitter/X account for the website or platform where the content was published.</p>
|
<p i18n class="mb-0">Indicates the Twitter/X account for the website or platform where the content was published.</p>
|
||||||
|
|
||||||
<p>This is just an extra information injected in PeerTube HTML that is required by Twitter/X. If you don't have a Twitter/X account, just leave the default value.</p>
|
<p i18n>This is just an extra information injected in PeerTube HTML that is required by Twitter/X. If you don't have a Twitter/X account, just leave the default value.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<my-user-email-info [entry]="registration" [requiresEmailVerification]="requiresEmailVerification"></my-user-email-info>
|
<my-user-email-info [entry]="registration" [showEmailVerifyInformation]="requiresEmailVerification"></my-user-email-info>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td *ngIf="isSelected('email')">
|
<td *ngIf="isSelected('email')">
|
||||||
<my-user-email-info [entry]="user" [requiresEmailVerification]="requiresEmailVerification"></my-user-email-info>
|
<my-user-email-info [entry]="user" showEmailVerifyInformation="true"></my-user-email-info>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td *ngIf="isSelected('quota')">
|
<td *ngIf="isSelected('quota')">
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<a [href]="'mailto:' + entry.email" [title]="getTitle()">
|
<a [href]="'mailto:' + entry.email" [title]="getTitle()">
|
||||||
<ng-container *ngIf="!requiresEmailVerification">
|
@if (showEmailVerifyInformation) {
|
||||||
{{ entry.email }}
|
@if (entry.emailVerified === true) {
|
||||||
</ng-container>
|
✓ {{ entry.email }}
|
||||||
|
} @else {
|
||||||
<ng-container *ngIf="requiresEmailVerification">
|
|
||||||
<em *ngIf="!entry.emailVerified">? {{ entry.email }}</em>
|
<em *ngIf="!entry.emailVerified">? {{ entry.email }}</em>
|
||||||
|
}
|
||||||
<ng-container *ngIf="entry.emailVerified === true">✓ {{ entry.email }}</ng-container>
|
} @else {
|
||||||
</ng-container>
|
{{ entry.email }}
|
||||||
|
}
|
||||||
</a>
|
</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, Input } from '@angular/core'
|
import { Component, Input, booleanAttribute } from '@angular/core'
|
||||||
import { User, UserRegistration } from '@peertube/peertube-models'
|
import { User, UserRegistration } from '@peertube/peertube-models'
|
||||||
import { NgIf } from '@angular/common'
|
import { NgIf } from '@angular/common'
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import { NgIf } from '@angular/common'
|
||||||
})
|
})
|
||||||
export class UserEmailInfoComponent {
|
export class UserEmailInfoComponent {
|
||||||
@Input() entry: User | UserRegistration
|
@Input() entry: User | UserRegistration
|
||||||
@Input() requiresEmailVerification: boolean
|
@Input({ transform: booleanAttribute }) showEmailVerifyInformation: boolean
|
||||||
|
|
||||||
getTitle () {
|
getTitle () {
|
||||||
if (this.entry.emailVerified) {
|
if (this.entry.emailVerified) {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import { forkJoin } from 'rxjs'
|
import { NgClass, NgIf } from '@angular/common'
|
||||||
import { tap } from 'rxjs/operators'
|
|
||||||
import { Component, OnInit } from '@angular/core'
|
import { Component, OnInit } from '@angular/core'
|
||||||
import { AuthService, Notifier, ServerService, UserService } from '@app/core'
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
|
||||||
|
import { AuthService, ServerService, UserService } from '@app/core'
|
||||||
import { USER_EMAIL_VALIDATOR, USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
|
import { USER_EMAIL_VALIDATOR, USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
|
||||||
import { FormReactive } from '@app/shared/shared-forms/form-reactive'
|
import { FormReactive } from '@app/shared/shared-forms/form-reactive'
|
||||||
import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
|
import { FormReactiveService } from '@app/shared/shared-forms/form-reactive.service'
|
||||||
import { HttpStatusCode, User } from '@peertube/peertube-models'
|
import { HttpStatusCode, User } from '@peertube/peertube-models'
|
||||||
|
import { forkJoin } from 'rxjs'
|
||||||
|
import { tap } from 'rxjs/operators'
|
||||||
import { InputTextComponent } from '../../../shared/shared-forms/input-text.component'
|
import { InputTextComponent } from '../../../shared/shared-forms/input-text.component'
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
|
|
||||||
import { NgIf, NgClass } from '@angular/common'
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-account-change-email',
|
selector: 'my-account-change-email',
|
||||||
|
@ -26,8 +26,7 @@ export class MyAccountChangeEmailComponent extends FormReactive implements OnIni
|
||||||
protected formReactiveService: FormReactiveService,
|
protected formReactiveService: FormReactiveService,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private userService: UserService,
|
private userService: UserService,
|
||||||
private serverService: ServerService,
|
private serverService: ServerService
|
||||||
private notifier: Notifier
|
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,13 @@
|
||||||
i18n-labelText labelText="Allow email to be publicly displayed"
|
i18n-labelText labelText="Allow email to be publicly displayed"
|
||||||
>
|
>
|
||||||
<ng-container ngProjectAs="description">
|
<ng-container ngProjectAs="description">
|
||||||
<span i18n>Necessary to claim podcast RSS feeds.</span>
|
<p class="mb-0">
|
||||||
|
@if (user.emailVerified) {
|
||||||
|
<ng-container i18n>Necessary to claim podcast RSS feeds.</ng-container>
|
||||||
|
} @else {
|
||||||
|
<ng-container i18n>⚠️ Your email cannot be used in podcast RSS feeds because it has not yet been verified.</ng-container>
|
||||||
|
}
|
||||||
|
</p>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</my-peertube-checkbox>
|
</my-peertube-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<div class="content-col">
|
<div class="content-col">
|
||||||
<my-actor-avatar-edit
|
<my-actor-avatar-edit
|
||||||
class="d-block mb-3"
|
*ngIf="user?.account" class="d-block mb-3"
|
||||||
actorType="account" [avatars]="user.account.avatars"
|
actorType="account" [avatars]="user.account.avatars"
|
||||||
[displayName]="user.account.displayName" [username]="user.username" [subscribers]="user.account.followersCount"
|
[displayName]="user.account.displayName" [username]="user.username" [subscribers]="user.account.followersCount"
|
||||||
(avatarChange)="onAvatarChange($event)" (avatarDelete)="onAvatarDelete()"
|
(avatarChange)="onAvatarChange($event)" (avatarDelete)="onAvatarDelete()"
|
||||||
|
|
Loading…
Reference in New Issue