diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-08 16:14:24 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-10 09:21:00 +0200 |
commit | 4c8749cb9e1e4a8d61697434e372f342def7bc70 (patch) | |
tree | 0e1b64d119b5077113163e147b711d8db5c6dd7e /client/src/app/shared/shared-forms | |
parent | b89b0bfce9bb79d81f9761b07b04d0c4e5aa25c1 (diff) | |
download | PeerTube-4c8749cb9e1e4a8d61697434e372f342def7bc70.tar.gz PeerTube-4c8749cb9e1e4a8d61697434e372f342def7bc70.tar.zst PeerTube-4c8749cb9e1e4a8d61697434e372f342def7bc70.zip |
Migrate to bootstrap 5
Diffstat (limited to 'client/src/app/shared/shared-forms')
10 files changed, 33 insertions, 32 deletions
diff --git a/client/src/app/shared/shared-forms/advanced-input-filter.component.html b/client/src/app/shared/shared-forms/advanced-input-filter.component.html index 7031cb53b..1d6b3df7e 100644 --- a/client/src/app/shared/shared-forms/advanced-input-filter.component.html +++ b/client/src/app/shared/shared-forms/advanced-input-filter.component.html | |||
@@ -1,6 +1,7 @@ | |||
1 | <div class="input-group has-feedback has-clear"> | 1 | <div class="input-group has-clear" ngbDropdown placement="bottom-left auto" container="body"> |
2 | <div *ngIf="hasFilters()" class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body"> | 2 | |
3 | <div class="input-group-text" ngbDropdownToggle> | 3 | <ng-container *ngIf="hasFilters()"> |
4 | <div class="input-group-text c-hand" ngbDropdownToggle> | ||
4 | <span class="caret" aria-haspopup="menu" role="button"></span> | 5 | <span class="caret" aria-haspopup="menu" role="button"></span> |
5 | </div> | 6 | </div> |
6 | 7 | ||
@@ -15,14 +16,14 @@ | |||
15 | </button> | 16 | </button> |
16 | </ng-container> | 17 | </ng-container> |
17 | </div> | 18 | </div> |
18 | </div> | 19 | </ng-container> |
19 | 20 | ||
20 | <input | 21 | <input |
21 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." | 22 | type="text" name="table-filter" id="table-filter" i18n-placeholder placeholder="Filter..." |
23 | class="last-in-group" | ||
22 | [(ngModel)]="searchValue" | 24 | [(ngModel)]="searchValue" |
23 | (keyup)="onInputSearch($event)" | 25 | (keyup)="onInputSearch($event)" |
24 | > | 26 | > |
25 | 27 | ||
26 | <a class="glyphicon glyphicon-remove-sign form-control-feedback form-control-clear" (click)="onResetTableFilter()"></a> | 28 | <a class="glyphicon glyphicon-remove-sign form-control-clear" title="Clear filter" i18n-title (click)="onResetTableFilter()"></a> |
27 | <span class="sr-only" i18n>Clear filters</span> | ||
28 | </div> | 29 | </div> |
diff --git a/client/src/app/shared/shared-forms/advanced-input-filter.component.scss b/client/src/app/shared/shared-forms/advanced-input-filter.component.scss index ee1b3b508..ed85385fd 100644 --- a/client/src/app/shared/shared-forms/advanced-input-filter.component.scss +++ b/client/src/app/shared/shared-forms/advanced-input-filter.component.scss | |||
@@ -23,7 +23,6 @@ my-global-icon { | |||
23 | width: 18px; | 23 | width: 18px; |
24 | height: 18px; | 24 | height: 18px; |
25 | 25 | ||
26 | |||
27 | &.no-visible { | 26 | &.no-visible { |
28 | @include margin-right($size + $margin); | 27 | @include margin-right($size + $margin); |
29 | 28 | ||
diff --git a/client/src/app/shared/shared-forms/input-switch.component.html b/client/src/app/shared/shared-forms/input-switch.component.html index ce1dee470..9a466055a 100644 --- a/client/src/app/shared/shared-forms/input-switch.component.html +++ b/client/src/app/shared/shared-forms/input-switch.component.html | |||
@@ -1,4 +1,4 @@ | |||
1 | <div (click)="update()"> | 1 | <div (click)="update()"> |
2 | <input type="checkbox" [checked]="checked"/> | 2 | <input type="checkbox" [checked]="checked"/> |
3 | <label class="ml-auto">Toggle</label> | 3 | <label class="ms-auto">Toggle</label> |
4 | </div> | 4 | </div> |
diff --git a/client/src/app/shared/shared-forms/input-toggle-hidden.component.html b/client/src/app/shared/shared-forms/input-toggle-hidden.component.html index dfe646d2f..e5edb6c97 100644 --- a/client/src/app/shared/shared-forms/input-toggle-hidden.component.html +++ b/client/src/app/shared/shared-forms/input-toggle-hidden.component.html | |||
@@ -1,21 +1,19 @@ | |||
1 | <div class="input-group input-group-sm"> | 1 | <div class="input-group"> |
2 | <input | 2 | <input |
3 | [id]="inputId" [autocomplete]="autocomplete" [value]="value" [placeholder]="placeholder" [tabindex]="tabindex" | 3 | [id]="inputId" [autocomplete]="autocomplete" [value]="value" [placeholder]="placeholder" [tabindex]="tabindex" |
4 | [(ngModel)]="value" (ngModelChange)="update()" [readonly]="readonly" | 4 | [(ngModel)]="value" (ngModelChange)="update()" [readonly]="readonly" |
5 | #input (click)="input.select()" (input)="update()" (change)="update()" [type]="inputType" class="form-control" | 5 | #input (click)="input.select()" (input)="update()" (change)="update()" [type]="inputType" class="form-control" |
6 | /> | 6 | /> |
7 | 7 | ||
8 | <div *ngIf="withToggle || withCopy" class="input-group-append"> | 8 | <button *ngIf="withToggle" (click)="toggle()" type="button" class="btn btn-outline-secondary eye-button" [title]="toggleTitle"> |
9 | <button *ngIf="withToggle" (click)="toggle()" type="button" class="btn btn-outline-secondary eye-button" [title]="toggleTitle"> | 9 | <span class="glyphicon glyphicon-eye-{{ show ? 'open' : 'close' }}"></span> |
10 | <span class="glyphicon glyphicon-eye-{{ show ? 'open' : 'close' }}"></span> | 10 | </button> |
11 | </button> | ||
12 | 11 | ||
13 | <button | 12 | <button |
14 | *ngIf="withCopy" [cdkCopyToClipboard]="input.value" (click)="activateCopiedMessage()" type="button" | 13 | *ngIf="withCopy" [cdkCopyToClipboard]="input.value" (click)="activateCopiedMessage()" type="button" |
15 | class="btn btn-outline-secondary text-uppercase" i18n-title title="Copy" | 14 | class="btn btn-outline-secondary text-uppercase" i18n-title title="Copy" |
16 | > | 15 | > |
17 | <span class="glyphicon glyphicon-duplicate"></span> | 16 | <span class="glyphicon glyphicon-duplicate"></span> |
18 | Copy | 17 | <span class="copy-text">Copy</span> |
19 | </button> | 18 | </button> |
20 | </div> | ||
21 | </div> | 19 | </div> |
diff --git a/client/src/app/shared/shared-forms/input-toggle-hidden.component.scss b/client/src/app/shared/shared-forms/input-toggle-hidden.component.scss index b5a71eddd..02a8d7d0e 100644 --- a/client/src/app/shared/shared-forms/input-toggle-hidden.component.scss +++ b/client/src/app/shared/shared-forms/input-toggle-hidden.component.scss | |||
@@ -5,11 +5,14 @@ input { | |||
5 | @include peertube-input-text(auto); | 5 | @include peertube-input-text(auto); |
6 | @include padding-left(15px !important); | 6 | @include padding-left(15px !important); |
7 | @include padding-right(15px !important); | 7 | @include padding-right(15px !important); |
8 | } | ||
8 | 9 | ||
9 | // set again properties of peertube-input-text that are overridden by .input-group | 10 | .btn { |
10 | font-size: 15px !important; | 11 | font-size: 15px; |
11 | } | 12 | } |
12 | 13 | ||
13 | .eye-button { | 14 | .copy-text { |
14 | line-height: 1 !important; | 15 | font-size: 14px; |
16 | margin-left: 5px; | ||
17 | vertical-align: top; | ||
15 | } | 18 | } |
diff --git a/client/src/app/shared/shared-forms/peertube-checkbox.component.html b/client/src/app/shared/shared-forms/peertube-checkbox.component.html index c679e1403..38a48a2a5 100644 --- a/client/src/app/shared/shared-forms/peertube-checkbox.component.html +++ b/client/src/app/shared/shared-forms/peertube-checkbox.component.html | |||
@@ -1,6 +1,6 @@ | |||
1 | <div class="root flex-column"> | 1 | <div class="root flex-column"> |
2 | <div class="d-flex"> | 2 | <div class="d-flex"> |
3 | <label class="form-group-checkbox"> | 3 | <label> |
4 | <input | 4 | <input |
5 | type="checkbox" | 5 | type="checkbox" |
6 | [(ngModel)]="checked" | 6 | [(ngModel)]="checked" |
@@ -33,7 +33,7 @@ | |||
33 | <div *ngIf="recommended" class="recommended" i18n>Recommended</div> | 33 | <div *ngIf="recommended" class="recommended" i18n>Recommended</div> |
34 | </div> | 34 | </div> |
35 | 35 | ||
36 | <div class="ml-4 d-flex flex-column"> | 36 | <div class="ms-4 d-flex flex-column"> |
37 | <small class="wrapper mt-2 muted"> | 37 | <small class="wrapper mt-2 muted"> |
38 | <ng-content select="description"></ng-content> | 38 | <ng-content select="description"></ng-content> |
39 | </small> | 39 | </small> |
diff --git a/client/src/app/shared/shared-forms/peertube-checkbox.component.scss b/client/src/app/shared/shared-forms/peertube-checkbox.component.scss index 4e384e7e0..5fe20c3a5 100644 --- a/client/src/app/shared/shared-forms/peertube-checkbox.component.scss +++ b/client/src/app/shared/shared-forms/peertube-checkbox.component.scss | |||
@@ -4,7 +4,7 @@ | |||
4 | .root { | 4 | .root { |
5 | display: flex; | 5 | display: flex; |
6 | 6 | ||
7 | .form-group-checkbox { | 7 | label { |
8 | display: flex; | 8 | display: flex; |
9 | align-items: center; | 9 | align-items: center; |
10 | 10 | ||
diff --git a/client/src/app/shared/shared-forms/select/select-channel.component.html b/client/src/app/shared/shared-forms/select/select-channel.component.html index f83f17a16..b49fd36fa 100644 --- a/client/src/app/shared/shared-forms/select/select-channel.component.html +++ b/client/src/app/shared/shared-forms/select/select-channel.component.html | |||
@@ -7,7 +7,7 @@ | |||
7 | [searchable]="searchable" | 7 | [searchable]="searchable" |
8 | > | 8 | > |
9 | <ng-option *ngFor="let channel of channels" [value]="channel.id"> | 9 | <ng-option *ngFor="let channel of channels" [value]="channel.id"> |
10 | <img alt="" class="avatar mr-1" [src]="channel.avatarPath" /> | 10 | <img alt="" class="avatar me-1" [src]="channel.avatarPath" /> |
11 | {{ channel.label }} | 11 | {{ channel.label }} |
12 | </ng-option> | 12 | </ng-option> |
13 | </ng-select> | 13 | </ng-select> |
diff --git a/client/src/app/shared/shared-forms/select/select-checkbox.component.html b/client/src/app/shared/shared-forms/select/select-checkbox.component.html index 03db2875b..2799ccdcc 100644 --- a/client/src/app/shared/shared-forms/select/select-checkbox.component.html +++ b/client/src/app/shared/shared-forms/select/select-checkbox.component.html | |||
@@ -22,7 +22,7 @@ | |||
22 | > | 22 | > |
23 | 23 | ||
24 | <ng-template ng-optgroup-tmp let-item="item" let-item$="item$" let-index="index"> | 24 | <ng-template ng-optgroup-tmp let-item="item" let-item$="item$" let-index="index"> |
25 | <div class="form-group-checkbox"> | 25 | <div class="checkbox-wrapper"> |
26 | <input id="item-{{index}}" type="checkbox" [ngModel]="item$.selected"/> | 26 | <input id="item-{{index}}" type="checkbox" [ngModel]="item$.selected"/> |
27 | <span role="checkbox" [attr.aria-checked]="item$.selected"></span> | 27 | <span role="checkbox" [attr.aria-checked]="item$.selected"></span> |
28 | <span>{{ item.group }}</span> | 28 | <span>{{ item.group }}</span> |
@@ -30,7 +30,7 @@ | |||
30 | </ng-template> | 30 | </ng-template> |
31 | 31 | ||
32 | <ng-template ng-option-tmp let-item="item" let-item$="item$" let-index="index"> | 32 | <ng-template ng-option-tmp let-item="item" let-item$="item$" let-index="index"> |
33 | <div class="form-group-checkbox"> | 33 | <div class="checkbox-wrapper"> |
34 | <input id="item-{{index}}" type="checkbox" [ngModel]="item$.selected"/> | 34 | <input id="item-{{index}}" type="checkbox" [ngModel]="item$.selected"/> |
35 | <span role="checkbox" [attr.aria-checked]="item$.selected"></span> | 35 | <span role="checkbox" [attr.aria-checked]="item$.selected"></span> |
36 | <span>{{ item.label }}</span> | 36 | <span>{{ item.label }}</span> |
diff --git a/client/src/app/shared/shared-forms/select/select-checkbox.component.scss b/client/src/app/shared/shared-forms/select/select-checkbox.component.scss index d47c4f9da..892f22dff 100644 --- a/client/src/app/shared/shared-forms/select/select-checkbox.component.scss +++ b/client/src/app/shared/shared-forms/select/select-checkbox.component.scss | |||
@@ -7,7 +7,7 @@ ng-select ::ng-deep { | |||
7 | align-items: center; | 7 | align-items: center; |
8 | } | 8 | } |
9 | 9 | ||
10 | .form-group-checkbox { | 10 | .checkbox-wrapper { |
11 | display: flex; | 11 | display: flex; |
12 | align-items: center; | 12 | align-items: center; |
13 | 13 | ||