Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

1.5 KB
Raw Blame
@if (error) {
  <my-alert type="danger">{{ error }}</my-alert>
}
@if (success) {
  <my-alert type="success">{{ success }}</my-alert>
}

@if (user.pendingEmail) {
  <div class="pending-email">
    <div i18n>
      <strong>{{ user.pendingEmail }}</strong> is awaiting email verification.
    </div>

    @if (verificationEmailSent) {
      <div i18n>Email verification sent!</div>
    } @else {
      <button type="button" class="peertube-button-like-link" i18n (click)="resendVerificationEmail()">Resend your verification email</button>
    }
  </div>
}

<form class="change-email" (ngSubmit)="changeEmail()" [formGroup]="form">

  <div class="form-group">
    <label i18n for="new-email">Change your email</label>

    <div i18n class="form-group-description">
      Your current email is <strong>{{ user.email }}</strong>
    </div>

    <input
      type="email" id="new-email" i18n-placeholder placeholder="New email" class="form-control"
      formControlName="new-email" [ngClass]="{ 'input-error': formErrors['new-email'] }"
      >

    @if (formErrors['new-email']) {
      <div class="form-error" role="alert">{{ formErrors['new-email'] }}</div>
    }
  </div>

  <div class="form-group">
    <my-input-text
      formControlName="password" inputId="password" i18n-placeholder placeholder="Current password"
      [formError]="formErrors['password']" autocomplete="current-password"
    ></my-input-text>
  </div>

  <input class="peertube-button primary-button" type="submit" i18n-value value="Change email" [disabled]="!form.valid">
</form>