Chocobozzz/PeerTube

View on GitHub
client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.html

Summary

Maintainability
Test Coverage
<ng-container *ngIf="plugin">

  <h2>
    <ng-container>{{ pluginTypeLabel }}</ng-container>
    {{ plugin.name }}
  </h2>

  <form *ngIf="hasRegisteredSettings()" (ngSubmit)="formValidated()" [formGroup]="form">
    <div class="form-group" *ngFor="let setting of registeredSettings" [id]="getWrapperId(setting)">
      <my-dynamic-form-field [hidden]="isSettingHidden(setting)" [form]="form" [setting]="setting" [formErrors]="formErrors"></my-dynamic-form-field>
    </div>

    <input type="submit" i18n value="Update plugin settings" [disabled]="!form.valid">
  </form>

  <div *ngIf="!hasRegisteredSettings()" i18n class="no-settings">
    This {{ pluginTypeLabel }} does not have settings.
  </div>

</ng-container>