diff options
Diffstat (limited to 'client')
5 files changed, 15 insertions, 3 deletions
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.html b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.html index aae08b94d..95dd74d31 100644 --- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.html +++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.html | |||
@@ -7,9 +7,16 @@ | |||
7 | 7 | ||
8 | <form *ngIf="hasRegisteredSettings()" role="form" (ngSubmit)="formValidated()" [formGroup]="form"> | 8 | <form *ngIf="hasRegisteredSettings()" role="form" (ngSubmit)="formValidated()" [formGroup]="form"> |
9 | <div class="form-group" *ngFor="let setting of registeredSettings"> | 9 | <div class="form-group" *ngFor="let setting of registeredSettings"> |
10 | <label [attr.for]="setting.name">{{ setting.label }}</label> | 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" /> | 11 | <input *ngIf="setting.type === 'input'" type="text" [id]="setting.name" [formControlName]="setting.name" /> |
12 | <textarea *ngIf="setting.type === 'input-textarea'" type="text" [id]="setting.name" [formControlName]="setting.name"></textarea> | ||
13 | |||
14 | <my-peertube-checkbox | ||
15 | *ngIf="setting.type === 'input-checkbox'" | ||
16 | [id]="setting.name" | ||
17 | [formControlName]="setting.name" | ||
18 | [labelInnerHTML]="setting.label" | ||
19 | ></my-peertube-checkbox> | ||
13 | 20 | ||
14 | <div *ngIf="formErrors[setting.name]" class="form-error"> | 21 | <div *ngIf="formErrors[setting.name]" class="form-error"> |
15 | {{ formErrors[setting.name] }} | 22 | {{ formErrors[setting.name] }} |
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.scss b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.scss index 42fc1b634..21c180a70 100644 --- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.scss +++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.scss | |||
@@ -5,6 +5,7 @@ h2 { | |||
5 | margin-bottom: 20px; | 5 | margin-bottom: 20px; |
6 | } | 6 | } |
7 | 7 | ||
8 | textarea, | ||
8 | input:not([type=submit]) { | 9 | input:not([type=submit]) { |
9 | @include peertube-input-text(340px); | 10 | @include peertube-input-text(340px); |
10 | display: block; | 11 | display: block; |
diff --git a/client/src/app/+admin/plugins/shared/plugin-list.component.scss b/client/src/app/+admin/plugins/shared/plugin-list.component.scss index 3663d3fdd..87a709b00 100644 --- a/client/src/app/+admin/plugins/shared/plugin-list.component.scss +++ b/client/src/app/+admin/plugins/shared/plugin-list.component.scss | |||
@@ -21,7 +21,8 @@ | |||
21 | } | 21 | } |
22 | 22 | ||
23 | .second-row { | 23 | .second-row { |
24 | display: flex; | 24 | display: grid; |
25 | grid-template-columns: 1fr auto; | ||
25 | align-items: center; | 26 | align-items: center; |
26 | justify-content: space-between; | 27 | justify-content: space-between; |
27 | 28 | ||
@@ -30,6 +31,7 @@ | |||
30 | } | 31 | } |
31 | 32 | ||
32 | .buttons { | 33 | .buttons { |
34 | margin-left: 10px; | ||
33 | > *:not(:last-child) { | 35 | > *:not(:last-child) { |
34 | margin-right: 10px; | 36 | margin-right: 10px; |
35 | } | 37 | } |
diff --git a/client/src/app/shared/forms/peertube-checkbox.component.html b/client/src/app/shared/forms/peertube-checkbox.component.html index f1e3bf0bf..1c0114d97 100644 --- a/client/src/app/shared/forms/peertube-checkbox.component.html +++ b/client/src/app/shared/forms/peertube-checkbox.component.html | |||
@@ -3,6 +3,7 @@ | |||
3 | <input type="checkbox" [(ngModel)]="checked" (ngModelChange)="onModelChange()" [id]="inputName" [disabled]="disabled" /> | 3 | <input type="checkbox" [(ngModel)]="checked" (ngModelChange)="onModelChange()" [id]="inputName" [disabled]="disabled" /> |
4 | <span role="checkbox" [attr.aria-checked]="checked"></span> | 4 | <span role="checkbox" [attr.aria-checked]="checked"></span> |
5 | <span *ngIf="labelText">{{ labelText }}</span> | 5 | <span *ngIf="labelText">{{ labelText }}</span> |
6 | <span *ngIf="!labelText && labelInnerHTML" [innerHTML]="labelInnerHTML"></span> | ||
6 | 7 | ||
7 | <span *ngIf="labelTemplate"> | 8 | <span *ngIf="labelTemplate"> |
8 | <ng-container *ngTemplateOutlet="labelTemplate"></ng-container> | 9 | <ng-container *ngTemplateOutlet="labelTemplate"></ng-container> |
diff --git a/client/src/app/shared/forms/peertube-checkbox.component.ts b/client/src/app/shared/forms/peertube-checkbox.component.ts index 3b8f39ed0..0303b7e2a 100644 --- a/client/src/app/shared/forms/peertube-checkbox.component.ts +++ b/client/src/app/shared/forms/peertube-checkbox.component.ts | |||
@@ -18,6 +18,7 @@ export class PeertubeCheckboxComponent implements ControlValueAccessor, AfterCon | |||
18 | @Input() checked = false | 18 | @Input() checked = false |
19 | @Input() inputName: string | 19 | @Input() inputName: string |
20 | @Input() labelText: string | 20 | @Input() labelText: string |
21 | @Input() labelInnerHTML: string | ||
21 | @Input() helpPlacement = 'top' | 22 | @Input() helpPlacement = 'top' |
22 | @Input() disabled = false | 23 | @Input() disabled = false |
23 | 24 | ||