]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.html
Add markdown support to plugins (#2654)
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / plugins / plugin-show-installed / plugin-show-installed.component.html
1 <ng-container *ngIf="plugin">
2
3 <h2>
4 <ng-container>{{ pluginTypeLabel }}</ng-container>
5 {{ plugin.name }}
6 </h2>
7
8 <form *ngIf="hasRegisteredSettings()" role="form" (ngSubmit)="formValidated()" [formGroup]="form">
9 <div class="form-group" *ngFor="let setting of registeredSettings">
10 <label *ngIf="setting.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label>
11
12 <input *ngIf="setting.type === 'input'" type="text" [id]="setting.name" [formControlName]="setting.name" />
13
14 <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea>
15
16 <my-help *ngIf="setting.type === 'markdown-text'" helpType="markdownText"></my-help>
17
18 <my-help *ngIf="setting.type === 'markdown-enhanced'" helpType="markdownEnhanced"></my-help>
19
20 <my-markdown-textarea
21 *ngIf="setting.type === 'markdown-text'"
22 markdownType="text" [id]="setting.name" [formControlName]="setting.name" textareaWidth="500px" [previewColumn]="false"
23 [classes]="{ 'input-error': formErrors['settings.name'] }"
24 ></my-markdown-textarea>
25
26 <my-markdown-textarea
27 *ngIf="setting.type === 'markdown-enhanced'"
28 markdownType="enhanced" [id]="setting.name" [formControlName]="setting.name" textareaWidth="500px" [previewColumn]="false"
29 [classes]="{ 'input-error': formErrors['settings.name'] }"
30 ></my-markdown-textarea>
31
32 <my-peertube-checkbox
33 *ngIf="setting.type === 'input-checkbox'"
34 [id]="setting.name"
35 [formControlName]="setting.name"
36 [labelInnerHTML]="setting.label"
37 ></my-peertube-checkbox>
38
39 <div *ngIf="formErrors[setting.name]" class="form-error">
40 {{ formErrors[setting.name] }}
41 </div>
42 </div>
43
44 <input type="submit" i18n value="Update plugin settings" [disabled]="!form.valid">
45 </form>
46
47 <div *ngIf="!hasRegisteredSettings()" i18n class="no-settings">
48 This {{ pluginTypeLabel }} does not have settings.
49 </div>
50
51 </ng-container>