Use ng-select for jobs list

pull/6266/head
Chocobozzz 2024-03-11 11:19:51 +01:00
parent 29873257e7
commit cb77bfcd0f
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 21 additions and 5 deletions

View File

@ -1,17 +1,23 @@
<div class="admin-sub-header"> <div class="admin-sub-header">
<div class="select-filter-block"> <div class="select-filter-block">
<label for="jobType" i18n>Job type</label> <label for="jobType" i18n>Job type</label>
<div class="peertube-select-container">
<select id="jobType" name="jobType" [(ngModel)]="jobType" (ngModelChange)="onJobStateOrTypeChanged()" class="form-control"> <ng-select
<option *ngFor="let jobType of jobTypes" [value]="jobType">{{ jobType }}</option> class="select-job-type"
</select> labelForId="jobType"
</div> [(ngModel)]="jobType" (ngModelChange)="onJobStateOrTypeChanged()"
[searchable]="true"
[clearable]="false"
>
<ng-option *ngFor="let jobType of jobTypes" [value]="jobType">{{ jobType }}</ng-option>
</ng-select>
</div> </div>
<div class="select-filter-block"> <div class="select-filter-block">
<label for="jobState" i18n>Job state</label> <label for="jobState" i18n>Job state</label>
<ng-select <ng-select
class="select-job-state" class="select-job-state"
labelForId="jobState"
[(ngModel)]="jobState" [(ngModel)]="jobState"
(ngModelChange)="onJobStateOrTypeChanged()" (ngModelChange)="onJobStateOrTypeChanged()"
[clearable]="false" [clearable]="false"

View File

@ -5,6 +5,16 @@
min-width: 120px; min-width: 120px;
} }
.select-job-type {
min-width: 240px;
::ng-deep .ng-dropdown-panel .ng-dropdown-panel-items {
@media screen and (min-height: 500px) {
max-height: calc(90vh - 250px);
}
}
}
@media screen and (min-width: $primeng-breakpoint) { @media screen and (min-width: $primeng-breakpoint) {
.job-id { .job-id {
max-width: 30vw !important; max-width: 30vw !important;