]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
add description to transcoding profile selector
authorRigel Kent <sendmemail@rigelk.eu>
Thu, 28 Jan 2021 16:21:08 +0000 (17:21 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Thu, 28 Jan 2021 16:21:08 +0000 (17:21 +0100)
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
client/src/sass/ng-select.scss

index 7ecfb7702e552c8d6154c6a080a0488d135f8f86..5f02d00e8070a7628d362815cd1b469294857d4a 100644 (file)
 
               <div class="form-group mt-4" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }">
                 <label i18n for="transcodingProfile">Transcoding profile</label>
-                <span class="text-muted ml-1" i18n>New transcoding profiles can be added by PeerTube plugins</span>
+                <span class="text-muted ml-1" i18n>new transcoding profiles can be added by PeerTube plugins</span>
 
-                <div class="peertube-select-container">
-                  <select id="transcodingProfile" formControlName="profile" class="form-control">
-                    <option *ngFor="let vodTranscodingProfileOption of getAvailableTranscodingProfile('vod')" [value]="vodTranscodingProfileOption">
-                      {{ vodTranscodingProfileOption }}
-                    </option>
-                  </select>
-                </div>
+                <ng-select
+                  id="transcodingProfile"
+                  formControlName="profile"
+                  [items]="getAvailableTranscodingProfile('vod')"
+                  [clearable]="false"
+                >
+                  <ng-template ng-option-tmp let-item="item" let-index="index">
+                    {{ item }}
+                    <ng-container *ngIf="item === 'default'">
+                      <br>
+                      <span class="text-muted">x264, targeting maximum device compatibility</span>
+                    </ng-container>
+                  </ng-template>
+                </ng-select>
                 <div *ngIf="formErrors.transcoding.profile" class="form-error">{{ formErrors.transcoding.profile }}</div>
               </div>
 
index d7ea73d483b5d32706989e42d50621d86b0b9352..54c805ccf5f84dc165126546d7fa1b2c786ad1c5 100644 (file)
@@ -20,6 +20,11 @@ $ng-select-height: 30px;
   font-size: .9em;
 }
 
+.ng-input,
+.ng-select .ng-select-container .ng-value-container {
+  padding-left: 15px !important;
+}
+
 .ng-select {
   &.ng-select-focused {
     &:not(.ng-select-opened) > .ng-select-container {
@@ -29,6 +34,11 @@ $ng-select-height: 30px;
 
   .ng-select-container {
     background-color: pvar(--inputBackgroundColor);
+
+  }
+
+  .ng-arrow-wrapper {
+    padding-right: 12px
   }
 
   &.ng-select-single .ng-value-container .ng-value {